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
 

 

JCL condition codes problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL condition codes problem
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

Moderator Team Head


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

PostPosted: Thu Apr 20, 2006 5:38 pm    Post subject: Re: JCL condition codes problem
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    Post subject:
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

Moderator Team Head


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

PostPosted: Sat Apr 22, 2006 1:05 am    Post subject: Re: JCL condition codes problem
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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