Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Automation JCL Problem - PDSM18 input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Automation JCL Problem - PDSM18 input file
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    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 19, 2015 3:51 am    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue Sep 08, 2015 3:30 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us