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

Global Moderator


Joined: 14 Mar 2007
Posts: 10358
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: 1068
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: 175
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: 1818
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: 1922
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: 1248
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts Historical/statistical details for me... elixir1986 TSO/ISPF 13 Wed Aug 30, 2017 9:02 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm

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