This section on File-Aid Tips provides examples of File-AID control cards that solve specific problems. We try to organized example here as follows:
State the problem
Show the control cards required and the JCL
However, as multiple members can post in here - the above order might distort in between. If you see that's happening have a feedback on it, please post use back here: Follow up on Tips
COBOL and PL/I Data Format Abbreviations
Please go through these data format abbreviations which are used by File-AID when the FPRINT function or parameter is used to print records with the SHOW=FORMAT parameter - you can refer this post when you see FPRINT being used. Table 1: COBOL data format abbreviations
COBOL Data Format Abbreviations.jpg
Table 2: PL/I data format abbreviations
PLI Data Format Abbreviations.jpg
PS.: Click on pictures for a better quality view.
You do not have the required permissions to view the files attached to this post.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
//JOBNAME JOB JOB CARD INFORMATION
//STEPNAME EXEC PGM=FILEAID,REGION=?
//STEPLIB DD DSN=File-AID LOAD LIBRARY NAMES
//STEPCAT DD DSN=CATALOG NAME
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DDxx DD DSN=INPUT DATASET NAME
//DDxxO DD DSN=OUTPUT DATASET NAME
//DDxxRF DD DSN=REFORMAT DEFINITION DATASET NAME
//DDxxRL DD DSN=RECORD LAYOUT DATASET NAME
//DDxxRLN DD DSN=COMPARE NEW DATASET - RECORD LAYOUT DATASET NAME
//DDxxXR DD DSN=XREF DATASET NAME (XREF MEMBER)
//DDxxXRN DD DSN=COMPARE NEW DATASET - XREF DATASET NAME (XREF MEMBER)
//DDxxSC DD DSN=SELECTION CRITERIA DATASET NAME (SC MEMBER)
//DDxxSCN DD DSN=COMPARE NEW DATASET - SELECTION CRITERIA DATASET NAME (SC MEMBER)
//DDxxCP DD DSN=COMPARE CRITERIA DATASET NAME
//DDxxC DD DSN=NEW COMPARE DATASET NAME
//DDxxCOn DD DSN=NEW COMPARE OUTPUT FILES
//ANYNAME DD DSN=OUTPUT DATASET NAME
//SYSIN DD * (CONTROL CARDS)
/*
//
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
5. This example show how to use AND and IF together.
This Job copy those records which has character '9999' at location 8 and characters not equal to 'AD' at location 22 or character '123' at location 9 and '1' at location 60.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
6. Below JCL shows how to use COPY, IF, OUT and PRINT in File-Aid batch Job. The JCL copies the first 9 records that contain the characters '675' at position 11. It also prints the first 5 selected records, these records are printed in the File-Aid's DD SYSLIST.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
10. Below Job is a combination of COPY, SELECT, OUT and IF. It creates an extract file of every fourth input record that contains a value of '123' at location 8. A maximum of 100 such records are copied.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
11. Using pointer mechanism: The SPACE function is used to position the pointer at a specific record. The first control card places the pointer at the 25th record. The second control card copies the next 6 records.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
13. Following Job replaces the string 'AAAA' with the string 'BBBBBBBB'. When the longer new data is inserted then the fields are shifted and when required compressed for spaces.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
15. When you want to verify a file which has got many fields and you want to check 2 or 3 fields - file-aid provides a means to do that. For example, if you want to check only 1st, 2nd and 8th fields in the file, issue, DISPLAY 1,2,10 ONLY on command line and it'll display only these fields once you are browsing the file using a copybook layout.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
16. Following JCL shows a combination of UPDATE, IN and REPLACE.
This Job will make permanent changes to an existing data set. Two UPDATEs used in the Job - The first update places the pointer at a particular record and the second UPDATE replaces the data.
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.