z/OS MVS Programming: Assembler Services Reference ABE-HSP
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


BLSQMFLD — Specify a formatting model field

z/OS MVS Programming: Assembler Services Reference ABE-HSP
SA23-1369-00

Description

The BLSQMFLD macro identifies fields that are to be formatted. These fields are within a data area or a control block. A BLSQMFLD macro must be coded for each field.

The BLSQMDEF and BLSQMFLD macros work together to create a formatting model for a control block. This is the structure of the model:
  • One BLSQMDEF macro to begin the model definition.
  • At least one BLSQMFLD macro to define the attributes of a desired control block field.
  • One BLSQMDEF macro to end the model definition.

The order of the BLSQMFLD statements in the formatting model determines the order of the fields in the output of the formatting process. Only the BLSQMFLD macro can be placed between the BLSQMDEF statements. The BLSQSHDR macro, which defines text strings to be displayed in the formatted output, clarifies the data and should be placed after the second BLSQMDEF.

BLSQMDEF, BLSQMFLD, and BLSQSHDR allow interactive problem control system (IPCS) and SNAP users to specify the presentation of data and messages produced by user-written exit routines.

See z/OS MVS IPCS Customization for information about format models.

Environment

Because BLSQMFLD is not an executable macro, there are no specific environment requirements.

Programming requirements

None.

Restrictions

Register information

Because BLSQMFLD is not an executable macro, there is no need to save and restore register contents.

Performance implications

None.

Syntax

This is the standard form of the BLSQMFLD macro:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede BLSQMFLD.
   
BLSQMFLD  
   
One or more blanks must follow BLSQMFLD.
   
NAME=label  
NAME=* label: Symbol.
   
   ,SHDR=addr addr: A-type address.
  Note: When SHDR is specified, only CALLRTN, NEWLINE, NOSPLIT, and VIEW are allowed.
   
   ,OFF=value value: Decimal constant, hexadecimal constant, or absolute value.
  Note: OFF is required when BASELBL is not specified on the BLSQMDEF macro or when NAME=* is specified on the BLSQMFLD macro.
   
   ,LEN=value value: Decimal constant, hexadecimal constant, or absolute expression.
  Note: LEN is required when name parameter label is unresolved.
   
   ,VIEW=(list) (list): Integers between 1 and 16, inclusive.
   ,VIEW=value value: Decimal constant, hexadecimal constant, or absolute value.
  Default: VIEW=X‘0200’.
   
   ,ARRAY=constants constants: ((DL1,DU1),(DL2,DU2))
   ,ARRAY=value DL1,DU1,DL2,DU2: Decimal constants, hexadecimal constants, or absolute values.
   ,ARRAY=* value: Decimal constant, hexadecimal constant, or absolute value.
   ,ARRAY=END Note: LEN and OFF are ignored when the specification of ARRAY= is other than ARRAY=END.
  END terminates an array definition.
   
   ,DTYPE=ANY  
   ,DTYPE=QANY  
   ,DTYPE=HEX  
   ,DTYPE=EBCDIC  
   ,DTYPE=ASCII  
   
   ,DECODE  
   
   ,INVERT  
   
   ,ATTACH  
   
   ,IMBED  
   
   ,STACK  
   
   ,CALLCBF  
   
   ,NEWLINE  
   
   ,NOLABEL  
   
   ,CALLRTN  
   
   ,PREFIX=value value: Integers between 0 and 8.
  Note: When omitted, value specified in the last preceding BLSQMDEF or BLSQMFLD macro is used.
   
   ,NOSPLIT  
   
   ,NUMDEC Default: Hexadecimal.
   
   ,NOCOLNM Default: Number the columns.
   
   ,NOROWNM  
   
   ,STRTCOL=value value: Decimal constant, hexadecimal constant, or absolute value.
  Default: Value specified by IPCS or SNAP.
   
   ,COLNUM=value value: Decimal constant, hexadecimal constant, or absolute value.
  Default: A value is calculated.
   
   ,COLSEP=value value: Decimal constant, hexadecimal constant, or absolute value.
  Default: A value is calculated.
   
   ,ITEMSEP=value value: Decimal constant, hexadecimal constant, or absolute value.
  Default: A value is calculated.
   
   ,ORDER=(1,2) Default: ORDER=(1,2)
   ,ORDER=(2,1)  
   
   ,HEXONLY  
   
   ,MODELNAME(modelname)  
   
   ,MSGID(msgid)  
   
   ,SRCNDX Default: 0
   

