MainframeSupports
tip week 40/2003:

In week 36 I wrote a tip about changing data using DFSORT. I think it is relevant to mention the product File-AID/Batch from Compuware. This product is very good at manipulating files and especially at changing the contens of those files.

The following example illustrates how File-Aid can 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=MYMEMBER,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 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 MYMEMBER. The rest is exactly the same and works accordingly.

The clever things in this situation compared to DFSORT are that you don't have to have two DD cards in order to process the same dataset. Next you can process more datasets in the same invocation and finally you are not limited to change data in a fixed position. It is also worth noting that updates are "in place". This is very good when processing member datasets. When you process a member using the ISPF editor, the changed member will be written as a whole new member and the old version will be marked as deleted. When the update is "in place" no new members are created and a lot of space is saved.

I have not been able to locate the File-AID/Batch manual on the internet. I know it is available in BookManager format. According to the manual I have seen the name of the product is File-AID/Batch, but on the homepage of Compuware the product is referred to as File-AID/MVS.

Previous tip in english        Sidste danske tip        Tip list