Joined: 23 Jul 2010
|I doubt if this is possible with PDSMAN, but maybe someone knows.
I know I can scan/replace multiple search strings with replace strings, but instead of specifying all the PDS I need to SCAN/REPLACE, can I use a prefix.* any way with PDSMAN to SCAN/REPLACE multiple string in all PDS that begin with a certain PREFIXHLQ.*
Or does anyone know another utility that I can do this with.
This will be a step in an automation process so I wouldn't necessarily know how many PDS will begin with PREFIXHLQ.* that I need to SCAN/REPLACE.
Joined: 31 Dec 2009
|If you have FDREPORT you can easily SCAN for your PDS's with name masking, and it can punch out the JCL for doing the SCAN replace as well.
In this example is substitutes the dsnames into the <NAME> section in the PDSMPDS DD for each PDS it finds The 'XS XDSN=' parameter allows full masking while searching for matching PDS names.
//FDRPUNCH EXEC PGM=FDREPORT,REGION=1024M
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABRMAP DD SYSOUT=*
//ABRSUM DD SYSOUT=*
//SYSPUNCH DD DSN=PUNCH.OUTPUT.FILE,DISP=SHR
//MASK DD DATA,DLM=ZZ
//JSTE001 EXEC PGM=PDSM18
//PDSMPDS DD DSN=<NAME>,DISP=SHR
//PDSMRPT DD SYSOUT=0
//PDSMSEL DD *
//SYSIN DD *
OPTION TRANSLATE=Y TRANSNEW=Y MISSMSG=N
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSUT3 DD SPACE=(CYL,(100,100))
//SYSUT4 DD SPACE=(CYL,(100,100))
//SYSIN DD *