Parameters

The parameters are explained as follows:

NAME=label
NAME=*
Specifies the name of the control block field described by the BLSQMFLD macro. When BASELBL is specified on the BLSQMDEF macro, the NAME label is used with the BASELBL label to calculate the offset of this field from the start of the control block. When BASELBL is not specified on the BLSQMDEF macro, OFF is required on the BLSQMFLD macro.

A single asterisk specifies an unnamed, reserved field. The use of single asterisk for the name of a control block field requires that the OFF and LEN parameters be specified. The format model processor service replaces the asterisk with a “RSV.....” label.

,SHDR=addr
Specifies the address of a character string used as a subheading in the control block format. The address must be valid in an assembler A-type DC instruction. This parameter should point to a one-byte length field followed by the heading character string. The length byte indicates the length of the heading string and not the length of the length byte. The BLSQSHDR macro is used to define subheaders.

When this parameter is specified, only CALLRTN, NEWLINE, NOSPLIT, and VIEW can be specified. Other parameters are ignored.

,OFF=value
Specifies the offset of the field from the beginning of the control block. The value can be a decimal constant, a hexadecimal constant, or an absolute expression. When this parameter is specified, the value defined overrides the default field offset generated by the NAME label on this macro and the BASELBL label on the BLSQMDEF macro.

OFF is ignored when the specification of ARRAY= is other than ARRAY=END.

This parameter is required when the BASELBL parameter is not specified on the BLSQMDEF macro or when NAME=* is specified on the BLSQMFLD macro.

,LEN=value
Specifies the length of the control block field. The value is a decimal constant, hexadecimal constant, or absolute expression of a number from 1 to 32767. This parameter is required when no data constants with a label exist in the assembly program as defined by the NAME parameter, or when use of the assembler length attribute would not result in a correct length determination for the data constant representing the field.

LEN is ignored when specification of ARRAY= is other than ARRAY=END.

An assembly error occurs when LEN is not specified and there is no assembler statement with a label matching the one specified by NAME.

,VIEW=(list)
,VIEW=value
Specifies up to sixteen different views of the control block fields. Any combination of one to sixteen view attributes can be specified for each field. The caller of the model processor exit service provides a view pattern defining the views to be formatted. The view field consists of a twelve-bit general view followed by a four-bit component view. When the component view in a model entry is zero, any matching bit causes that model entry to be processed. When the component view in the model is not zero, there must be a matching bit in both the general and component view fields.

When VIEWMATCH=VALUE is coded on the first BLSQMDEF macro of the model, the model processor compares the first byte of the two view fields and requires an exact match to process the model entry. This feature is convenient for decoding a value-coded byte.

The list is an unordered list of attributes; each attribute can be a decimal integer between 1 and 16, (VIEW=1,2,...,16), binary constant (VIEW=B‘0010000000000000’.), or hexadecimal constant (VIEW=X‘0080’.).

This chart illustrates the view parameter's control block field options provided through the specification of a 4-digit hexadecimal number. Any combination of the view fields listed can be specified.

Hexadecimal Code User-defined fields to be displayed
x‘8000’. keyfield
x‘4000’. summary field
x‘2000’. register save area
x‘1000’. linkage field
x‘0800’. error fields
x‘0400’. hexadecimal dump
x‘0200’. non-reserved field
x‘0100’. reserved fields
x‘0080’. static array or decode flag fields
x‘0040’. dynamic array
x‘0020’. input field
x‘0010’. output field

