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

JCL to replace string in all PDS members


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 28, 2015 9:37 pm
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
www.ibmmainframes.com/viewtopic.php?t=60794
the mass change sample

or if You prefer something simpler here
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: 1306
Location: Vilnius, Lithuania

PostPosted: Thu May 28, 2015 11:39 pm
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
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
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 Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

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

The PDS86 program from Use [URL] BBCode for External Links 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

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Thu Sep 03, 2015 3:12 am
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: 2455
Location: Hampshire, UK

PostPosted: Thu Sep 03, 2015 4:25 am
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: 1353
Location: Israel

PostPosted: Thu Sep 03, 2015 10:36 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top