i'm trying to list all the datasets of my userid
USER='E123456'
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("USER")"
SAY RC
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR) STATS(YES)"
IF RC = 0 THEN
DO
IF ZDLDSORG \= 'PO' THEN DO
SAY DSVAR "is" ZDLDSORG
END
END
ELSE
DO
SAY RC
LEAVE
END
END
"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"
"ISPEXEC LMDINIT LISTID(IDV) LEVEL("USER")"
SAY RC
DO FOREVER
"ISPEXEC LMDLIST LISTID("IDV") OPTION(LIST) DATASET(DSVAR) STATS(YES)"
IF RC = 0 THEN
DO
IF ZDLDSORG \= 'PO' THEN DO
SAY DSVAR "is" ZDLDSORG
END
END
ELSE
DO
SAY RC
LEAVE
END
END
"ISPEXEC LMDLIST LISTID("IDV") OPTION(FREE)"
When its executed, The above code lists all the datasets of my ID and RC-0 for ISPEXEC.
Problem occurs when i tried to call this REXX from COBOl using IKJEFT01 utility (using INTRDR i submitted JCL from COBOL).
i'm getting RC 20 for all ISPEXEC lines.
Can anyone tell why i'm getting this error only when called from COBOL ?