When this parameter is not specified, the default value of VIEW=X‘0200’. is used. See z/OS MVS IPCS User's Guide and z/OS MVS IPCS Commands for more information about ADPLPFMT.

,ARRAY=((DL1,DU1),(DL2,DU2))
,ARRAY=value
,ARRAY=*
,ARRAY=END
Specifies that the succeeding BLSQMFLD statements define a set of fields that are repeated in the control block.

The ARRAY parameter on the BLSQMFLD macro indicates that the BLSQMFLD macro is the beginning or the end of an array definition.

The LEN and OFF parameters are ignored when specification of ARRAY= is other than ARRAY=END.

The VIEW specified applies to all fields within the array. The VIEW specified on the BLSQMFLD macro that starts an array should be the composite of the VIEW on all fields within the array.

When ARRAY=((DL1,DU1),(DL2,DU2)) is coded, a two dimensional array is specified. DL1 is the lower limit of the first dimension and DU1 is the upper limit of the first dimension. DL2 is the lower limit of the second dimension and DU2 is the upper limit of the second dimension. When a lower limit for a dimension is not specified, the default is 1. No default exists for the upper limit of a dimension. An asterisk (*) can be coded for either the upper limit or lower limit of the dimension to indicate that the dimension is to be provided by the calling program at execution time in fields ADPLPDL1, ADPLPDL2, ADPLPDU1, ADPLPDU2 in the format parameter.

The total length of an array element must be accounted for in the total of the LEN values of the fields within the array definition. VIEW=0 can be coded on fields within the array that are never to be displayed.
Note:
  1. The correspondence of a dimension to a row or column is determined by the ORDER parameter.
  2. When the array is larger than 65,535 bytes, the calling program must process the array in sections. The formatter equates the lower limit for each dimension to the value one to address the array entries in a buffer. It uses the specified values to number rows and columns in the formatted output.

    The format parameter extension is used to define blocks of storage of arbitrary length to eliminate this restriction.

When ARRAY=value is coded, a one dimensional array (list) is specified. Value defines the number of array entries contained in the control block.

When ARRAY=* is coded, the number of entries in the one-dimensional array (list) are to be provided by the calling program at execution time in the ADPLPDAC field of the format parameter.

The total length of an array element must be accounted for in the total of the LEN values of the fields within the array definition. VIEW=0 can be coded on fields within the array that are never to be displayed.

When ARRAY=END is coded, the array definition is terminated.

,DTYPE=HEX
,DTYPE=EBCDIC
,DTYPE=ASCII
,DTYPE=ANY
,DTYPE=QANY
Specifies the type of data contained in the area to be displayed. DTYPE=HEX indicates that the area to be displayed contains four-bit hexadecimal digits. DTYPE=EBCDIC indicates that the area to be dumped contains eight-bit EBCDIC characters. DTYPE=ASCII indicates that the area to be dumped contains ASCII characters.

DTYPE=ANY specifies that the data is either EBCDIC or hexadecimal. When the data is EBCDIC, the model processor treats the data as EBCDIC. When any of the data is not EBCDIC, the model processor treats all the data as four-bit hexadecimal digits. The field must be less than 256 bytes.

DTYPE=QANY specifies that the next entry in the model is a subheader entry, with a view field of all zero. The value of the field is only treated as EBCDIC when it is the same as one of the values specified in the text of the subheader. Otherwise, the field is displayed in hexadecimal format. When the subheader is shorter than or equal to the length of the data field, a comparison is made using the subheader length. When the subheader is longer than the data field, the subheader length must be a multiple of the data field length, and multiple comparisons are made.

In both cases, the EBCDIC version is presented in four-byte segments unless NOSPLIT is also coded.

,DECODE
Specifies that the model entry describes one of these decoding operations:
  • Flag field decoding
  • Format imbedded block
  • Format attached block
  • Format stacked block

When MODELNAME is coded, the NAME field is copied into the model entry. Otherwise, it is treated as the address of the named model. The CALLCBF parameter also specifies whether the name is to be interpreted as a model name or as an acronym. When acronym, the system calls the control block formatter.

