Accessing and using File-AID/Batch
Calling File-AID/MVS from REXX
It is possible to call File-AID/MVS from REXX (or CLIST). The following example shows one technique for calling XFAFAID (PGM=FILEAID is an alias of XFAFAID) in your File-AID load library and pass any parameters if needed. Your REXX can be executed ONLINE or in a TSO batch program such as IKJEFT02.
If your site uses (has content in) the customized load library, hlq.CXVJLOAD, it must be allocated to the session or batch job prior to executing the REXX. Do this either with:
- Explicit ISPF allocation (ONLINE)
- System LINKLST (ONLINE or BATCH)
- TSOLIB (TSO BATCH)
- STEPLIB DD (TSO BATCH)
If the hlq.CXVJLOAD at your site is empty or not allocated for File-AID (see your TSO administrator), it is not required for REXX execution. If you encounter a CMSC error executing your REXX, this is usually an indication that your site does not have a default CMSC definition set up for File-AID and you likely need a XVJSFX module normally found in CXVJLOAD.
Example:
ADDRESS tso
/************* OBJECT *************/
/* */
"ALLOC F(SYSPRINT) dataset(*)"
"ALLOC F(SYSN) DA('tsoid01.LOGON.CNTL(SYSIN1)') SHR"
"ALLOC F(DD01) DA('tsoid01.LOGON.CNTL(INPUT1)') SHR"
"ALLOC F(DD01O) DA('tsoid01.LOGON.CNTL(OUTPUT1)') SHR"
"CALL 'hlq.SXVJLOAD(XFAFAID)'",
" 'SYSIN=SYSN'"
"FREE F(SYSPRINT,SYSN,DD01,DD01O)"
Function and modifier descriptions
A function is a code word that describes the operation you want done on an input data set. A function modifier is a code word appended to a function that changes or controls the way the function operates. Function modifiers are used in File-AID/Batch to enhance the capabilities of functions. The following three function modifiers are available:
- ALL: Allows a function to process an entire data set.
- BACK: Permits backward processing of all record formats of sequential and VSAM data sets.
- MEM: Selects members within a PDS based on the content of the member.
The following table shows a brief description of each function and the modifiers that apply to it. Detailed descriptions and examples of functions and their modifiers are discussed in Functions and Modifiers.
Function Descriptions
Function | Modifiers | Description |
---|---|---|
APRINT | Prints the audit trail file in formatted, character, or hexadecimal format. | |
COMPARE | Compares the contents of two files. | |
COPY | ALL, BACK, MEM | Copies data and reports the number of records and/or PDS members copied. |
DROP | Eliminates unwanted records from a data set while copying it. | |
DUMP | ALL, BACK, MEM | Prints records in vertical hexadecimal format. |
FPRINT | ALL, BACK, MEM | Prints data formatted according to a COBOL or PL/I record layout. |
LIST | ALL, BACK, MEM | Prints alphanumeric data as entered while printing packed and binary data as blanks. |
LMODCLAS | Lists PDSE binder classes. | |
LMODDIR | Lists directory(ies) of member(s). | |
LMODMAPA | Lists modules (maps CSECTs) in address order. | |
LMODMAPN | Lists modules (maps CSECTs) in name order. | |
ALL, BACK, MEM | Prints alphanumeric data and labels each record with its record number and record length. | |
REFORMAT | Reformats data as it is being copied. | |
RLPRINT | Prints a COBOL or PL/I record layout displaying the field level, field name, format, field number, start location, end location, and field length. | |
SCPRINT | Prints the data set containing selection criteria created from File-AID online functions. | |
SPACE | BACK | Moves current record pointer forward or backward a specified amount. |
TALLY | Reads a data set and accumulates fields specified by ACCUM parameters. | |
UPDATE | ALL | Updates records in place as specified by an action parameter. |
USER | Copies records based on user-defined conditions to one or more output data sets. | |
VPRINT | ALL, BACK, MEM | Prints data vertically formatted according to a COBOL or PL/I record layout. |
VSAMDEL | Deletes a VSAM data set. | |
VSAMDR | Deletes and immediately re-defines VSAM clusters and alternate indexes. | |
VSAMINFO | Produces a report that uses the same layout as the online report. | |
VSAMRN | Renames a VSAM data set. | |
VTOCDSN | Displays volume and data set information in dataset name sequence. | |
VTOCINFO | Displays volume information. | |
VTOCMAP | Displays volume and data set information in address location sequence. | |
XMLGEN | Creates XML documents from existing files using COBOL or PL/I layout fields as the tag names. | |
XRPRINT | Prints record layout cross reference (XREF) dataset. |
Parameter descriptions
Parameters are code words that control or limit processing actions. The following table gives a brief description of each parameter. Detailed descriptions and examples are given in File-AID-Batch-parameters.
Parameter Descriptions
Parameter | Description |
---|---|
ABEND | Alters default abend handling procedures |
ACCUM | Accumulates totals while a function is executing |
AMODE | Specifies the address mode to select |
AND | Creates a logical AND condition when used with an IF parameter |
AUDIT | Creates Audit trail dataset and writes before and after images of changed/unchanged records |
CCSID | Specifies the valid coded character set identifier (CCSID) for the EBCDIC code page so that File-AID converts Unicode UTF-8 or UTF-16 data to EBCDIC when format-printing characters |
CEM | Copies empty members of a partitioned dataset |
CHANGED | Select a group of members from a PDS based on a range of last modified dates |
CHANGEX | Excludes a group of members from a PDS based on a range of last modified dates |
CHARSET | Specifies which language to use |
COMPARERC | Overrides configuration parameter UNEQUAL_COMPARE_RETURN_CODE |
COPTNS | Specifies additional options for condensed compare reports |
CPLRO | Specifies to include compiler options for load modules will be included in the report |
CREATED | Select a group of members from a PDS based on a range of creation dates |
CREATEX | Excludes a group of members from a PDS based on a range of creation dates |
DFLT_WRITE | Specifies a default output file to use during a USER function |
DROP | Controls maximum number of records dropped by the DROP function |
DSNAME | Limits VTOC processing to a specified dataset name |
DUMP | Prints records in hexadecimal format |
EDIT | Changes first occurrence of data in a record |
EDITALL | Changes multiple occurrences of data in a record |
ELSE | Enables you to code actions to perform when the preceding conditional statement is false |
ERRS | Defines the number of allowable data checks per volume per execution |
EXPAND | Specifies whether to expand the nested CA Librarian or CA Panvalet INCLUDE statements |
EXPAND_OCCURS | When a record layout contains an OCCURS or ODO, it specifies to print all occurrences (YES) or only the first occurrence of each field |
FEOV | Forces end-of-volume (EOV) processing for the output tape data set when the input tape data set reaches EOV |
FIELDS | Defines the fields to include from each record in the VPRINT vertical formatted print report |
FILLER | Specifies whether filler fields will be printed or not. This parameter is valid only for the FPRINT and VPRINT functions |
FORM | Controls processing when JCL is read, updated, or printed. Also controls whether multiple passes are made on a data set, audit report format, and other options. |
FPRINT | Prints data formatted according to a COBOL or PL/I record layout |
IF | Selects records for a function based on selection criteria |
IFNOT | Selects specific records that do NOT contain the specified data value |
IN | Controls the number of records read for processing |
INVALID | Specifies how to process invalid data fields with the XMLGEN function |
INVALIDCHAR | Specifies whether character fields that include unprintable characters will be printed as ‘INVALID’ or not |
IOEXIT | Specifies input and output I/O exit names |
KEY | Processes data beginning with a specific key |
LANGTYPE | Selects members based on CA Panvalet language type |
LAYOUT | Specifies DDxxRL dataset member for FPRINT function or parameter |
LINKDATE | Selects a group of members from a PDS based on the member's link date |
LIST | Prints alphanumeric data without record number or record length |
LPI | Specifies lines per inch when printing |
MAP | Specifies DDxxRL dataset member for FPRINT function or parameter. Alias of LAYOUT |
MAXENT | Extends area in which File-AID parameter information is stored beyond the default limit |
MAXOUT | Processes more than eight user-controlled output data sets per execution |
MBRMASK | Selects groups of members from a PDS using a mask |
MBRNAME | Select a group of members from a PDS based on a range of member names |
MBRNAMX | Excludes a group of members from a PDS based on a range of member names |
MEMBER | Processes specified member within a PDS |
MEMBERS | Selects groups of members from a PDS using a mask |
MEMBERX | Excludes groups of members from a PDS using a mask |
MEMNAMELENGTH | Limits member selection from a PDS to members that match the specified name length |
MOVE | Builds output record by moving data to it |
NEWMEM | Names a new member of an output PDS |
NEWNAME | Provides the new name for the VSAMRN function |
NEWMEMS | Names multiple new members of an output PDS using a mask |
NORECCOPYRC | Overrides configuration parameter NO_RECORDS_COPIED_RETURN_CODE |
ORIF (OR) | Creates a logical OR condition when used with a preceding IF parameter |
ORIFNOT | Selects specific records that do NOT contain the specified data value |
OUT | Controls maximum number of records written to output data set |
PADCHAR | Specifies fill value used when lengthening a record |
PANSTAT | Selects members based on CA Panvalet status type |
PDSSTAT | Maintains PDS member statistics when updating partitioned data sets |
PRESERVE | Maintains trailing blanks (spaces) in variable length records. Valid only for COPY and USER |
Prints alphanumeric data with record number and record length | |
PRINTMIXEDCASE | Overrides configuration parameter PRINT_UPPERCASE_OR_MIXED |
PRTRECS | Specifies whether to include changed, inserted, deleted, and matched records in the Compare report |
RBA | Begins function at a relative byte/block address (RBA) |
RDW | Controls inclusion/exclusion of record descriptor word (RDW) during variable-length record processing |
READNEXT | Ends processing of the current record and starts the function over with the next record |
REFOUT | Specifies which record to copy when executing a reformat definition |
REPL | Replaces first occurrence of data in a record with other specified data |
REPLALL | Replaces multiple occurrences of data in a record with other specified data |
RLM | Controls the replacing of PDS members when copying |
RLPRINT | Prints the associated record layouts when printing XREFs (XRPRINT function only) |
RMODE | Specifies the residency mode to select |
RRN | Specifies a relative record number for VSAM RRDS and BDAM files |
SELECT | Selects every nth occurrence of a record for processing |
SHOW | Specifies the report format for a record layout printed with the FPRINT function |
STOP | Stops function when a given condition is found |
TRUNCRC | Overrides configuration parameter RECORD_TRUNCATION_RETURN_CODE |
TYPRUN | Specifies to validate the compare criteria file without comparing the data |
UNIT | Specifies a generic unit name for VTOC functions |
USERID | Select a group of members from a PDS based on a range of user IDs |
USERIDX | Excludes a group of members from a PDS based on a range of user IDs |
VOLSER | Specifies a volume serial number for VTOC functions |
VOLSTAT | Specifies a volume status for VTOC functions |
VPRINT | Prints data vertically formatted according to a PL/I or COBOL record layout |
WRITE | Writes newly created record to output data set (USER function only) |
ZERO | Specifies whether numeric fields will be printed with leading zeros or not. This parameter is valid only for the FPRINT and VPRINT functions |
Parameters are grouped according to type. The following parameter types are used:
Types | Description |
---|---|
Action | Indicates movement or change of data. |
Control | Defines basic environment conditions during execution. |
Limit | Places record count limits on the data sets being processed. |
Provides hardcopy audit of records being processed. | |
Selection | Specifies processing of records based on their contents. |
Parameters included in each type are listed in the following table.
Parameter Types
Type | Parameters |
---|---|
Action | DFLT_WRITE, EDIT, EDITALL, MOVE, READNEXT, REPL, REPLALL, TYPRUN, WRITE |
Control | ABEND, AMODE, CCSID, CEM, CHANGED, CHANGEX, CHARSET, COMPARERC, COPTNS, CPLRO, CREATED, CREATEX, DSNAME, ERRS, EXPAND, EXPAND_OCCURS, FEOV, FIELDS, FILLER, FORM, INVALID, INVALIDCHAR, IOEXIT, KEY, LANGTYP, LAYOUT, LINKDATE, LPI, MAP, MAXENT, MAXOUT, MBRMASK, MBRNAME, MBRNAMX, MEMBER, MEMBERS, MEMBERX, MEMNAMELENGTH, NEWMEM, NEWMEMS, NEWNAME, NORECCOPYRC, PADCHAR, PANSTAT, PDSSTAT, PRESERVE, PRINTMIXEDCASE, PRTRECS, RBA, RDW, REFOUT, RLM, RMODE, RRN, SHOW, STOP, TRUNCRC, UNIT, USERID, USERIDX, VOLSER, VOLSTAT, ZERO |
Limit | DROP, IN, OUT, SELECT |
ACCUM, DUMP, FPRINT, LIST, PRINT, RLPRINT, VPRINT | |
Selection | AND, ELSE, IF, ORIF, IFNOT, ORIFNOT |