Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 14 Mar 2007
Posts: 10487
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

Senior Member


Joined: 07 Feb 2009
Posts: 1113
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

Active User


Joined: 01 Sep 2015
Posts: 211
Location: Denmark

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: 1938
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: 2032
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: 1284
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 Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us