IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Automation JCL Problem - PDSM18 input file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Wed Aug 19, 2015 12:05 am
Reply with quote

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                                     


QA.&USERID..DSNLIST file:
==================
QA.ZZ140A1C.SOURCE
QA.ZZ140A1C.TAPELOAD.CNTL
QA.ZZ140A1C.TEST.INCLLIB
QA.ZZ140A1C.TEST.SOURCE
QA.ZZ140A1C.USER.SOURCE
QA.ZZ140A1C.DTF.INDEX
QA.ZZ140A1C.MWFSAS.DATA
QA.ZZ140A1C.SASFLS
QA.ZZ140A1C.SCREENS
QA.ZZ140A1C.TABLES
Back to top
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Wed Aug 19, 2015 2:14 am
Reply with quote

any help would be greatly appreciated
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 19, 2015 3:51 am
Reply with quote

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.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Tue Sep 08, 2015 3:30 am
Reply with quote

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.
Back to top
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Tue Sep 08, 2015 1:45 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top