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
 

 

JCL to replace string in all PDS members

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
bhamarekm

New User


Joined: 20 Sep 2010
Posts: 9
Location: Pune

PostPosted: Thu May 28, 2015 8:44 pm    Post subject: JCL to replace string in all PDS members
Reply with quote

Hi Team,

I need small help I need some sample JCL where I can provide input as
1) PDS name which will have lot of members
2) Old string which needs to replace
3) New String

And as output I want same PDS with new string in all memebrs.

I wrote some REXX codes and it is working fine but my requirement is using JCL want to do same work. Also I wrote some JCL where I can replace string in PDD memebrs or flat files, but I am not sure how to replace string for whole PDS (including all memebrs).

Thanks a lot for your help in advance.

regards,
Kiran Bhamare
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu May 28, 2015 9:37 pm    Post subject: Reply to: JCL to replace string in all PDS members
Reply with quote

Quote:
... using JCL want to do same work

Unfortunately You are out of luck, NOO way with what You call jcl

easy if You have FILEAID or FILE-MANAGER

as an equally easy alternative ask Your support about using CPPUPDTE/IPOUPDTE

if You are out of luck You can get some ideas here
http://www.ibmmainframes.com/viewtopic.php?t=60794
the mass change sample

or if You prefer something simpler here
http://www.ibmmainframes.com/viewtopic.php?t=25947
the $apply sample
in this case You will gave to write the inner macro Yourself
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Thu May 28, 2015 11:39 pm    Post subject:
Reply with quote

Try PDSUPDTE
Back to top
View user's profile Send private message
bhamarekm

New User


Joined: 20 Sep 2010
Posts: 9
Location: Pune

PostPosted: Fri May 29, 2015 1:11 am    Post subject:
Reply with quote

Thanks a lot Robert. icon_smile.gif.
Back to top
View user's profile Send private message
bhamarekm

New User


Joined: 20 Sep 2010
Posts: 9
Location: Pune

PostPosted: Fri May 29, 2015 11:38 pm    Post subject:
Reply with quote

Hi Enrico,

Thanks for your help. Finally I have decided to go with REXX marco icon_smile.gif.

Thanks for your valuable inputs.

Regards,
Kiran
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 96
Location: Switzerland

PostPosted: Thu Sep 03, 2015 1:53 am    Post subject:
Reply with quote

The PDS86 program from WWW.CBTTAPE.ORG can do anything to a PDS and almost anything to a PDSE. Just be careful.

rgds
Willy
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Sep 03, 2015 3:12 am    Post subject:
Reply with quote

Enrico said already.

If you have then try this , else rexx should do.

Code:
//STEP0100 EXEC PGM=FILEAID                                   
//SYSPRINT DD SYSOUT=*                                       
//DD01     DD DSN=YOUR PDS,
//            DISP=SHR
//SYSIN    DD  *                                             
$$DD01 UPDATE EDITALL=('offset,old string, new string)                 
/*


Also, see if PDSEDIT makes any use.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Sep 03, 2015 4:25 am    Post subject:
Reply with quote

You cannot do this sort of thing in JCL as that is not what JCL does. You can do it using a program provided that you supply the correct control cards to the program. You can then wrap it all up in JCL to run as a batch job.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Sep 03, 2015 10:36 am    Post subject:
Reply with quote

If you plan to use any of the tools mentioned, don't forget to copy the members to another PDS, don't replace them until the result has been checked.
If you write a marco, clone the original PDS and work on the copy until you're satisfied with the results.
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


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