by Halka » Wed Dec 12, 2007 7:02 am
i think this would help you........
ADDRESS TSO
X = OUTTRAP("VAR.")
"SUBMIT 'ur dataset name(passes)'"
TSOMSG = VAR.1 /* FIND THE JOB SUBMITTED MSG */
JBID = SUBSTR(TSOMSG,17,5) /*IDENTIFY THE JOB ID */
JNO = 'J0' || JBID
JBNM = SUBSTR(TSOMSG,5,8) /*IDENTIFY THE JOB NAME*/
/* WAIT UNTIL THE SEARCH JOB HAS RUN THROUGH. */
I = 1
DO FOREVER
"STATUS " || JBNM ||"(" || JNO || ")"
FINALMSG = VAR.I
IF SUBWORD(FINALMSG,4,2) = "OUTPUT QUEUE" THEN
LEAVE
I = I + 1
END
Y = OUTTRAP("OFF")
X = 1