I am trying to get multiple members in a PDS to get updated for a input value which I am asking user to enter but it gives me a message that "macro not found" after showing all the members sequentially.
Please see the below rexx exec:
/* REXX ***/
SAY "ENTER THE DSN NAME.. ONLY"
PULL DSN
SAY "ENTER FROM DISS :"
PULL INPUT1
SAY "ENTER TO DISS :"
PULL INPUT2
"ISPEXEC VPUT (DSN) SHARED"
"ISPEXEC VPUT (INPUT1) SHARED"
"ISPEXEC VPUT (INPUT2) SHARED"
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") MACRO(IM001)"
ADDRESS ISREDIT
"CHANGE REXX HI ALL"
"SAVE"
"MEND"
END
SAY "ENTER THE DSN NAME.. ONLY"
PULL DSN
SAY "ENTER FROM DISS :"
PULL INPUT1
SAY "ENTER TO DISS :"
PULL INPUT2
"ISPEXEC VPUT (DSN) SHARED"
"ISPEXEC VPUT (INPUT1) SHARED"
"ISPEXEC VPUT (INPUT2) SHARED"
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") MACRO(IM001)"
ADDRESS ISREDIT
"CHANGE REXX HI ALL"
"SAVE"
"MEND"
END
and the macro IM001:
/*REXX*/
ISREDIT "MACRO PROCESS"
TRACE OFF
"ISREDIT (USTAT) = USER_STATE"
"ISPEXEC VGET (ENDEXEC) SHARED"
"ISPEXEC VGET (INPUT2) SHARED"
"ISPEXEC VGET (INPUT1) SHARED"
ISREDIT "C ALL " INPUT1 INPUT2
ISREDIT "RESET "
ISREDIT "END"
EXIT
ISREDIT "MACRO PROCESS"
TRACE OFF
"ISREDIT (USTAT) = USER_STATE"
"ISPEXEC VGET (ENDEXEC) SHARED"
"ISPEXEC VGET (INPUT2) SHARED"
"ISPEXEC VGET (INPUT1) SHARED"
ISREDIT "C ALL " INPUT1 INPUT2
ISREDIT "RESET "
ISREDIT "END"
EXIT
I know it can be best done through panels but As I am a beginner I would like to do it first in this way.
Please pardon any silly mistake.
Thanks,
Sumit