FDREPORT PUNCH Statement


PUNCH statement

The PUNCH statement specifies the location of a mask used to define the “punch” output generated by FDREPORT for the RPTYPE=SELPCH report and is ignored if RPTYPE=SELPCH is not specified.

PUNCH statement syntax

PUNCH



COUNTERVALID=NO|YES


,ECHO|NOECHO


,FDRLIB=ddn


,FIELDPREFIX=c


,FIELDSUFFIX=c


,MASKNAME=mem


,MAXSTATEMENTS=nnnn


,SYMBOLS=(sym[,sym,…])


,VALUES=(value[,value,…])


,STARTINGPASUNIT=uuuu
,ENDINGPASUNIT=uuuu
,PASINCREMENT=nn

The punch mask input must be a data set that has the attributes: RECFM=FB,LRECL=80. It may be either sequential (DSORG=PS) or partitioned (DSORG=PO). The PUNCH statement uses the presence or absence of the MASKNAME= operand to differentiate between sequential or partitioned data sets. If MASKNAME= is specified, the data set is assumed to be partitioned and MASKNAME= provides the member name. If MASKNAME= is omitted, the data set is assumed to be sequential (the FDRLIB= operand must be provided to specify the input DD statement name). The punch mask may also be an input stream (DD *) data set.

For each record processed by FDREPORT, it scans the punch mask, copying each mask record to the punch output SYSPUNCH DD Statement, but if any FDREPORT field names or special names are found in the mask, the current value of the name is substituted. These field names and special names must be surrounded by the delimiters specified by the FIELDPREFIX= and FIELDSUFFIX= operands; the defaults for these are < and >, so the field names are usually specified like: <LRECL>. The field names that may appear in the PUNCH mask are found in the table in FDREPORT-Field-Names (check the PUNCH column). In addition to those field names, the following special names may be used:

Field

Len

Description

$$CCL3

3

Continuous counter with three (3) byte significance.

$$CCL4

4

Continuous counter with four (4) byte significance.

$$CCL5

5

Continuous counter with five (5) byte significance.

$$CCL6

6

Continuous counter with six (6) byte significance.

$$CNTFDR

1

Record counter with one (1) byte significance ranging from 0-9, A-Z.

$$CNT2

2

Record counter with two (2) byte significance.

$$CNT3

3

Record counter with three (3) byte significance.

$$CNT4

4

Record counter with four (4) byte significance.

$$CNT5

5

Record counter with five (5) byte significance.

$$CNT6

6

Record counter with six (6) byte significance.

$$CPASUN

4

Unit number for FDRPAS with a four (4) byte hex value.

$$LPCNT2

2

Loop counter with two (2) byte significance.

$$LPCNT3

3

Loop counter with three (3) byte significance.

$$PRCCL3

3

Prior continuous count with three (3) byte significance.

$$PRCCL4

4

Prior continuous count with four (4) byte significance.

$$PRCCL5

5

Prior continuous count with five (5) byte significance.

$$PRCCL6

6

Prior continuous count with six (6) byte significance.

$$PLCNT2

2

Prior loop counter with two (2) byte significance.

$$PLCNT3

3

Prior loop counter with three (3) byte significance.

$$PRCFDR

1

Prior record counter with one (1) byte significance ranging from 0-9, A-Z.

$$PRCNT2

2

Prior record counter with two (2) byte significance.

$$PRCNT3

3

Prior record counter with three (3) byte significance.

TODAY

5

Current date in Julian format (that is, yyddd).

User-specified

Varies

Variable names (see “SYMBOLS=” in FDREPORT-XSELECT-and-XEXCLUDE-Statement).

The counters can be used to generate names (such as step names, DD statement names) that are unique. The $$CNTxxx counters are incremented for each FDREPORT record (data set name) passed through the punch mask. The $$LPCNTx counters increment each time the punch mask is initialized (such as a control break). The $$Pxxxx counters contain the prior value of the associated counter (for example, for generating refer-back JCL).

There are special positional statements that can be used within the mask to permit one time generation of a segment of the mask and other special processing. The operands must begin in column one and are described as follows:

)REPRO

Statements that follow this are processed only once.

)PREFIX

Statements that follow this are processed once per loop, at the beginning of the loop, controlled by BREAK=RPM or YES on the SORT statement).

)ENDPREFIX

