View previous topic :: View next topic
|
Author |
Message |
bhamarekm
New User
Joined: 20 Sep 2010 Posts: 9 Location: Pune
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
Back to top |
|
|
bhamarekm
New User
Joined: 20 Sep 2010 Posts: 9 Location: Pune
|
|
|
|
Thanks a lot Robert. . |
|
Back to top |
|
|
bhamarekm
New User
Joined: 20 Sep 2010 Posts: 9 Location: Pune
|
|
|
|
Hi Enrico,
Thanks for your help. Finally I have decided to go with REXX marco .
Thanks for your valuable inputs.
Regards,
Kiran |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
|