DECODE is not supported within an array.

,INVERT
Specifies that the flag field is to be inverted and that decoding is to be performed according to a model. The flag fields are inverted to allow the decoding of flags that are in the zero state. To specify flag fields use the offset and length parameters. The flag field can be up to four bytes long. The model is described by the label field and the control flags. INVERT is valid only when DECODE is specified, and decoding is performed only when the views match.
,ATTACH
Specifies that the dump data referenced by a pointer at the offset, specified by the offset parameter, is to be formatted according to a format model. When the length parameter value is other than zero or four, that value is added to the value of the pointer. The model is described by the name field and the control flags. ATTACH is valid only when DECODE is specified, and formatting occurs only when the views match.
,IMBED
Specifies that the data identified by the offset and length parameters is to be formatted according to a model. The model is described by the name field and control flags. The starting offset is the offset in the containing block, and the header is suppressed. Data areas formatted appear to be part of the containing block. IMBED is valid only when DECODE is specified, and formatting occurs only when the views match. Register save areas in control blocks are examples of embedded blocks.
,STACK
Specifies that the data identified by the offset and length parameters is to be formatted according to a model. The model is described by the name field and control flags. The starting offset is zero, and the header is not suppressed. Areas formatted are recognizable as distinct entities. STACK is valid only when DECODE is specified. The SDWA in dump header records illustrates the function of STACK.
,CALLCBF
Specifies that the name field is an acronym. CALLCBF and MODELNAME are valid only when DECODE is specified in conjunction with ATTACH, IMBED, or STACK. Formatting is performed according to a model, and each ACRONYM corresponds to a particular model. When CALLCBF is not specified, the model processor is called directly.
,NEWLINE
Specifies that the field should be printed on the next line of output.
,NOLABEL
Specifies that the field label is not to be printed. NAME is required.
,CALLRTN
Specifies that the model processor calls the model processor formatting exit after the output line, containing this field, is formatted before it is printed. The model processor formatting exit entry point address is specified by the caller in the parameter list, ADPLPLME, when the model processor is invoked.
,PREFIX=value
Specifies the number of characters to be removed from the front of a field name to produce the field label. The field name is defined by the NAME parameter. Value must be an integer constant greater than or equal to zero and less than or equal to eight. When PREFIX is omitted from the current BLSQMFLD macro, the value specified on the last preceding BLSQMFLD or BLSQMDEF macro is used. The BLSQMDEF macro, used to start a model definition, can also be used to set the value of PREFIX. When PREFIX=8 is coded with BLSQMDEF, the model processor operates in “no-label mode”, and does not allocate print buffer columns to labels.
,NOSPLIT
Specifies that the model processor attempts to print all the field data on the same output line. When the data does not fit on the current output line, but fits on a single output line, the model processor skips to a new line prior to printing the data field.

When NOSPLIT is coded with ANY or QANY, the character string is displayed as is, not in four-byte segments. The display might differ when the field is treated as hexadecimal.

