Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Infinite loop while tryin 2 extract Job info 4m spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
surupab

New User


Joined: 13 Feb 2008
Posts: 4
Location: Kolkata

PostPosted: Tue Apr 22, 2008 12:05 pm    Post subject: Infinite loop while tryin 2 extract Job info 4m spool
Reply with quote

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
View user's profile Send private message

kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Tue Apr 22, 2008 12:41 pm    Post subject:
Reply with quote

what is the info you want from spool for a particular job.
Back to top
View user's profile Send private message
surupab

New User


Joined: 13 Feb 2008
Posts: 4
Location: Kolkata

PostPosted: Tue Apr 22, 2008 12:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Tue Apr 22, 2008 3:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Need info with DBRC recovery ashek15 IMS DB/DC 0 Mon Jan 23, 2017 6:43 am
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
No new posts save SAY var loop. italo_pm CLIST & REXX 3 Sun Sep 04, 2016 3:06 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us