When issuing Commands and Subcommands from REXX, I run into a problem, in that subcommands are never executed. I can do it with CLIST, so I generate a CLIST from REXX and execute the CLIST. The problem is I always get a 0 return code back from the CLIST... Any ideas.
Here is a simplified version of the code
/************************** REXX *****************/
"DEL TMP.CLIST"
"ALLOC DA(TMP.CLIST) NEW SPACE(1,1) RECFM(F,B) LRECL(80),
BLKSIZE(27920) FI(OUTFILE)"
SAY 'GIVE ME AN ID'
PULL ID
QUEUE "ACF"
QUEUE "T TE"
QUEUE "L " ID
QUEUE "Q"
N1 = QUEUED()
"EXECIO" N1 "DISKW OUTFILE (FINIS"
"FREE FI(OUTFILE)"
EX TMP.CLIST
IF RC \= 0 THEN
SAY ID " NOT FOUND"
ELSE
SAY ID " FOUND"
In this example, &MAXCC after the Q is 4 when not found, but RC is always 0
Here is a simplified version of the code
/************************** REXX *****************/
"DEL TMP.CLIST"
"ALLOC DA(TMP.CLIST) NEW SPACE(1,1) RECFM(F,B) LRECL(80),
BLKSIZE(27920) FI(OUTFILE)"
SAY 'GIVE ME AN ID'
PULL ID
QUEUE "ACF"
QUEUE "T TE"
QUEUE "L " ID
QUEUE "Q"
N1 = QUEUED()
"EXECIO" N1 "DISKW OUTFILE (FINIS"
"FREE FI(OUTFILE)"
EX TMP.CLIST
IF RC \= 0 THEN
SAY ID " NOT FOUND"
ELSE
SAY ID " FOUND"
In this example, &MAXCC after the Q is 4 when not found, but RC is always 0