I'm trying to submit a job from a rexx routine. It takes about 20 seconds to run, then when it completes browse the output dataset.
so far I have:
DUMMY = OUTTRAP("OUTLINE.","*")
"SUBMIT * END(GO)"
SAY "OUTPUT DATASET : "||DSNAME1
SAY " "
SAY "THIS MAY TAKE A MINUTE"
SAY "PLEASE WAIT UNTIL JOB COMPLETES"
JOBNAME = SUBWORD(OUTLINE.2,2,1)
JOBNAME = STRIP(SUBSTR(JOBNAME,1,8))
/* WAIT UNTIL THE JOB COMPLETES. */
I = 1
FINALMSG = OUTLINE.I
JB = SUBWORD(FINALMSG,4,1)
IF JB = JOBNAME THEN exit
I = I + 1
DUMMY = OUTTRAP("OFF")
ADDRESS ISPEXEC "BROWSE DATASET("DSNAME1")"
so far I will get the following:
OUTPUT DATASET : PRODWORK.PCS2SMF.ESP.REPORT
THIS MAY TAKE A MINUTE
PLEASE WAIT UNTIL JOB COMPLETES
JOB PPCS2SMF(JOB59492) SUBMITTED
11.29.38 JOB59492 $HASP165 PPCS2SMF ENDED AT UPSRRCH MAXCC=0 CN(INTERNAL)
unfortunately it never exits after job completes. Anyone have any ideas?