IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get last running return code and which step abend?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vice_versa
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 19
Location: usa

PostPosted: Fri Sep 19, 2008 11:57 pm
Reply with quote

Code:
 JoB like below:             
  //Step001 exec pgm=program1
  //Step002 exec pgm=program2
  //Step003 exec pgm=program3
  //Step004 exec pgm=program4

QA1:I want to get last runing return code(IE Step001,Step002,Step003
may all run,also run 1 or 2 step2)

QA2:If Step001 is abend,Step002 and Step003 not running,
in step004 how can I know which step abend?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Sep 20, 2008 12:03 am
Reply with quote

Does this previous topic help?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Sat Sep 20, 2008 1:11 am
Reply with quote

To detect abends in a particular step, You could choose one of several versions of STEP4 by using the IF/THEN/ELSE test
Code:
//    IF  (STEP001.ABEND) THEN
//STEP004A EXEC PGM=program4
//     ENDIF
]//    IF  (STEP002.ABEND) THEN
//STEP004B EXEC PGM=program4
//     ENDIF
...etc...


For capturing return codes by step, it's best done after the fact with a batch execution of SDSF to read the job output from spool. Search the REXX forum for SDSF.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top