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

JCL condition codes problem


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

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Thu Apr 20, 2006 5:06 pm
Reply with quote

I have two set of steps ie 10,20,30 and 40,50,60 under a single job.


I need both of those sets to run, even if either gets abended.


Also step70, which concatenates both the output files that comes step30 and step60 should run when step20 and step50 runs with RC of zero.

is that possible?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Apr 20, 2006 5:38 pm
Reply with quote

You may need to tweak this a bit, but maybe something like this?

Code:

//STEP10   EXEC PGM=PROG1                                     
//*                                                                 
//STEP20   EXEC PGM=PROG2
//*                                                                 
//STEP30   EXEC PGM=PROG3
//*                                                                 
// IF (ABEND | STEP10.RUN | STEP20.RUN | STEP30.RUN) THEN           
//STEP40   EXEC PGM=PROG4
//*                                                                 
//STEP50   EXEC PGM=PROG5
//*                                                                 
//STEP60   EXEC PGM=PROG6
// ENDIF                                                             
//*                                                                 
// IF (?STEP20.ABEND & STEP20.RC = 0 & ?STEP50.ABEND & STEP50.RC = 0)
// THEN                                                             
//STEP70   EXEC PGM=PROG7
// ENDIF                                                             
//*                                                                 
Back to top
View user's profile Send private message
meetsrk

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Fri Apr 21, 2006 2:20 pm
Reply with quote

Superk .. thanks for the info.

but one more query,

for "IF (ABEND)" What does it check? and when does it flag.

i mean if Condition code > zero then ABEND = True?

Thanks in advance
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 Apr 22, 2006 1:05 am
Reply with quote

IF ABEND

is TRUE if any of the previous steps abended. As you know, normally the remainder of the job is flushed when an abend condition occurs. Typically, that's what's desired. However, there are times when you may want to continue execution of the subsequent steps even if an abend occurs, as in your case.

Quote:

... if Condition code > zero then ABEND = True?


No. That just means that the Return-Code register was set by a program to contain a value higher than zero. ABEND is still FALSE.
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts AI writing DFSORT, REXX codes.. All Other Mainframe Topics 3
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
Search our Forums:

Back to Top