Changing characters in PDS members



IBM's Command List programming language & Restructured Extended Executor

Changing characters in PDS members

Postby Aech » Mon Apr 02, 2018 2:17 pm

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.
Aech
 
Posts: 6
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Changing characters in PDS members

 

Re: Changing characters in PDS members

Postby prino » Mon Apr 02, 2018 6:36 pm

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.
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post:
Aech (Tue Apr 03, 2018 7:40 pm)
User avatar
prino
 
Posts: 561
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 24 times

Re: Changing characters in PDS members

Postby Aech » Mon Apr 02, 2018 7:52 pm

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)
Aech
 
Posts: 6
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Changing characters in PDS members

Postby Pedro » Mon Apr 02, 2018 9:13 pm

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.
Pedro Vera

These users thanked the author Pedro for the post:
Aech (Tue Apr 03, 2018 7:40 pm)
User avatar
Pedro
 
Posts: 584
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 41 times

Re: Changing characters in PDS members

Postby enrico-sorichetti » Mon Apr 02, 2018 9:34 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
Aech (Tue Apr 03, 2018 7:40 pm)
enrico-sorichetti
Global moderator
 
Posts: 2761
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 143 times

Re: Changing characters in PDS members

Postby Aech » Tue Apr 03, 2018 7:39 pm

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
Aech
 
Posts: 6
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 4 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post