Dear all:
i am try to run a rexx and using ISPF LMMFIND service to get meber's some infomation,when mem not
found,set rc to 16 and exit rexx,but the result not expect. Although exit REXX but,return code is zero,not 16.
i think it is ispf service return code.
How to set rc to 16 at final job end?
Can any one give me a sugguestion ?
thanks .
my REXX
Do i = 1 to JobName.0
address ispexec
"lmmfind dataid("did") member("JobName.i") stats(yes)"
if rc = 0 then /* yes,found the job */
Do
JobName_out = LEFT(STRIP(JobName.i),8) /* default pad is blank */
zlchtime = zlmtime || ":" || zlmsec
out_rec = JobName_out zlcnorc zlc4date zlm4date zlchtime,
zluser zlinorc zlvers zlmod
SAY "OUT_REC IS :" OUT_REC
push out_rec
address tso
"EXECIO 1 DISKW JobStats"
job_count = job_count + 1
End
else /* member not found */
Do
Job_err = STRIP(JobName.i)
say "The job" Job_err "not in" SrcLib
Err_msg = "ERR!! The job " || Job_err || " not in " || SrcLib
Call WTO_MSG Err_msg
exit 16
End
JOB LOG
13.32.54 JOB52174 ---- MONDAY, 25 APR 2011 ----
13.32.54 JOB52174 IRR010I USERID BB9G IS ASSIGNED TO THIS JOB.
13.32.54 JOB52174 ICH70001I BB9G LAST ACCESS AT 13:32:27 ON MONDAY, APRIL 2
13.32.54 JOB52174 $HASP373 RX$LMDIR STARTED - INIT 2 - CLASS A - SYS ZST1
13.32.54 JOB52174 IEF403I RX$LMDIR - STARTED - TIME=13.32.54
13.32.58 JOB52174 +OPEN JOBTABLE FILE SUCCESSFUL
13.32.58 JOB52174 +OPEN JOBSTATS FILE SUCCESSFUL
13.32.58 JOB52174 +ERR!! THE JOB AD$DDBKZ NOT IN PN.BATCHLIB
13.32.59 JOB52174 - --TIMINGS (MIN
13.32.59 JOB52174 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN TCB SRB
13.32.59 JOB52174 -RX$LMDIR ISPF 00 410 201 .00 .00
13.32.59 JOB52174 IEF404I RX$LMDIR - ENDED - TIME=13.32.59
13.32.59 JOB52174 -RX$LMDIR ENDED. NAME- TOTAL TCB CPU TIM
13.32.59 JOB52174 $HASP395 RX$LMDIR ENDED
and there are some error in SYSTPRT OUTPUT
ISPD117
The initially invoked CLIST ended with a return code = 16