customer uses of - cps4it · customer uses of file-aid/mvs batch 09/22/03

34
Customer Uses of File-AID/MVS Batch Copyright © 1999-2003 Compuware Corporation

Upload: nguyenkhanh

Post on 23-Apr-2018

225 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses ofFile-AID/MVS Batch

Copyright © 1999-2003 Compuware Corporation

Page 2: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 2

File-AID/MVS Batch ...

Provides the power of File-AID/MVS in the batch environment. It combines the dataand file processing of the following nine IBM utilities into one powerful tool.

IDCAMSIEBGENERIEBPTPCHIEBISAMIEBCOPYIEBUPDTEIEBDGIEHMOVEIEHPROGM

With only one tool you can print, update, copy, select, reformat any file or data type. Onetool with the same coding format for all of these processes means that only one utility mustbe learned.

The following pages show some of the ways that File-AID customers have usedFile-AID/MVS Batch at their installations.

Page 3: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 3

File-AID/MVS Batch has been used by customers for many jobs other than just improvedproduction runtimes. These include:

· Tape Recovery

· Library Updating

· Reversing File Updates

· Creating Multiple Selective Copies

· Validating Production Results before Printing

· Merging Data from Several Records into One

· Multiple Control Cards

· Alternative to REPRO

· Reformat Files

· Modify JCL Libraries

· Mass Changes to JCL Libraries

· Copy to Unlike Access Methods

· Create Audit Report

· Split Record into Pieces

· Formatted Printing for Documentation

· Editing Critical VSAM-KSDS File

· Extract Related Data from Multiple Files

· Compress PDS Members

· Inserting a new Job Step

Page 4: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 4

· Comment out a Job Step

· Comparing Data in Two Fields

· Changing Letters from Upper to Lower Case

· Changing Alphanumeric Values to Hex Values

· Tallying and Accumulating Data

Page 5: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 5

TAPE RECOVERY

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD0l DD DSN=BROKEN.TAPE.FILE1,DISP=OLD,// UNIT=TAPE//DD01O DD DSN=RECOVER.DATA,UNIT=TAPE, //

DISP=(NEW,CATLG,DELETE),// DCB=(SAME AS INPUT)//DD02 DD DSN=BROKEN.TAPE.FILE2,DISP=OLD,// UNIT=TAPE//DD02O DD DSN=RECOVER.DATA,DISP=MOD,// UNIT=AFF=DD01O//SYSIN DD *$$DD01 COPY$$DD02 COPYBACK

During processing, a production tape snapped- resulting in two reels of tape. Both tapes willbe read in and copied to an output tape. The beginning of the reel will be read forward fromthe start to the break location. The end of the tape will be read backward from the end ofthe file to the break location. File-AID/MVS recovers all readable data from both halves.The resulting output tape must be sorted to correctly sequence the data.

File-AID has two input files, DD01 and DD02 that are the front and back half of the originaltape. These are copied onto output files, DD01O and DD02O. Both output files point to thesame dataset, RECOVER.DATA.

Page 6: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 6

LIBRARY UPDATING

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=OLD.LIB,DISP=SHR//DD01O DD DSN=NEW.LIB,DISP=OLD//SYSIN DD *$$DD01 COPYALL FORM=JCL,

