I have been creating a macro for inserting delete step in a JCL. Now I am trying to use that macro in a pds, like if i execute a macro in the command line of the PDS, all the jcls should inside the PDS(i.e) members should have delete step inserted.
So in this I have written a code as shown below :
/* REXX */
"ISREDIT (PDS) = DATASET"
"ISREDIT (MEM) = MEMBER"
X = OUTTRAP('ML.')
"LISTDS '"PDS"' MEMBERS"
DO I=7 TO ML.0
"ALLOC DATASET('"PDS"("ML.I")') DD(IN1) SHR"
"EDIT DATASET('"PDS"("ML.I")') MACRO(DELSTP)"
"EXECIO * DISKRU IN1 (FINIS. "
X = OUTTRAP('OFF')
But here I am getting errors in the line alloc if i use ADDRESS ISPEXEC. So i moved that line after the ALLOC but then I am getting error like there is a user already using the dataset where it is actually me since i tried executing the macro in the command line after opening the member in edit mode.
So my requirement is I should need my macro to be executed in the command line of the PDS so that all the members(JCLS) gets the delete step inserted.
Can some please help me out in this... please.....