,NUMDEC
Specifies that the columns and rows of a two-dimensional array be numbered in decimal. The default is hexadecimal.
,NOCOLNM
Specifies that column numbers (headers) of a two-dimensional array be suppressed. The default is to number the columns. The NUMDEC parameter controls the numbering system used for numbering the columns.
,NOROWNM
Specifies that the row numbers of a two-dimensional array are to be suppressed. The default is to specify the row numbers. NUMDEC parameter controls the numbering system used to number the rows. NOROWNM is valid only with ARRAY=((value,value),(value,value)).
,STRTCOL=value
Specifies the left margin of the formatted output. Value indicates the number of blanks before the first character. STRTCOL applies only to two-dimensional arrays. This specification overrides the value defined by the STRTCOL parameter in the BLSQMDEF macro, or by IPCS or SNAP, for the duration of displaying the array. When not specified, a default of zero is provided and the formatter uses the value specified by the host.
,COLNUM=value
Specifies the number of columns of a two dimensional array that are to be displayed in each line of output. When not specified, or when the specified number of columns does not fit in the currently available print buffer, the formatter calculates a value consistent with, and not exceeding, the maximum line length specified by IPCS or SNAP.
,COLSEP=value
Specifies the number of blanks to be placed between the columns of a two-dimensional array. The default is zero. The model processor uses a calculated value.
,ITEMSEP=value
Specifies the number of blanks to be placed between items within an array entry. An array entry can be a structure, and each element of the structure is referred to as an “item”. When the array entry is a single item, value is ignored. When ITEMSEP is not specified, a default of zero is provided, and the model processor uses a calculated value.
,ORDER=(1,2)
,ORDER=(2,1)
Specifies the order in which the data of a two-dimensional array is to be processed. When ORDER=(1,2) is specified, the data is processed in consecutive rows. When ORDER=(2,1) is specified, the data is processed in consecutive columns. The default is ORDER=(1,2).
,HEXONLY
Specifies that the data is to be displayed in hex. When HEXONLY is omitted, the data is displayed in both hex and EBCDIC, on the same line, with vertical bars bounding the EBCDIC portion of the display. HEXONLY is valid only when the view parameter specifies X‘0400’. This requests a hexadecimal dump.
MODELNAME(modelname)
Specifies the name of the model to be used in a decoding operation, or the acronym of the data area when CALLCBF is coded.
MSGID(msgid)
Specifies that the subheader is a message with a message ID that may be conditionally stripped. MSGID is only valid when SHDR is specified.
SRCNDX
Specifies which one of the 16 entries in the array of buffer and ES addresses is to be used in processing the field. The array is zero origin, so 0 refers to the first and 15 refers to the last. The srcndx value stays in effect for subsequent BLSQMFLD macro invocations until it is changed. This keyword is part of the multiple source formatting feature. The default is zero.

Example 1

Code the macros that establish a control block formatting model to be used by the model processor to format functional recovery routines (FRRs).
IEAVTRP3 CSECT
         BLSQMDEF CBLEN=X'0320',MAINTLV=HBB2102,PREFIX=4,OFFSETS=PRINT,X
               HEADER=FRRS
         BLSQMFLD NAME=FRRSEMP,OFF=X'0000',LEN=4,VIEW=X'0202'
         BLSQMFLD NAME=FRRSLAST,OFF=X'0004',LEN=4,VIEW=X'0202'
         BLSQMFLD NAME=FRRSELEN,OFF=X'0008',LEN=4,VIEW=X'0202'
         BLSQMFLD NAME=FRRSCURR,OFF=X'000C',LEN=4,VIEW=X'0200'
         BLSQMFLD NAME=FRRSRSA,OFF=X'0010',LEN=24,VIEW=X'0200'
         BLSQMFLD SHDR=RTM1WA,VIEW=X'0200',NEWLINE
         BLSQMFLD SHDR=BLANK,VIEW=X'0200',NEWLINE
         BLSQMFLD SHDR=ENTEXT,VIEW=X'0200',NEWLINE
         BLSQMFLD SHDR=BLANK,VIEW=X'0200',NEWLINE
         BLSQMFLD NAME=FRRSXSTK,VIEW=X'0200',ARRAY=16,NOLABEL
         BLSQMFLD NAME=FRRSKM,OFF=X'00A0',LEN=2,VIEW=X'0200',NEWLINE
         BLSQMFLD NAME=FRRSSAS,OFF=X'00A2',LEN=2,VIEW=X'0200'
         BLSQMFLD NAME=FRRSAX,OFF=X'00A4',LEN=2,VIEW=X'0200'
         BLSQMFLD NAME=FRRSPAS,OFF=X'00A6',LEN=2,VIEW=X'0200',ARRAY=END
         BLSQMFLD SHDR=BLANK,VIEW=X'0200',NEWLINE
         BLSQMFLD SHDR=ENTS,VIEW=X'0200',NEWLINE
         BLSQMFLD SHDR=BLANK,VIEW=X'0200',NEWLINE
         BLSQMFLD NAME=FRRSENTS,VIEW=X'0200',ARRAY=16,NOLABEL
         BLSQMFLD NAME=FRRSFRRA,OFF=X'0120',LEN=4,VIEW=X'0200',NEWLINE
         BLSQMFLD NAME=FRRSFLGS,OFF=X'0124',LEN=4,VIEW=X'0200'
         BLSQMFLD NAME=FRRSPARM,OFF=X'0128',LEN=24,VIEW=X'0200',       X
               ARRAY=END
         BLSQMDEF END
