I am trying to change a word, for ex. "REXX" to "HI" in multiple members of a PDS using REXX. But when ever I execute my code it simply opens the member in EDIT mode and does nothing. Then I press F3 and it simply opens the next member without doing anything..
Please find the code below -
/* REXX */
SAY "ENTER THE DSN NAME.. ONLY"
PULL DSN
SAY DSN
X = OUTTRAP('SS.')
"LISTDS '"DSN"' MEMBERS"
X = OUTTRAP('OFF')
DO I = 7 TO SS.0
PARSE VAR SS.I MEM
MEM=STRIP(MEM)
SAY "MEMBER NAME IS:" MEM
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEM")')"
ADDRESS ISREDIT
"CHANGE REXX HI ALL"
"SAVE"
"MEND"
END
on how to apply a macro to all the member of a pds
the previous snippet was about changing tokens without You writing any additional code
this last snippet is just an harness ...
You will have to write the inner edit macro for Your process
if You are new to REXX probably You are not up for the task
if Your shop has fileAID or FileMANAGER it would be much simpler to use them
search the forum for examples