Function modifiers
Function modifiers alter or control the way functions operate. Three function modifiers are available: ALL, BACK, and MEMBER. Brief descriptions of function modifiers are given in Function and Modifier Descriptions. This section discusses the use and format of the three function modifiers and provides example control statements.
ALL (A)
The ALL modifier allows a function to process an entire data set, regardless of selection criteria. In addition, groups of parameters may be used to perform multiple sub functions against a single record. You can form these groups by contiguously coding IF parameters separated by action or limiting parameters.
The ALL modifier has no effect on the number of records that are printed. Refer to OUT (O) to control the printing of output records.
The ALL modifier may be appended to functions as follows:
- COPYALL (CA)
- DUMPALL (DA)
- FPRINTALL (FPA)
- LISTALL (LA)
- PRINTALL (PA)
- UPDATEALL (UA).
- VPRINTALL (VPA)
Example:
IF=(5,EQ,C’2’),REPL=(30,C’1’)
This example copies the entire data set whether any record matches the criteria or not. A REPL operation is applied to any record that matches either of the IF criteria.
BACK (B)
The BACK modifier allows backward processing of all record formats within any sequential or VSAM data set. File-AID ignores the BACK modifier when used with data sets of other access methods and defaults to forward processing.
The BACK modifier may be appended to functions as follows:
- COPYBACK (CB)
- DUMPBACK (DB)
- FPRINTBACK (FPB)
- LISTBACK (LB)
- PRINTBACK (PB)
- SPACEBACK (SB).
- VPRINTBACK (VPB)
All parameters may be used with this modifier.
The BACK modifier cannot be specified with the APRINT, COMPARE, DROP, RLPRINT, SCPRINT, TALLY, UPDATE, USER, VTOCDSN, VTOCINFO, VTOCMAP, and XRPRINT functions.
Example:
This example dumps the last 100 records of the input dataset.
When a function that uses the BACK modifier is followed by another function that uses the BACK modifier, the second function begins where the first function stopped.
For example, when the following control cards are run against a 100-record input file, File-AID lists records 90 through 81.
$$DD01 LISTBACK OUT=10
However, when a function that uses the BACK modifier is followed by another function that does not use the BACK modifier, the second function begins with the first record in the file.
In the following example, a common misunderstanding is that it would list the last 10 records of the file. Instead, File-AID lists the first 10 records of the input file.
$$DD01 LIST OUT=10
When File-AID’s processing direction is reversed (that is, from forward to backward or backward to forward), it must close and reopen the file which loses the file position of the previous function.
MEM (M)
The MEM modifier selects members in a PDS based on the content of the member. MEM allows File-AID to search for specific data conditions within each member, and then to process the entire member if the condition is found.
Append the MEM modifier to functions as follows:
- COPYMEM (CM)
- DUMPMEM (DM)
- FPRINTMEM (FPM)
- LISTMEM (LM)
- PRINTMEM (PM).
- VPRINTMEM (VPM)
Example:
This example lists all records of any member that contains a JCL statement with the string DSN=PROD. and either of the strings DISP=SHR or DISP=OLD.