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
 
To Execute a step only when few steps in the job abends

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Wed Apr 30, 2008 10:03 am    Post subject: To Execute a step only when few steps in the job abends
Reply with quote

I have 10 steps in my job STEP1, STEP2 ... STEP10.

I want STEP10 to be executed only when STEP3 or STEP4 or STEP5 or STEP6 or STEP7 abends.

Please let me know how this can be achieved.
Back to top
View user's profile Send private message

the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Apr 30, 2008 10:42 am    Post subject:
Reply with quote

use COND=(ONLY) for that step which you want to execute iff the above mentioned steps are abended.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Apr 30, 2008 11:43 am    Post subject:
Reply with quote

And if STEP8 abends ???
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2008 11:48 am    Post subject:
Reply with quote

Hello,

Do you really mean "abended" or do you mean some undesirable condition code has been set?

If you explain what the "watched" steps (i.e. steps 3, 4, 5, 6. 7) acccomplish and what you want step10 to do when an abend occurs in one of the "watched" steps, we can possibly offer more useful suggestions.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Apr 30, 2008 12:10 pm    Post subject:
Reply with quote

Hi,
assuming you do mean abend then this should work

Code:
//CHECK01  IF (ST03.ABEND = TRUE)                 
//         OR (ST04.ABEND = TRUE)                 
//         OR (ST05.ABEND = TRUE)                 
//         OR (ST06.ABEND = TRUE)                 
//         OR (ST07.ABEND = TRUE) THEN             
//*                                               
//ST10     EXEC PGM=IEFBR14                       
//*                                               
//CHECK01  ENDIF                                   



Gerry
Back to top
View user's profile Send private message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Wed Apr 30, 2008 2:06 pm    Post subject: Reply to: To Execute a step only when few steps in the job a
Reply with quote

I too used this only.

Is there any limit to the number of conditions that can be checked in a IF statement.
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
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm

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