BLANK    BLSQSHDR ' '
ENTEXT   BLSQSHDR 'FRR ENTRY EXTENSIONS'
ENTS     BLSQSHDR 'FRR ENTRIES'
RTM1WA   BLSQSHDR 'RTM1 WORK AREA FOLLOWS FRR ENTRIES'
         END

Example 2

Code the macros that establish a control block formatting model to be used by the model processor to format a STAE control block (SCB).
IEAVTRP4 CSECT
         BLSQMDEF CBLEN=X'0018',MAINTLV=JBB2125,PREFIX=3,OFFSETS=PRINT,X
               HEADER=SCB
         BLSQMFLD NAME=SCBCHAIN,OFF=X'0000',LEN=4,VIEW=X'0200'
         BLSQMFLD NAME=SCBEXIT,OFF=X'0004',LEN=4,VIEW=X'0200'
         BLSQMFLD NAME=SCBFLGS1,OFF=X'0008',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBPARMA,OFF=X'0009',LEN=3,VIEW=X'0200'
         BLSQMFLD NAME=SCBFLGS2,OFF=X'000C',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBOWNRA,OFF=X'000D',LEN=3,VIEW=X'0200'
         BLSQMFLD NAME=SCBFLGS3,OFF=X'0010',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBPKEY,OFF=X'0011',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBID,OFF=X'0012',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBRSVRE,OFF=X'0013',LEN=1,VIEW=X'0200'
         BLSQMFLD NAME=SCBXPTR,OFF=X'0014',LEN=4,VIEW=X'0200'
         BLSQMFLD NAME=*,OFF=X'0000',LEN=X'0018',VIEW=X'0400',NOLABEL
         BLSQMDEF END

         END

Example 3

Define the format of a simple control block. Note that this can be done by using a macro-invocation.
MYBLK    DSECT ,                  My simplest control block ever
MYBLKABC DC    C'ABC'             Identifier
MYBLKDEF DC    X'00'              Flags
MYBLKD80 EQU   X'80'              1st flag bit
MYBLKD40 EQU   X'40'              2nd flag bit
MYBLKGHI DC    V(MYENTRY)         Address of my program
MYBLKEND EQU   *                  End of my control block
Define enough storage to get the block displayed. Note that no ENTRY statement is required for access to CBMODEL1 from other CSECTs since CBMODEL1 lies at the origin of the CSECT.
         TITLE 'CBMODEL1--Basic Control Block Model'
CBMODEL  CSECT ,                  Start definition of simple model
CBMODEL1 BLSQMDEF BASELBL=MYBLK,CBLEN=MYBLKEND-MYBLK,PREFIX=5
         BLSQMFLD NAME=MYBLKABC
         BLSQMFLD NAME=MYBLKDEF
         BLSQMFLD NAME=MYBLKGHI
         BLSQMDEF END             End definition of simple model
Add acronym checking, the display of the acronym in EBCDIC, and descriptive header for the display in the dump.
         TITLE 'CBMODEL2--More Elaborate than 1st Model'
         ENTRY CBMODEL2           Permit access from other CSECTs
