Page 1 of 1

Search and update using File-Aid.

Posted: Fri May 22, 2015 2:14 pm
by Manish Tripathi
Hi,

I am looking for some help on 'sub-task' I am working on. For a testing we've to change a program name every day before we start testing. And for this I am looking for a way to mass update all members in a PDS in batch mode. As for example, I have replace say, 'PGM=PGM11' to 'PGM=PGM22'. How can I do that?

Re: Search and update using File-Aid.

Posted: Mon Jun 15, 2015 4:58 pm
by Anuj Dhawan
Hi,

Below file-aid job should help you with what you've asked for:

Code: Select all

//STEP010  EXEC PGM=FILEAID                              
//SYSUDUMP DD SYSOUT=C                                  
//SYSPRINT DD SYSOUT=*                                  
//SYSLIST  DD SYSOUT=*                                  
//SYSTOTAL DD SYSOUT=*                                  
//DD01     DD DSN=your.pds,DISP=SHR  
//SYSIN    DD *                                          
$$DD01 UPDATE ME=9999,EA=(1,0,T"'PGM=PGM11",C"'PGM=PGM22") 
/*