View previous topic :: View next topic
|
Author |
Message |
surupab
New User
Joined: 13 Feb 2008 Posts: 4 Location: Kolkata
|
|
|
|
Hi, I am deveoping a utility which involves submission of a job and extracting the spool info (once the job finishes) into a PS. Presently I am trying to display the job on the screen itself. After job submission, the TSO OUTPUT command is being executed and the 1st byte of the return message is checked. As soon as it comes out to be IAT6140, it is concluded that the job has completed and the spool message is brought to screen.
While doing this the prob is, as soon as the job is finished the spool is coming on screen in an infinite loop, i.e. after the entire spool is displayed, it is being displayed from the beginning once again and so on..
Can anyone please help (probably it is because of improper usage of TSO OUTPUT command).
The relevent code part is:
Code: |
ADDRESS ISPEXEC
X =X OUTTRAP(JOBSUB.)
"LIBDEF ISPLIB DATASET ID('USERID.REXX.SKEL')"
SKELNAM = UTILITY
ADDRESS ISPEXEC
"FTOPEN TEMP" ;"FTINCL &SKELNAM"; "FTCLOSE"
"VGET (ZTEMPF,ZTEMPN) SHARED"
ADDRESS TSO "SUBMIT '"ZTEMPF"'"
X = OUTTRAP(OFF)
PARSE VAR JOBSUB.1 WORD1 WORD2 JOB WORD4
ADDRESS TSO
JOBEND = ''
DO UNTIL (JOBEND = 'Y')
IF (ST1 = 'IAT6140') THEN
DO
JOBEND = 'Y'
END
X = OUTTRAP(JOBSTATUS.)
OUTPUT JOB BEGIN HOLD KEEP
PARSE VAR JOBSTATUS.1 ST1 ST2 ST3 ST4 ST5 ST6 REST
SAY 'JOBSTATUS.1' JOBSTATUS.1
X = OUTTRAP(OFF)
END
|
|
|
Back to top |
|
|
kavya123 Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 34 Location: hyderabad
|
|
|
|
what is the info you want from spool for a particular job. |
|
Back to top |
|
|
surupab
New User
Joined: 13 Feb 2008 Posts: 4 Location: Kolkata
|
|
|
|
kavya123 wrote: |
what is the info you want from spool for a particular job. |
The TSO OUTPUT command extracts the entire job info (JESMSGLG, JESJCL, JESYSMSG, SYSPRINT SYSOUT) from the spool and displays on the screen. Just do a TSO JOBNAME(JOBID) (any jobname or jobid) or do a TSO HELP OUTPUT |
|
Back to top |
|
|
kavya123 Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 34 Location: hyderabad
|
|
|
|
Quote: |
DO UNTIL (JOBEND = 'Y') |
HERE you have written a dowhile loop stating that if JOBEND = 'Y' it should come out of the loop and
Quote: |
IF (ST1 = 'IAT6140') THEN
DO
JOBEND = 'Y'
END |
but JOBEND = 'Y' only when ST1 = 'IAT6140'
but ST1 = 'IAT6140' is not happening so it is going to infinate loop. |
|
Back to top |
|
|
|