CBMODEL2 BLSQMDEF BASELBL=MYBLK,CBLEN=MYBLKEND-MYBLK,PREFIX=5,    X
               ACRONYM=ABC,ACROLBL=MYBLKABC, Acronym field data
               HEADER=MYBLOCK     Heading for block in dump
         BLSQMFLD NAME=MYBLKABC,DTYPE=EBCDIC Show it as EBCDIC data
         BLSQMFLD NAME=MYBLKDEF
         BLSQMFLD NAME=MYBLKGHI
         BLSQMDEF END             End definition of alternate model
         END   CBMODEL1           End definition of formatting model

Example 4

Assume that the data is stored in this sequence:
00010001
00010002
00010003
00010004
00020001
00020002
00020003
00020004
00030001
00030002
00030003
00030004
   .
   .
   .
00090001
00090002
00090003
00090004
00100001
00100002
00100003
00100004
And you want the data to be formatted like this:
    ---01--- ---02--- ---03--- ---04---
    ARRENTRY ARRENTRY ARRENTRY ARRENTRY
    -------- -------- -------- --------
001 00010001 00010002 00010003 00010004
002 00020001 00020002 00020003 00020004
003 00030001 00030002 00030003 00030004
004 00040001 00040002 00040003 00040004
005 00050001 00050002 00050003 00050004
006 00060001 00060002 00060003 00060004
007 00070001 00070002 00070003 00070004
008 00080001 00080002 00080003 00080004
009 00090001 00090002 00090003 00090004
010 00100001 00100002 00100003 00100004
Code the macro that creates a formatting model to do the following:
  • Number rows 1 through 10.
  • Number columns 1 through 4.
  • Use the decimal numbering system for numbering rows and columns.
  • Place data in to the array row by row.
  • Put one blank between each column.
  • Display 4 columns in each group.
  • Start printing in the second column from the left margin.
  • View all non-reserved fields.
  • Print the field label ARRENTRY.
One way to code the macro:
BLSQMFLD NAME=ARRAYX,ARRAY=((1,10),(1,4)),VIEW=X'0200',   X
      STRTCOL=1,COLSEP=1,COLNUM=4,NUMDEC,NOLABEL
BLSQMFLD NAME=ARRENTRY,OFF=0,LEN=4,ARRAY=END,VIEW=X'0200'

Example 5

Assume that the data is stored in this sequence:
00010001
00010002
00010003
00010004
00020001
00020002
00020003
00020004
00030001
00030002
00030003
00030004
   .
   .
   .
00090001
00090002
00090003
00090004
00100001
00100002
00100003
00100004
And you want the data to be formatted this way:
    ---05--- ---06--- ---07--- ---08--- ---09---
    ARRENTRY ARRENTRY ARRENTRY ARRENTRY ARRENTRY
    -------- -------- -------- -------- --------
000 00010001 00020001 00030001 00040001 00050001
001 00010002 00020002 00030002 00040002 00050002
002 00010003 00020003 00030003 00040003 00050003
003 00010004 00020004 00030004 00040004 00050004
    ---0A--- ---0B--- ---0C--- ---0D--- ---0E---
    ARRENTRY ARRENTRY ARRENTRY ARRENTRY ARRENTRY
    -------- -------- -------- -------- --------
000 00060001 00070001 00080001 00090001 00100001
001 00060002 00070002 00080002 00090002 00100002
002 00060003 00070003 00080003 00090003 00100003
003 00060004 00070004 00080004 00090004 00100004
Code the macro that creates a formatting model to do the following:
  • Number rows 0 through 3.
  • Number columns 5 through 14.
  • Use the hexadecimal numbering system for numbering rows and columns.
  • Put two blanks between each column.
  • Display 5 columns in each group.
  • Start printing in the fourth column from the left margin.
  • View all non-reserved fields.
  • Print the field label ARRENTRY.
One way to code the macro:
BLSQMFLD NAME=ARRAYX,ARRAY=((5,14),(0,3)),VIEW=X'0200',    X
      STRTCOL=3,COLSEP=2,COLNUM=5,NOLABEL,ORDER=(2,1)
BLSQMFLD NAME=ARRENTRY,OFF=0,LEN=4,ARRAY=END,VIEW=X'0200'

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014