Page 1 of 1

Changing characters in PDS members

PostPosted: Mon Apr 02, 2018 2:17 pm
by Aech
I wrote the below rexx edit macro to change some characters in my pds members (have almost 300+ jobs in it).
But when trying to run it, at time of the execution the macro is taking me to all the pds members, how can I bypass this?

/*REXX*/
ADDRESS ISREDIT
EMPTY=" "
"MACRO"
"F 'jobname1'"
IF RC > 0 THEN EXIT
"C 'jobname1' 'jobname2' ALL"
"SAVE"
"END"
EXIT


If I remove the FIND and IF statement then it wouldn't take me to all the members but on the same side I don't want all my members (ones without the character I'm searching for as well) modified date and time changed.

Any help or reference would be much appreciated.

Re: Changing characters in PDS members

PostPosted: Mon Apr 02, 2018 6:36 pm
by prino
1) This macro doesn't take you to all of your members, there is no logic in it to do so.
2) Why do a "SAVE" and an "END".

If you do not want to change timestamps, use a more suitable tool, like IBM's IPOUPDTE or the "free" version PDSUPDTE. About a zillion times faster than an edit macro.

Re: Changing characters in PDS members

PostPosted: Mon Apr 02, 2018 7:52 pm
by Aech
Hi prino,
Thanks for the response, I did get this code from the forum.

By User ozgurseyrek
http://ibmmainframes.com/viewtopic.php?t=31003

2) Why do a "SAVE" and an "END".

New to REXX so been tweaking it from the bits and parts of the IBM manual I'm reading to see what it does.. Clearly not doing a good job :?

1) This macro doesn't take you to all of your members, there is no logic in it to do so.

Does the FIND command make any difference in this? Because as per the IBM manual - https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.f54em00/manage.htm#manage

FIND
Causes all lines that it finds to be displayed, and moves the cursor (scrolling if necessary) to the first occurrence of the search string.


I might be wrong as well, because when the macro starts to execute it takes me to 3.4 'Edit' option and I need to press PF3 to return back immediately returning to the next member in the PDS list, so on until the last member present in the given PDS.

But, I'm going to check the option of using the IBM's IPOUPDTE (if my shop has it installed)

Re: Changing characters in PDS members

PostPosted: Mon Apr 02, 2018 9:13 pm
by Pedro
Please issue the PANELID ON command (the panel name will be shown in the upper left). Then tell us what panel you are in at the time when you run your macro and also what panel you are in when it displays 'all the PDS members'.

fyi. You cannot just run the macro itself to process all members. You need a separate program to drive the edit repeatedly, once for each member. Use the LMMLIST service to get a list of the members.

Re: Changing characters in PDS members

PostPosted: Mon Apr 02, 2018 9:34 pm
by enrico-sorichetti
no reason to reinvent the wheel ...

pretty 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 have to write the inner macro Yourself

Re: Changing characters in PDS members

PostPosted: Tue Apr 03, 2018 7:39 pm
by Aech
Hi enrico-sorichetti,

We had File-Aid and the PDS Search/Update Utility (Option 3.6) worked like a charm with build-in report showing the changes and everything. Pretty Awesome.

Thanks :D