Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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: 4650
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us