Terminates the loop prefix statements.

)EXITPREFIX

Terminates the loop prefix statements and bypasses the rest of the punch mask.

)DUPCHECK

Begins checking for duplicate mask generation. If the statements surrounded by )DUPCHECK and )ENDUPCHECK generate output identical to the previous generation, they are suppressed.

)ENDUPCHECK

Marks the end of the duplicate checking.

)SUFFIX

Statements that follow this are processed once per loop, at the end of the loop.

)INCREMENTCOUNT

Increment current record count. Only valid and detected in the )SUFFIX section of a punch mask.

)INCREMENTLOOP

Increment current loop count. Only executed once.

)ONEVALUE

Used in editing a mask with RPTYPE=SELPCH. Substitution stops when the )ONEVALUE statement is encountered.

)CONTVALUES

Used to control the formatting of continued variables.

Here is an example of a simple punch mask (the JOB statement is generated once, an IDCAMS step is generated for each selected data set name, and the program SOMEPGM is executed once at the end):

)PREFIX //SOMEJOB JOB (USER1,123),LISTCAT,MSGCLASS=X,CLASS=C )ENDPREFIX //STEP<$$CNT3> EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENT(<NAME>) ALL )SUFFIX /* //STEPEND EXEC PGM=SOMEPGM //SYSPRINT DD SYSOUT=*

For examples and guidance is setting up more complex punch masks, contact BMC Support.

If RPTYPE=SELPCH is specified and no PUNCH statement is present, the default punch mask is XSELECT VOL=<VOL>,DSN=<NAME> which generates statements acceptable to ABR.

PUNCH statement operands

COUNTERVALID=

Specifies whether the special counter field names (for example, $$CNT2 and, $$CNT3) are valid and are resolved within this punch mask.

NO

The special counter field names are not valid and are not resolved.

YES

The special counter field names are valid and are resolved.

Default: YES.

ECHO

NOECHO

Specifies whether ECHO or not NOECHO the punch mask is to be printed on SYSPRINT.

Default: NOECHO; the mask is not printed.

FDRLIB=

ddn

Specifies the ddname to be used when reading punch masks.

Default: FDRLIB.

FIELDPREFIX=

c

Specifies the character that marks the beginning of a field name in a punch mask. Valid characters are <|&$*%_>:#@ but the default of “<” should not be overridden unless you need to use that character as data in the mask.

Default: <.

FIELDSUFFIX=

c

Specifies the character that marks the end of a field name in a punch mask. Valid characters are <|&$*%_>:#@ plus a blank but the default of “>” should not be overridden unless you need to use that character as data in the mask.

Default: >.

MASKNAME=

mem

Specifies the member of the data set pointed to by the ddname specified in the operand FDRLIB is to be used as a mask for the RPTYPE=SELPCH output. The FDRLIB data set must be partitioned (PO). Either FDRLIB= or MASKNAME= must be specified.

MAXSTATEMENTS=

nnnn

Specifies the number of control statements that can be present in any single punch mask. The number may be a value from 10 to 4000, inclusive.

Default: 400.

SYMBOLS=

Specifies one or more user-defined field names that can be specified in the punch mask. The corresponding value of each field name must be specified by a VALUES= operand. This can be used to insert variable information (for example, security or accounting parameters) in a punch mask.

VALUES=

Used with the SYMBOLS= operand to specify the values of the user-defined fields to be substituted in the punch mask. There must be as many values specified as there are field names in the SYMBOLS= operand.

STARTINGPASUNIT=

ENDINGPASUNIT=

PASINCREMENT=

Used when the PUNCH statement is used to generate control statements for FDRPAS (FDRPAS is a separately licensed and separately documented product for the non-disruptive movement of online volumes to new devices). The operands specify the starting, ending, and incremental values for $$CPASUN, the field name used for FDRPAS target devices.

STARTINGPASUNIT=uuuu

Specifies a 4-digit hexadecimal starting value for $$CPASUN, the first offline FDRPAS target device.

ENDINGPASUNIT=uuuu

Specifies a 4-digit hexadecimal ending value for $$CPASUN, the last offline FDRPAS target device.

PASINCREMENT=nn

Specifies a 1- or 2-digit decimal value, used to increment $$CPASUN. It defaults to 1.

See FDREPORT-Punch-Examples for examples of the use of these operands.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*