or the entire dataset. Additional PDS support treats JCL records as logical information. Record processing and information retrieval are extremely fast, thus speeding up programmer activities. You can perform the below-mentioned task using FILEAID
$$DD01 COPY MOVE=(1,20,1),MOVE=(76,10C’ ‘) REFORMAT FILES
Above FILEAID action requests consist of the following:
The first element on a File-AID/Batch control statement is the dataset identifier. This identifier connects an input dataset DD to a function that you want to perform. You can include multiple control statements in one execution of File-AID/Batch to perform several actions on the same file or as many as 99 different files if needed.
| FILEAID Function | Description |
| APRINT | Prints the audit trail file in formatted, character, or hexadecimal format. |
| COMPARE | Compares the contents of two files. |
| CONVERT | Converts existing File-AID Release 6.5 and below selection tables and Release 7 XREFs to File-AID’s Release 8 new XREF format. Also converts Release 7 saved selection criteria to Release 8 selection criteria format. |
| COPY | Copies data selectively or non selectively. |
| DROP | Eliminates unwanted records from a dataset while copying it. |
| DUMP | Prints datasets in vertical hexadecimal format. |
| FPRINT | Prints one or more records in formatted mode in a COBOL or PL/I record layout. |
| LIST | Prints alphanumeric data. |
| Prints alphanumeric data and labels each record with its record number and RBA. | |
| 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 dataset containing selection criteria created from File-AID online functions. |
| SPACE | Moves the current record pointer through the input file. |
| TALLY | Allows selection parameters to be combined with ACCUM parameters to provide audit-type totals for files. |
| UPDATE | Alters records on a file. |
| USER | Performs a copy function that provides greater control over the writing of output records and datasets. |
| VTOCDSN | Displays VTOC summary information and dataset names in alphabetical sequence based on the specified parameters. |
| VTOCINFO | Displays volume information based on the specified parameters. |
| VTOCMAP | Displays volume information and datasets in address location sequence based on the specified parameters. |
| XRPRINT | Prints record layout cross reference (XREF) dataset. |
Parameters are described below, grouped according to type.
| FILEAID Parameter Type | Description |
| SELECTION | Specifies the processing of records based on their contents. AND, IF, ORIF. |
| ACTION | Indicates movement or change of data. ACCUM, EDIT, EDITALL, MOVE, REPL, REPLALL, WRITE. |
| CONTROL | Defines basic environment conditions during execution. ABEND, CEM, CHARSET, DSN, ERRS, FEOV, FORM, IOEXIT, KEY, LAYOUT, LPI, MAP, MAXENT, MAXOUT, MEMBER, MEMBERS, NEWMEM, NEWMEMS, PADCHAR, PDSSTAT, RBA, RDW, REFOUT, RLM, RLPRINT, RRN, SHOW, TYPE, UNIT, VOLSER, VOLSTAT. |
| LIMIT | Places record count limits on the datasets being processed. DROP, IN, OUT, SELECT, STOP. |
| Provides a hardcopy report of records being processed. DUMP, LIST, FPRINT, PRINT. |
| Parameter Type | Purpose | Examples |
|---|---|---|
| Functions | COPY, DROP, FPRINT, LIST, REFORMAT, UPDATE | COPYALL FORM=JCL |
| Selection | IF, AND, ORIF conditions | IF=(1,EQ,C’TEST’) |
| Action | MOVE, EDIT, REPL, ACCUM | MOVE=(1,20,1), EDIT=(45,30C’NEW’) |
| Control | FORM=JCL, MEMBER=NAME, RBA, LAYOUT | FORM=JCL, MAXOUT=1000 |
| Limits | IN=500, DROP=10, STOP=1000 | DROP=50 |
//REFORMAT JOB REST OF CARD //STEP1 EXEC PGM=FILEAID //STEPLIB DD DSN=STEPLIB //SYSPRINT DD SYSOUT=* //DD01 DD DSN=INPUTFILE,DISP=SHR //DD01O DD DSN=OUTPUTFILE, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(CYL,(X,Y),RLSE), // DCB=(RECFM=FB,LRECL=ZZZ,BLKSIZE=0) //SYSIN DD * $$DD01 COPY MOVE=(1,20,1), MOVE=(21,30,45), MOVE=(51,25,21), MOVE=(76,10C’ ‘) /*
The MOVE parameter is used to indicate the required changes.
This is a classic pattern for restructuring flat records during a migration.
//PDSUPDT JOB REST OF CARD
//STEP1 EXEC PGM=FILEAID
//STEPLIB DD DSN=STEPLIB
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=OLDLIB,DISP=SHR
//DD01O DD DSN=NEWLIB,DISP=OLD
//SYSIN DD *
$$DD01 COPYALL FORM=JCL,
EDIT=(3,0,C’UNIT=DISK,UNIT=TESTDA,UNIT=3350’,
C’UNIT=SYSDA’),
REPL=(3,0,C’SPACE=(TRK’,C’SPACE=(CYL’)
/* File-AID treats JCL as logical records so that all conditions could be looked for at once and it also processes through an entire PDS. A copy is made of the original PDS and changes are made as the records are copied. DD01 indicates the input file and DD01O is the output file. FORM=JCL tells File-AID/MVS to look for logical continuations. EDIT looks for three (3) possible UNIT values and changes them all to SYSDA. REPL searches for a SPACE value of TRK and changes it to CYL.
//MYCHANGE EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=MY.FLAT.DATASET
//DD02 DD DISP=SHR,DSN=MY.MEMBER.DATASET
//SYSIN DD *
$$DD01 UPDATE EDIT=(1,0,C"TIME=1440",C"TIME=30")
$$DD02 UPDATE MEMBER=UPDTMBR,
EDIT=(1,0,C"TIME=1440",C"TIME=30")
/* The first line in SYSIN processes the dataset referred to by DD card DD01. The UPDATE parameter tells FILEAID that the dataset must be updated and the parameter EDIT= tells FILEAID how to change the dataset. In this case, the first text will be substituted by the second text. The second line in SYSIN processes not surprisingly the dataset referred to by DD card DD02, but the processing is limited to the member named UPDTMBR. The rest is exactly the same and works accordingly.
TIME=1440 to TIME=30 in MY.FLAT.DATASET.UPDTMBR in the PDS and applies the same edit. //REPLACE JOB REST OF CARD
//STEP1 EXEC PGM=FILEAID
//STEPLIB DD DSN=STEPLIB
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=JCL.LIB,DISP=OLD
//SYSIN DD *
$$DD01 UPDATEALL FORM=JCL,
EDIT=(3,0,C’UNIT=TAPE’, C’UNIT=(TAPE,,DEFER)’),
IF=(1,EQ,C’//SORTWK’),IF=(10,0,C’CYL’),
REPL=(+0,C’TRK’),
IF=(3,30,C’SYSOUT=A’),REPL=(+7,Cí*í)í, LIST=0
/* By using the function UPDATEALL, each record in the PDS was checked against each possible change. First, the UNIT parameter was checked (EDIT was used because the length of the data was changing). Next, the record was examined for the SORTWORK DD name and the CYL value. Two IF parameters indicate an AND condition to File-AID/MVS Batch. The REPL parameter processes a character-for-character overlay (so it was used when the data length was the same). With a relative position of the current location in the record (+0), CYL was changed to TRK. Using the same process, SYSOUT was changed from ‘A’ to ‘*’. All of the changed records were printed with the LIST parameter. The output from the LIST parameter is written as the SYSTOTAL DD. If the SYSLIST DD is not found or not coded, the LIST output is written to the end of the SYSPRINT DD. This same change logic could be used with a COPY function to modify records as they are copied to a new file.
To keep your FILE-AID batch processing efficient and safe:
OUTER JOIN Queries are a valuable tool in SQL, allowing you to retrieve data from…
DFSORT is your go‑to utility for sorting, merging, and transforming data. ICETOOL Utilities takes DFSORT…
VSAM REPRO command is used to copy data from one file(Input file) to another file(Output…
The Product Owner role has shifted from just being a requirements proxy to a strategic,…
Business Value: In the world of Agile development, the user story has long been the…
The SAFe Scrum Master certification has become one of the most sought-after credentials for Agile…
The Professional Scrum with Kanban (PSK) course enhances your organization's ability to deliver value efficiently…
Effective User interviews play a crucial role in Scrum methodology, helping Product Owners and Scrum…
Product Owners should be well-versed in various user research tools and techniques to effectively understand…