EDIT=(3,0,C�UNIT=DISK,UNIT=SYSDA,UNIT=3350�,C�UNIT=3380�),REPL=(3,0,C�SPACE=(CYL�,C�SPACE=(TRK�)

/*

An insurance company needed to update 15,500 Procs because of changing from 3350 diskdrives to 3380 disk drives. They wanted to change the UNIT and SPACE parameters toeliminate over-allocating on the larger packs. They estimated that using ISPF it would takesix weeks, and decide to try File-AID/MVS instead. File-AID treats JCL as logical recordsso that all conditions could be looked for at once and it also processes through an entirePDS. The job was done in three hours.

A copy is made of the original PDS and changes are made as the records are copied. DD01indicates the input file and DD01O is the output file. FORM=JCL tells File-AID/MVS to lookfor logical continuations. EDIT looks for three (3) possible UNIT values and changes them allto 3380. REPLace searches for a SPACE value of CYL and changes it to TRK.

Page 7: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 7

REVERSING FILE UPDATES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=TEST.DATA.FILE,DISP=OLD//SYSIN DD *$$DD01 UPDATE REPL=(87,BX�01�)/*

An input file was accidentally run twice while testing a new system. This caused data to beposted twice on the processing dataset. In order to back out this second run, File-AID/MVSwas used to reverse the sign on the data in the input file. Then the job was run again. Thereverse sign had the effect of removing the data amounts. This eliminated the effects ofrunning the test data twice, while leaving the rest of the file data as it should have been.

The File-AID/MVS batch job was run against the update data file. By using the REPLaceparameter the sign bit was reversed (positive numbers became negative and negativenumbers became positive). This update run canceled out the incorrect duplicate run.

Page 8: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 8

CREATING MULTIPLE COPIES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=MASTER.FILE,DISP=OLD//SELECT1 DD DSN=SELECT1.FILE,UNIT=DISK,// DISP=(NEW,CATLG,DELETE),// SPACE=(CYL,(3,2)),// DCB=(RECFM=FB,LRECL=nnn,BLKSIZE=nnn)//SELECT2 DD DSN=VSAM.CLUST,DISP=OLD//SELECT3 DD DSN=SEL3.DATA,DISP=(NEW,CATLG),// UNIT=DISK,SPACE=(.... ),// DCB=(RECFM=FB,LRECL=nnn,BLKSIZE=nnn)//SELECT4 DD DSN=TEST.VSAM,DISP=OLD//SYSIN DD *$$DD01 USER IF=(27,EQ,X�15�),IF=(45,NE,P�0�),

WRITE=SELECT1, IF=(14,EQ,C�20,21,22�),IF=(20,6,C","), IF=(51,GT,C�1986�),WRITE=SELECT2, IF=(84,EQ,P�15�),IF=(18,GT,C�10�), WRITE=SELECT3, IF=(1,NE,X�00�),WRITE=SELECT4

/*

A large insurance company collects file selection requests through the week and uses thedata to construct File-AID/MVS control cards on the weekend. This allows them to makeone pass against a master file contained on 34 reels of tape and extract up to 99 variationsof the master file based on user selections.

This example has 4 files being created from a single input record (if it matches the variouscriterions). The input file is DD01 and the output files are SELECT1, SELECT2, SELECT3 andSELECT4. The WRITE parameter tells File-AID/MVS which file to write the record to ifthe selection condition is met. Each WRITE is controlled by the IF statements.

Page 9: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 9

VALIDATING PRODUCTION RESULTS

//JOBNAME JOB REST OF CARD//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//DD01 DD DSN=TAPE.MASTER,DISP=OLD,UNIT=TAPE//SYSIN DD *$$DD01 TALLY ACCUM=(15,�TOTAL AMOUNT�),

IF=(35,EQ,C�27�),ACCUM=(15,�DEPT 27�), IF=(35,EQ,C�14�),ACCUM=(15,�DEPT 14�)

/*

A manufacturing company has a master file made up of 76 reels of tape. A production jobruns against it to produce a report. Occasionally, one or more reels are not loaded and thereport is incorrect. The report is over 5,000 pages long.

A File-AID job is run to read in all 76 reels of tape. File-AID accumulates totals and reportsthem. The unprinted report is scanned for its totals and matched to the ones from File-AID.If the two are equal, the report is printed. Otherwise the report is rerun.

The output from the ACCUM parameter is written to the SYSTOTAL DD. If the SYSTOTALDD is not coded, then the ACCUM output is written to the end of the SYSPRINT DD.

In this example, File-AID is accumulating the value in location 15, which is a packed field.That total will be printed with the label TOTAL AMOUNT. A check is also being made on thedepartment indicator for department 27 and department 14. Separate totals are beingaccumulated for each department with a label.

Page 10: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 10

MERGING DATA

//JOBNAME JOB REST OF CARD ...//STBP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=CCCCC.DDDDDD.RRRRR,DISP=OLD//GOODFILE DD DSN=NEW.OUTPUT.FILE,DISP=// DCB=(//DUMMY DD DUMMY//SYSIN DD *$$DD01 USER IF=(1,EQ,C�A�),MOVE=(1,180,2),WRITE=DUMMY,

IF=(1,EQ,C�B�),MOVE=(181,84,51),WRITE=DUMMY, IF=(1,EQ,C�C�),MOVE=(264,18,20), MOVE=(281,50,19),WRITE=GOODFILE

/*

A Hospital kept information in a master file that contained all of its patient information.They only need financial information from this file to run certain operational reports. UsingFile-AID/MVS, it is possible to read the financial data from the records in the file andextract data from each record. This data is used to create a new record containing theselected data. These new records are constructed with data being read in from severalrecords.

DD01 is the input file. GOODFILE and DUMMY are user-defined output file DD names.File-AID is told to select data from record types �A�, �B� and �C�. Data from each record typeis then moved to an output buffer area. Both record type �A� and �B� have data moved in onelong stream. Record type �C� has data moved in two pieces. After the data from the "C"record is selected, the newly constructed record is written to the GOODFILE.

Page 11: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 11

MULTIPLE CONTROL CARDS

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=SOME.FILE,DISP=OLD//DD01O DD DSN=NEW.OUTPUT.FILE,DISP=// DCB=(//SYSIN DD *$$DD01 SPACE IN=500$$DD01 COPY IN=1000,SELECT=3$$DD01 UPDATE REPL=(27,EQ,C�05A�,C�6C5�)/*

A programmer had numerous jobs that ran in sequence against the same input file. Hewanted to create one job that would do everything he wanted to do. In File-AID/MVS anunlimited amount of control cards can be coded for a single input file. The only concern isthe sequence in which they are coded. When record count limits are used, the file is leftopen to that record position for the next control card. If the file is processed through theend, and there is a subsequent control card for the same file, that control card will not workbecause the previous function hit end-of-file.

In this example, File-AID first reads past the first 500 records on the input file DD01 byusing the SPACE function. Next it reads an additional 1000 records and selects every thirdone to COPY to the output file DD01O. From that point through the end of the file, recordposition 27 is modified from 05A to 6C5.

Page 12: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 12

ALTERNATIVE TO REPRO

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=TEST.SEQ.DATA,DISP=OLD//DD01O DD DSN=NEW.VSAM.CLUSTER,DISP=OLD//SYSIN DD *//DD01 COPY/*

For testing purposes, a large pharmaceutical company wanted to copy its records fromsequential files to VSAM files. The COPY function within File-AID/MVS provides a veryfast way to copy records from one file to another. The files can have like or unlike accessmethods. This example shows copying records from a sequential file (DD01) to a VSAMcluster (DD01O). Note that no indication of file type had to be given to File-AID. If onlycertain records were to be copied, then selection conditions could have also been coded.Since no record count limit was coded the entire file will be copied.

For a VSAM-KSDS the key data must be in ascending sequence for the load to processcorrectly. A VSAM error will be returned otherwise. If the output VSAM cluster is reusablethen the records will be replaced or inserted after the initial load.

Page 13: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 13

REFORMAT FILES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=INPUT.FILE,DISP=OLD//DD01O DD DSN=NEW.OUTPUT.FILE,DISP=OLD/ /SYSIN DD *$$DD01 COPY MOVE=(1,20,1),MOVE=(21,30,45),

MOVE=(51,25,21),MOVE=(76,10C� �)/*

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

The MOVE parameter is used to indicate the required changes. The first MOVE keeps theoriginal 20 bytes in the same position. The second MOVE takes the 30 bytes of data thatwas in location 45 and puts it after the first 20 bytes. Then the 25 bytes that originallystarted in position 21 are moved. To lengthen the record, 10 blanks were moved to the endof the new record.

Page 14: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 14

MODIFY JCL LIBRARIES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//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

/*

A JCL library needed to be modified. All SORTWORK DD�s had to change from CYL to TRK.The parameter UNIT=TAPE had to be UNIT=(TAPE,,DEFER). Also, the SYSOUT parameterhad to change from �A� to �*�.

By using the function UPDATEALL, each record in the PDS was checked against eachpossible change. First the UNIT parameter was checked (EDIT was used because the lengthof the data was changing). Next the record was examined for the SORTWORK DD name andthe CYL value.

Two IF parameters indicate an AND condition to File-AID/MVS Batch. The REPL parameterprocesses a character-for-character overlay (so it was used when the data length was thesame). With a relative position of the current location in the record (+0), CYL was changedto TRK.

Using the same process, SYSOUT was changed from �A� to �*�. All of the changed recordswere printed with the LIST parameter.

The output from the LIST parameter is written the SYSTOTAL DD. If the SYSLIST DD isnot 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 arecopied to a new file.

Page 15: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 15

MASS CHANGES TO JCL LIBRARIES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID,REGION=4M,PARM=TSO//STEPLIB DD DSN=FA.PROD.LOADLIB,DISP=SHR//*SYSLIST DD DSN=$$$$$$$.TEST.SEQ,DISP=(NEW,CATLG,DELETE),//* UNIT=SYSDA,SPACE=(TRK,(95,5),RLSE),//* DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)//SYSLIST DD DSN=$$$$$$$.TEST.SEQ,DISP=OLD//SYSPRINT DD SYSOUT=*//DD01 DD DISP=SHR,DSN=$$$$$$$.TEST.PDS//SYSIN DD *$$DD01 LIST OUT=0/*//STEP2 EXEC PGM=FILEAID,REGION=4M//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//DD01 DD DSN=$$$$$$$.TEST.SEQ,DISP=SHR//DD01O DD DSN=$$$$$$$.WITH.ESYLIB,DISP=OLD//SYSIN DD *$$DD01 COPYALL STOP=(1,EQ,C"//PROCLIB")$$DD01 COPYALL IN=1, E=(3,EQ,C"PROCLIB",C"ESYLIB JCLLIB"), R=(1,0,C"DD",C" "), E=(1,0,C",DISP=SHR",C" "), E=(1,0,C"DISP=SHR,",C" "), E=(1,0,C"DSN=",C"ORDER=("), IF=(1,0,C"ORDER=("), R=(+0,0,C" ",C",")$$DD01 COPYALL STOP=(1,NE,C"// "), IF=(1,EQ,C"// "), R=(1,C"@ "), R=(1,0,C"DD",C" "), E=(1,0,C",DISP=SHR",C" "), E=(1,0,C"DISP=SHR,",C" "), IF=(1,0,C"DSN="), R=(+0,0,C" ",C","), R=(1,0,C"DSN=",C" ")

Page 16: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 16

$$DD01 COPYALL STOP=(1,EQ,C"//PROCLIB")/*//STEP3 EXEC PGM=FILEAID,REGION=4M//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//DD01 DD DSN=$$$$$$$.WITH.ESYLIB,DISP=SHR//DD01O DD DSN=$$$$$$$.TEST.BACK1,DISP=OLD//SYSIN DD *$$DD01 COPYBACK/*//STEP4 EXEC PGM=FILEAID,REGION=4M//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//DD01 DD DSN=$$$$$$$.TEST.BACK1,DISP=SHR//DD01O DD DSN=$$$$$$$.WITHOUT.ATSIGN,DISP=OLD//SYSIN DD *$$DD01 COPY STOP=(1,EQ,C'@')$$DD01 COPY IN=1, R=(1,EQ,C'@',C' '), R=(1,0,C",",C")")$$DD01 COPY STOP=(1,EQ,C'//ESYLIB'), R=(1,0,C'@',C' ')$$DD01 COPY STOP=(1,EQ,C'@')/*//STEP5 EXEC PGM=FILEAID,REGION=4M//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//DD01 DD DSN=$$$$$$$.WITHOUT.ATSIGN,DISP=SHR//DD01O DD DSN=$$$$$$$.TEST.BACK2,DISP=OLD//SYSIN DD *$$DD01 COPYBACK/*//STEP6 EXEC PGM=FILEAID,REGION=4M//STEPLIB DD DSN=FA.PROD.LOADLIB,DISP=SHR//SYSPRINT DD SYSOUT=*

Page 17: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 17

//SYSLIST DD SYSOUT=*//ABNLTERM DD SYSOUT=*//DD01 DD DSN=$$$$$$$.TEST.BACK2,DISP=SHR <--- WORK FILE//DD01O DD DSN=$$$$$$$.TEST.FINAL,DISP=OLD <--- "IEBUPDTE" FILE//SYSIN DD *$$DD01 COPYALL IF=(1,0,C'***MEMBER '), MOVE=(01,80C' '), MOVE=(01,C'./ ADD NAME='), MOVE=(13,8,+11)/*

****For Steps 2 and 4, you have to repeat the grouped statements for each "PROCLIB"you have in your PDS.****

A customer wanted to search for a specific data string across all of the JCL members in hislibrary. In this example, �PROCLIB� is the string that he is searching for. When �PROCLIB�is found, File-AID/MVS changed the data string to �ESYLIB JCLLIB� and the dataset isconcatenated. This job provides an easy way to perform mass changes to many JCL librariesinstead of having to change them all manually. This job will only work if you have allconcatenations for the �PROCLIB�. If the �PROCLIB� is single, then you must manually editthat record because it will just put a comma and not a closing parenthesis at the end of therecord.

Page 18: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 18

COPY TO UNLIKE ACCESS METHODS

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=DEPT.TEST.CLUSTER,DISP=OLD//DD01O DD DSN=USERID.TEST.DATE,DISP=(,CATLG,DELETE)// UNIT=SYSDA,SPACE=(TRK,(4,2))//SYSIN DD *$$DD01 COPY/*

Files are kept on disk packs and on tape units at many companies. This creates a need to beable to copy files from one access method to another in a simple procedure. The COPYfunction in File-AID/MVS allows data can be copied from one access method file to another.The copy can be non-selective (as shown above) or can include selection conditions. Theselections are coded using the IF parameter. A limited number of records can be copied bycoding the OUT parameter.

No special indication of access type need be given. Coding follows standard MVS JCL rulesfor files. See also the REPRO example.

Page 19: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 19

CREATE AUDIT REPORT

//JOBNAME JOB REST OF CARD//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//DD01 DD DSN=DEPT.TEST.CLUSTER,DISP=OLD//DD010 DD DSN=SMALL.TEST.FILE,DISP=OLD//SYSIN DD *$$DD01 COPY IF=(349,EQ,P�15�),

REPL=(12,GT,P�47�,119,P�0�),PRINT=0

/*

In order to reduce the possibility of losing valuable data while changing files or data, alisting of all of the changed records can be produced by File-AID. This validates changes andprovides proof that they were done. Changing data can be done directly to the file with theUPDATE function or while copying records to a new file as was done here.

The PRINT parameter writes a copy of each changed record to the hardcopy file SYSLIST.If a listing of the changes was desired without actually modifying the records, use thePRINT function and eliminate the PRINT parameter. Records will be printed with thechanges, but the actual data will remain unchanged.

Page 20: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 20

SPLIT RECORD INTO PIECES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=INPUT.FILE,DISP=OLD//A DD DSN=SPLIT.FILE1,DISP=(,CATLG,DELETE),// UNIT=SYSDA,SPACE=(TRK,(4,2))//B DD DSN=SPLIT.FILE2,DISP=(,CATLG,DELETE),// UNIT=SYSDA,ETC//SYSIN DD *$$DD01 USER IF=(28,EQ,P�912�),MOVE=(1,27,1),

MOVE=(28,C�A�),MOVE=(29,255,30),MOVE=(283,131,285),WRITE=A,IF=(28,EQ,P�912�),MOVE=(28,C�B�),MOVE=(29,255,416),MOVE=(283,242,670),WRITE=A,IF=(34,EQ,P�840),MOVE=(1,33,1),MOVE=(34,C�A�),MOVE=(35,180,36),WRITE=B,IF=(34,EQ,P�840�),MOVE=(34,C�B�),MOVE=(35,255,216),MOVE=(289,10,470),WRITE=B,IF=(34,EQ,P�840�),MOVE=(34,C�C�),MOVE=(35,255,481),MOVE=(289,105,735),WRITE=B

/*A customer had a file that contained two record types. Each record consisted of a fixedpart at the front, a length that indicated the type and two or three more sections. Theyneeded to take and write each record type to a separate file. They also wanted to split therecord types into separate records. Each of the new, split records needed to retain theheader information.

This example demonstrates the USER function. First, we check for each record type.Location 28 containing a packed 912 was one type and location 34 containing a packed 840was the other. The header information only had to moved to the output area once. Then theindividual sections were moved. A record type code of A��, �B� or �C� was also placed in therecord. The MOVE parameter format indicates output location, data length, input location.The WRITE parameter told File-AID which file to write the newly created record to (eitherA or B).

DD names A and B are user-defined values that are referenced by the WRITE parameter.

Page 21: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 21

FORMATTED PRINT

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//SYSLIST DD *//DD01 DD DSN=DEPT.TEST.FILE,DISP=SHR//DD01RL DSN=DEPT.COPY.LIB,DISP=SHR//SYSIN DD *$$DD01 SPACE IN=100$$DD01 FPRINT IF=(25,EQ,C�S�),OUT=15,MAP=CFG0032T/*

As part of a hardware conversion, a customer was creating record layouts for the convertedfiles. Some of the new layouts did not quite match the record data. The formatted print wasused to see where the problems were. All of the fields printed in hex were then examinedfor possible layout coding errors.

The DD name DD0lRL indicates that this file contains the record layouts. These can beCOBOL or PL/1 layouts.

The above example shows two functions for the input dataset (DD01). The first, SPACE, isused to skip over the first 100 records in the dataset (IN=100). The second function,FPRINT, tells File-AID/MVS which record layout to use from the DD0lRL dataset(MAP=CFG0032T). Also, a selection is used to limit the records being printed to thosecontaining an "S" in location 25. A maximum of 15 records will be printed.

Like the other hardcopy functions (DUMP, LIST, PRINT), the FPRINT function also has aparameter with the same name. In this way you can print out records using record layoutswhile you perform some other function such as UPDATE or COPY.

Page 22: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 22

EDITING CRITICAL VSAM-KSDS FILE

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=ACCT.MASTER.FILE,DISP=OLD//DD0lRL DD DSN=ACCT.COPY.LIB,DISP=SHR// SYSIN DD *$$DD01 FPRINT FORM=MULTI,KEY=C�48831938�,IN=1,

MAP=KE9201DG

$$DD01 UPDATE KEY=C�48831938�,IN=1,IF=(128,3,NEP),REPL=(128,X�00000C�),FPRINT=1,MAP=KE9201DG

/*

An abend occurred during batch processing against a company�s critical online file. This wascaused by invalid data in an amount field on one record of the master file.

As coded, the File-AID/MVS Batch job includes two actions against the file. The first usesthe function FPRINT. This will look for the required record by key and print it with itsrecord layout from the member KE9201DG.

The UPDATE function corrects the invalid data. The correct record is found by key and acheck is made that it does indeed have invalid data (NEP tells File-AID to look for data thatis Not Equal Packed). The REPLace moves packed zeros to the field position on top of theinvalid data. As a check, the record is again printed with its record layout.

Page 23: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 23

EXTRACT RELATED DATA FROM MULTIPLE FILES

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=MASTER.FILE,DISP=SHR//DD010 DD DSN=TESTFILE.MASTER,DISP=OLD//SYSIN DD *$$DD01 COPY IF=(25,EQ,C�S�),IF=(93,GE,C�88�),

IF=(93,LE,C�91�),OUT=75//*//STEP2 EXEC PGM=FILEAID//SYSPRINT DD SYSOUT=*//DD02 DD DSN=TESTFILE.MASTER,DISP=OLD//DD02O DD DSN=DD02O.DATA,DISP=(,CATLG,CATLG),// UNIT=SYSDA,SPACE=(TRK,(5,1)),// DCB=(RECFM=FB,LRECL=80,BLKSIZE=6160)//SYSIN DD *$$DD02 COPY FORM=MULTI,MOVE=(1,80C� �)�

MOVE=(l,C"$$DD03 COPY IF=(1,EQ,C�"),MOVE=(+0,9,20),MOVE=(+0,C"�),"),OUT=1

*$$DD02 COPY MOVE=(1,80C��),MOVE=(13,C"OR=(1,EQ,C� "),

MOVE=(+0,9,20),MOVE=(+0,C"�),")*$$DD02 COPY MOVE=(1,80C� �),MOVE=(13,C�OUT=0�),OUT=1//*//STEP3 EXEC PGM=FILEAID//SYSPRINT DD SYSOUT=*//DD03 DD DSN=PRODETL.FILE,DISP=SHR//DD03O DD DSN=TEST.PRODETL.FILE,DISP=(,CATLG,CATLG),// UNIT=�, DCB=�, SPACE=�//SYSIN DD DD02O.DATA,DISP=OLD/*

Description on the following page ...

Page 24: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 24

EXTRACT RELATED DATA FROM MULTIPLE FILES

This situation has occurred at many companies. Test files are needed and production data will beused as a source. But there is more than one file involved in the application. A code value linksthe records from one file to another. They need to be able to selectively pull off records fromone file and then pull matching records from the other file(s).

Because the records must match, it will not work to take just a random sample from each file.Also since a random sample is desired from the "master" file it is not possible to know whichrecords will be selected until that first step is run.

File-AID/MVS Batch works perfectly in this case. This example is presented in three steps forclarity. Step 1 is used to run against the "master" file and pull off a sample of records. Here arange of years (88-91) and a code value (S) must be present. Only 75 of these records arerequired.

Step 2 reads through the selected records and uses the code value from each. The code value(which links the records across files) is used to generate selection (IF) statements forFile-AID/MVS. The IF statements are created in three functions. All three functions areCOPY. The first function generates the beginning control card. It formats the $$DD03 andthe function (COPY). Then it adds the first IF. The code value is then moved into the IFstatement. It is nine bytes long and is found in position 20. Since only one of these functionstatements need be generated, that limit is used (OUT=1).

The COPY in Step 2 generates all of the other IF statements, one for each "master" record.As a parameter, OR is coded since there is a list of possibilities being created. There is nooutput limit here so File-AID/MVS will loop until the entire test "master" file has been readand an OR card has been created for each one.

The last COPY in Step 2 generates the limiting parameter, OUT=0. 0 indicates that there isno limit. There is now a file (DD02O.DATA) which contains selection statements with thecode values from the "master" records.

STEP 3 runs the selection statements against the detail record file. Since the selectioncards contain the code values from the "master" records, the matching detail records will bechosen and written to a test file.

If there are more associated files to extract from, STEP 3 can be run for each one and theproper records selected. If the code value is in a different data location in the other files,

Page 25: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 25

then Step 2 must also be modified to look in the correct data location, and then rerun. Nomatter how many files may need to be searched, the entire process can be accomplishedthrough File-AID. It can generate all of the selection statements to pull off the matchingrecords.

The coding formats of the parameters used in this example are documented. The codingformat for the MOVE parameter is: output location, data length, input location.

Page 26: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 26

COMPRESS PDS MEMBERS

//JOBNAME JOB REST OF CARD ...//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=OLD.PDS.FILE,DISP=OLD,

DCB=(LRECL=80,RECFM=FB,BLKSIZE=3120)//OUTPDS DD DSN=NEW.PDS.FILE,DISP=SHR,

DCB=(LRECL=256,RECFM=VB,BLRSIZE=6144)//SYSIN DD *$$DD01 COPY IF=(80,EQ,40C� �),COPY=(1,79,1),WRITE=OUTPDS,

IF=(79,EQ,39C� �),COPY=(1,78,1),WRITE=OUTPDS,IF=(78,EQ,38C� �),COPY=(1,77�1),WRITE=OUTPDS,...IF=(40,EQ,C� �),MOVE=(1,39,1),WRITE=OUTPDS

/*

A customer wanted to reduce the amount of space being occupied by his PDSs. It would savea lot of disk space if each file was changed from fixed block (FB) to variable blocked (VB)and the trailing blanks in each record were deleted.

The above example shows how this was done using File-AID/MVS Batch. The parameterswere not actually coded. They were included here just to show you the change.

The parameters were coded to look for trailing blanks in each record. A minimum data lengthof 40 characters for each line was used in this example (although you may start searchingfrom column 2 or 3). Only the actual data portion of the record was written to the outputfile with the WRITE parameter. In that write process, File-AID calculated the correctRDW for each new variable-length record.

The initial test of this process used a PDS containing 1188 members and 74,256 lines.Running on a 3090200J the job took 2 minutes 50 seconds wall clock and 12.1 seconds CPU.The input PDS occupied 12 cylinders on a 3390 and the output PDS only 7 cylinders. That is a40% space savings!

Page 27: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 27

INSERTING A NEW JOB STEP

//JOBNAME JOB REST OF CARD//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=INPUT.JCL,DISP=OLD//OUTJCL DD DSN=OUTPUT.NEW.JCL,DISP=(,CATLG,DELETE),// DCB=(LRECL=80,RECFM=F,BLKSIZE=8000)// UNIT=SYSDA,SPACE=(TRK,(2,2))//SYSIN DD *$$DD01 USER MS=ALL,** YOU MUST FIRST SCAN FOR ALL CONDITIONS NOT HAVING �IEWL�

IF=(3,0,C� DD �),ORIF=(3,0,C�PROC�),ORIF=(3,0,C�EXEC�),ORIF=(3,0,C� PGM=�),AND=(+4,NE,C�IEWL�),ORIF=(1,EQ,C�// �),ORIF=(1,EQ,C�//*�),ORIF=(1,EQ,C�/*�),ORIF=(3,0,C�EXEC�),AND=(+6,NE,C"PGM=,PGM="),WRITE=OUTJCL,

* THEN SCAN FOR IEWL .. WHEN FOUND IT STAYS IN THE INPUT BUFFER ...ORIF=(3,0,C�PGM=IEWL�),MV=(1,80C� �),MV=(1,C�/*�)�WRITE=OUTJCL,MV=(1,C�//STEPNAME EXEC PGM=FILEAID�),WRITE=OUTJCL,MV=(1,C�//NEXT CARD�),WRITE=OUTJCL,MV=(1,C�//NEXT CARD�),WRITE=OUTJCL,MV=(1,C�//LAST CARD�),WRITE=OUTJCL,MV=(1,C�/*�),WRITE=OUTJCL,

** UNTIL YOU MOVE IT TO THE OUTPUT BUFFER AND WRITE IT

MV=(1,0,1),WRITE=OUTJCL/*

Description on the following page ...

Page 28: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 28

INSERTING A NEW JOB STEP

The USER function enables data to be added to a file by using both the input and outputbuffers. By using the MOVE (MV) parameter, data can also be built and written. Data in theinput buffer remains there while new data is formatted and written using the output buffer.

This example adds a new step to the jobstream before the IEWL link step.

We sometimes process records and find we are at a point where we realize that a taskneeded to be performed before this point. This situation can be a problem, but actuallyworks to your advantage in this example. Once you (through File-AID/MVS) realize thatPGM=IEWL has just been read, a "branch" action needs to be taken before writing back outthe EXEC. This can happen because File-AID/MVS allows you to create data in the outputwork buffer and write it out without disturbing the data that was read into the input workbuffer.

On the previous page, the first group of IF/ORIF parameters is looking for every JCLrecord other than the EXEC PGM=IEWL. It takes all those other records and write them tothe new output file. The next group of parameters reacts to the IEWL. When this conditionis reached, the original record is in File-AID�s input buffer. A new job step is created, lineby line, and written to the new output PDS. It is being inserted just after the other recordsthat were copied and just before the IEWL.

After each new record for the step has been moved to the output buffer and written out tothe output PDS, then the original EXEC PGM=IEWL is moved from the input buffer andwritten out. This is done in the line MV=(1,0,1),WRITE=OUTJCL.

Page 29: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 29

COMMENT OUT A JOB STEP

//JOBNAME JOB REST OF CARD�//STEP1 EXEC PGM=FILEAID//STEPLIB DD (ONLY IF REQUIRED)//SYSPRINT DD SYSOUT=*//DD01 DD DSN=TEST.JCL,DISP=OLD//DD02 DD DSN=TEST.JCL2,DISP=OLD//DD03 DD DSN=TEST.JCL3, DISP=OLD//SYSIN DD *$$DD01 USER MOVE=(1,80,1),

IF=(1,0,C�IEFBR14�),MOVE=(81,C�*�),IF=(+7,0,C�EXEC�),MOVE=(81,C� �),IF=(1,EQ,C�/�),WRITE=DD02

$$DD02 USER MOVE=(1,80,1),IF=(81,EQ,C�*�),MOVE=(3,C�*�),IF=(1,EQ,C�/�),WRITE=DD03

/*

Often times, if you can think beyond just one pass of a file, File-AID does provide a way tosolve a difficult problem. With the USER function, many actions can be controlled.

This example shows how a File-AID/MVS Batch user was able to comment out the EFBR14steps in a job stream. The PDS was input to the File-AID job twice. In the first pass, all ofthe records that were read in were moved to the output buffer work area. Then IEFBR14was searched for. If found, an * was moved to output location 81. This value will remain untilanother value is moved over it. Effectively this means that every record following theIEFBR14 will be written out with an * in column 81. When an EXEC is finally encountered, the* in 81 is changed to blank. It then remains blank until the next IEFBR14 is encountered.

The second pass moved the * in column 81 to column 3. All of the records are also copied tothe output file DD03. In this example, DD02 and DD03 were the chosen file names for theoutput files referenced by the user parameters. They could have been any value the userdesired.

Page 30: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 30

COMPARING DATA IN TWO FIELDS

//JOBNAME JOB REST OF CARD�//STEP01 EXEC PGM=FILEAID,REGION=4M//STEPLIB DD DSN=FILEAID.LOADLIB,DISP=SHR//SYSLIST DD SYSOUT=* //SYSPRINT DD SYSOUT=*//SYSOUT DD SYSOUT=*//DD01 DD DSN=FASAMP.EMPLOYEE,DISP=SHR//OUTFIL DD DSN=NEW.TEMP,DISP=OLD//SYSIN DD * $$DD01 USER MOVE=(1,80C' '), MOVE=(1,C"$$DD01 COPY IN=1,IF=(64,EQ,C"), MOVE=(+0,C'"'),MOVE=(+0,5,1),MOVE=(+0,C'")'), WRITE=OUTFIL

STEP02 executes the Control Cards created in the previous step on your input to create thedesired output.

//STEP02 EXEC PGM=FILEAID//STEPLIB DD DSN=FILEAID.LOADLIB,DISP=SHR//SYSLIST DD SYSOUT=*//SYSPRINT DD SYSOUT=*//SYSOUT DD SYSOUT=*//DD01 DD DSN=FASAMP.EMPLOYEE,DISP=SHR//DD01O DD DSN=NEW.OUTPUT,DISP=SHR//SYSIN DD DSN=*.STEP01.OUTFIL,DISP=OLD

Many companies ask for a way to compare data in two different locations in a batch job.File-AID/MVS provides a way to do a job that writes a Control Card in STEP 1 that getsexecuted in STEP 2 to compare the data of two fields. The employee sample file iscomparing the EMP-NUM to the first 5 digits of the Social Security number. You must editthe data in this file first to get a match on the compare. Currently no fields match.

Page 31: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 31

CHANGING LETTERS FROM UPPER TO LOWER CASE

//JOBNAME JOB REST OF CARD�//STEP1 EXEC PGM=FILEAID,REGION=4M //*STEPLIB DD DSN=CURRENT.FILEAID.LOADLIB,DISP=SHR//SYSLIST DD SYSOUT=*//SYSPRINT DD SYSOUT=* //DD01 DD DSN=USERID.INPUT.FILE,DISP=SHR//DD01O DD DSN=USERID.NEWFILE.CHNGCASE,// DISP=(NEW,CATLG,DELETE),// DCB=(LRECL=198,RECFM=FB,BLKSIZE=1980),// SPACE=(TRK,(1,1),RLSE)//SYSIN DD *$$DD01 COPY REPLALL=(1,0,X'C1',X'81'), REPLALL=(1,0,X'C2',X'82'), REPLALL=(1,0,X'C3',X'83'), REPLALL=(1,0,X'C4',X'84'), REPLALL=(1,0,X'C5',X'85'), REPLALL=(1,0,X'C6',X'86'), REPLALL=(1,0,X'C7',X'87')/*

Many customers look for an easy way to make this kind of a change to the data in a file.File-AID makes this type of operation fast and easy.

This job will change the case of letters from upper to lower case. In the process, this jobwill allocate a new file and copy all the records of the input file to the new file showing thechanges that were made.

Page 32: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 32

CHANGING ALPHANUMERIC VALUES TO HEX VALUES

//JOBNAME JOB REST OF CARD�//STEP1 EXEC PGM=FILEAID,REGION=4M//DD01 DD DSN=EFHSDJ0.SEQ.FILE,DISP=SHR//DD01O DD DSN=EFHSDJ0.FILE1,DISP=OLD//DD02 DD DSN=EFHSDJ0.FILE1,DISP=OLD//DD02O DD DSN=EFHSDJ0.FILE2,DISP=OLD//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//SYSIN DD *$$DD01 DROP IF=(2,EQ,X'40')$$DD02 CA IF=(2,EQ,C'0'),REPL=(2,X'00'), IF=(2,EQ,C'1'),REPL=(2,X'01'), IF=(2,EQ,C'2'),REPL=(2,X'02'), IF=(2,EQ,C'3'),REPL=(2,X'03'), IF=(2,EQ,C'4'),REPL=(2,X'04'), IF=(2,EQ,C'5'),REPL=(2,X'05'), IF=(2,EQ,C'6'),REPL=(2,X'06'), IF=(2,EQ,C'7'),REPL=(2,X'07'), IF=(2,EQ,C'8'),REPL=(2,X'08'), IF=(2,EQ,C'9'),REPL=(2,X'09')/*

Similar to the previous job, many customers use File-AID to manipulate data in variouslycreative ways. This is just one more example of how using File-AID can simplify aprogrammer�s task.

This job will change the values of alphanumeric characters to hex values. In the process,this job will allocate a new file and copy all the records of the input file to the new fileshowing the changes that were made.

Page 33: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03

Customer Uses Of File-AID/MVS Batch

09/22/03 Copyright 1999 - 2003 Compuware Corporation 33

TALLYING AND ACCUMULATING DATA

//STEP1 EXEC PGM=FILEAID,REGION=4096K//SYSPRINT DD SYSOUT=*//SYSLIST DD SYSOUT=*//SYSTOTAL DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//ABNLDUMP DD DUMMY GET SYSUDUMP EVEN UNDER ABEND-AID//DD01 DD DSN=FASAMP.EMPLOYEE,DISP=SHR//SYSIN DD *$$DD01 TALLY IF=(87,6,EQN), A=(87,6,C,'ALL EMPLOYEES'), IF=(87,6,EQN), AND=(86,EQ,C'S'), A=(87,6,C,'SINGLE PEOPLE')/*

A Manufacturing company is trying to compile information on its employee expenses. Theyare looking for a way to use the data in their records to get specific information.

This is a sample job to tally a field that gives a total for life insurance withholding for allemployees and the total life insurance withholding for all single employees.

Page 34: Customer Uses of - cps4it · Customer Uses Of File-AID/MVS Batch 09/22/03