JCL

FILEAID in Batch Mode with Examples

FILEAID is an interactive software product that increases data processing productivity in both program development and daily file and records maintenance. It is a data manipulation program that consolidates the functions of many standard IBM utilities. FILE-AID combines the data and file processing of the following nine IBM utilities into one tool.These utilities are IDCAMS, IEBGENER, IEBPTPCH, IEBISAM, IEBCOPY, IEBUPDTE, IEBDG, IEHMOVE, IEHPROGM. File-AID browses, edits, allocates, compares, copies, deletes, and prints files of any standard MVS access method. For a partitioned dataset (PDS), you can browse, edit, and copy an individual member
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

  • Process data on tape or in very large, multi-volume disk files.
  • Selectively edit, copy, reformat, total, compare, and print records contained in any standard MVS file type.
  • Define a file processing task that may be run multiple times.
  • Generate DASD reports of VTOC information.
  • Copy records or portions of records from one dataset type to another, including copying of PDS members based on ISPF statistics.
  • Selectively print data records using record layouts, enabling you to tailor the format of the output to meet your specific data requirements.
  • Change record format by reformatting any type of dataset (that is, enlarge data fields, add new data fields).
  • Process datasets selectively to view or update information.
  • Recognize logical JCL continuations for JCL changes and search conditions.
  • Accumulate totals to verify reports.
  • Read all VSAM and sequential datasets forward or backward.
  • Reformat multiple record type files in one pass.
  • Create a complete subset of related files for testing.
  • Check control statement syntax online and execute actions in the foreground with File-AID’s Interactive utility.
  • Generate the JCL required to submit a File-AID/Batch job or any other non File-AID batch utility with File-AID’s Batch Submit utility.

FILEAID Batch Processing Request Format

$$DD01 COPY MOVE=(1,20,1),MOVE=(76,10C’ ‘)  REFORMAT FILES

Above FILEAID action requests consist of the following:

  • Dataset identification label – $$DD01
  • Name of the function – COPY
  • Set of optional selection, action, and control parameters – MOVE=(1,20,1),MOVE=(76,10C’ ‘)
  • Comments – REFORMAT FILES

Dataset identification label

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

FILEAID FunctionDescription
APRINTPrints the audit trail file in formatted, character, or hexadecimal format.
COMPARECompares the contents of two files.
CONVERTConverts 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.
COPYCopies data selectively or non selectively.
DROPEliminates unwanted records from a dataset while copying it.
DUMPPrints datasets in vertical hexadecimal format.
FPRINTPrints one or more records in formatted mode in a COBOL or PL/I record layout.
LISTPrints alphanumeric data.
PRINTPrints alphanumeric data and labels each record with its record number and RBA.
REFORMATReformats data as it is being copied.
RLPRINTPrints a COBOL or PL/I record layout displaying the field level, field name, format, field number, start location, end location, and field length.
SCPRINTPrints the dataset containing selection criteria created from File-AID online functions.
SPACEMoves the current record pointer through the input file.
TALLYAllows selection parameters to be combined with ACCUM parameters to provide audit-type totals for files.
UPDATEAlters records on a file.
USERPerforms a copy function that provides greater control over the writing of output records and datasets.
VTOCDSNDisplays VTOC summary information and dataset names in alphabetical sequence based on the specified parameters.
VTOCINFODisplays volume information based on the specified parameters.
VTOCMAPDisplays volume information and datasets in address location sequence based on the specified parameters.
XRPRINTPrints record layout cross reference (XREF) dataset.

FILEAID Parameter

Parameters are described below, grouped according to type.

FILEAID Parameter TypeDescription
SELECTIONSpecifies the processing of records based on their contents. AND, IF, ORIF.
ACTIONIndicates movement or change of data. ACCUM, EDIT, EDITALL, MOVE, REPL, REPLALL, WRITE.
CONTROLDefines 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.
LIMITPlaces record count limits on the datasets being processed. DROP, IN, OUT, SELECT, STOP.
PRINTProvides a hardcopy report of records being processed. DUMP, LIST, FPRINT, PRINT.

Example: This record needed to be modified to change the sequence of some of the fields. Also, the new record had to be 10 bytes longer than the original. This was accomplished by using the COPY function in File-AID.

//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. The first MOVE keeps the original 20 bytes in the same position. The second MOVE takes the 30 bytes of data that was in location 45 and puts it after the first 20 bytes. Then the 25 bytes that originally started in position 21 are moved. To lengthen the record, 10 blanks were moved to the end of the new record.

Example: We have a requirement to mass update all the production PROCS to change UNIT to SYSDA instead of DISK, TESTDA, 3350, and SPACE to CYL instead of TRK.

//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.

Example: A developer wants to change a text to another text. It doesn’t matter which position the text begins and after the change data is shifted left or right depending on whether the change has made the record longer or shorter. If the record has been made longer the rightmost positions are lost, because File-Aid/Batch always maintains the original record length. If the record was shortened, blanks are appended to the record.

//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.

Example: All SORTWORK DD’s had to change from CYL to TRK. The parameter UNIT=TAPE had to be UNIT=(TAPE,,DEFER). Also, the SYSOUT parameter had to change from ‘A’ to ‘*’.

 //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.

FILEAID Reference Manual: ClickHere

Admin

Share
Published by
Admin

Recent Posts

Increase Transparency and Collaboration Product Backlog

A well-maintained product backlog is crucial for successful product development. It serves as a single…

2 months ago

Product Backlog – Incremental value to the customer

Incremental value to the customer refers to the gradual delivery of small, functional parts of…

2 months ago

Product Market, Customer’s Desire, Need, and Challenges

A Product Market refers to the group of potential customers who might be interested in…

2 months ago

PAL-EBM Professional Agile Leadership – EBM Certification

The Professional Agile Leadership - Evidence-Based Management (PAL-EBM) certification offered by Scrum.org is designed for…

5 months ago

PAL I Professional Agile Leadership Certification

The Professional Agile Leadership (PAL I) certification, offered by Scrum.org, is designed to equip leaders…

5 months ago

Scrum Master Certification: CSM, PSM, SSM

Choosing the right Scrum Master Certification depends on your current experience and career goals. If…

7 months ago