Hi,
I have a problem here in the CODE below, where the SEQ Dataset in DD statement - PDSMPDS contains a number of PDS with many members in each. What I wanted to do was use PDSM18 to update all members in all the PDS's in the PDSMPDS DD file but, but it fact what it does is update any instances of the target strings (&TARGn) with the replacement strings (&REPLn) in the sequential file itself.
I have read the CHAPTER 2:String Scan and Replace for PDSM18 (from PDSMAN_Productivity_Tools_Ref_ENU.pdf) and it doesn't look like I can pass in a file with PDS to scan and replace.
This is part of an automation project, and I don't want to go hardcoding the PDS names, concatenated in the PDSMPDS DD statement as the job will fail if a particular one specified does not exist.
If I can update the current structure to work great, but another solution would also be great.
An example of the QA.&USERID..DSNLIST file follows the code, there can be a lot of PDS in this file eg. 60+.
Code:
/*
//* Parse the DSN LIST from the USERID.temp.dkillson file created
//* when we used the dz CLONE utility, put these DSN into a new file
//* that will be used as input in the next step when we REPLACE old
//* complex strings with new complex strings.
//*
//DSNLIST EXEC PGM=IKJEFT01,DYNAMNBR=30,
// REGION=4096K
//SYSEXEC DD DSN=QA.SYS.AUTOMATE.REXX,DISP=SHR
//*
//INDD DD DSN=&USERID..TEMP.DKILLSON,
// DISP=SHR
//OUTDD DD DSN=QA.&USERID..DSNLIST,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(20,20),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//SYSTSIN DD *
%DSNLIST
//*
//* REPLACE target strings with new strings in all members in all PDS's
//* contained in input file in the PDSMPDS DD statement.
//*
//REPLACE EXEC PGM=PDSM18,PARM='.ALL'
//PDSMPDS DD DISP=SHR,DSN=QA.&USERID..DSNLIST
//PDSMRPT DD SYSOUT=*,OUTLIM=1000000
//SYSIN DD *,SYMBOLS=JCLONLY
OPTION MISSMSG=Y
REPLACE TARGET=&TARG1,NEW=&REPL1
REPLACE TARGET=&TARG2,NEW=&REPL2
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Quote:
any help would be greatly appreciated
The responses on this forum are voluntary and given when / if people have time and knowledge of the subject. Nagging for faster assistance after just 2 hours will NOT get you faster results, and frequently such nagging causes the people who WOULD respond to not do so in the expectation that your appreciation will be lacking. If your problem is so urgent, convince your management to hire a consultant to assist you.
I haven't used PDSMAN a lot, but none of my experience indicates that what you want to do is possible. I'm not sure but there may not be ANY products on the market today that allow you to dynamically allocate data sets from a sequential file and scan them.
You could write a program in the language of your choice to parse your sequential file and generate the JCL, which then could be submitted to the internal reader. If you want to get fancy, your program could check for the existence of the data set and not write JCL if the PDS doesn't exist -- but that would depend upon which language you write your program in.
specifying a sequential dataset on the PDSMPDS DD that contains a list of PDS's is NOT a concatenation. PDSMAN just sees the file name on the DD and processes that. You have to specify each individual name as a real concatenation on the PDSMPDS DD, and I'm not even sure if PDSM18 will accept that, I have never tried it.
e.g. this is a proper concatenation ..
//PDSMPDS DD DISP=SHR,DSN=QA.ZZ140A1C.SOURCE
// DD DISP=SHR,DSN=QA.ZZ140A1C.TAPELOAD.CNTL
// DD DISP=SHR,DSN=QA.ZZ140A1C.TEST.INCLLIB
..etc for all the files in your list
It would be possible for the concatenation list to be a JCL INCLUDE member which is probably more like what you intended. You could read the JCL manual to understand how that works.
Thanks Pete. This was the best remedy I was looking for.
Unfortunately I took a different route then by creating the jcl members from scratch each time the automation is run through a rexx program, which the automation then submits.