Issue with COND=ONLY



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Issue with COND=ONLY

Postby shivendu » Sun May 04, 2008 3:57 pm

Hi,

I have a requirement like this:

There is a JCL having 10 steps-

STEP1

STEP2

.

.

.

STEP10

This 10th step has COND=ONLY ie. if any of the above 9 step abends, then only this step would be executed.

Now, I have to add 4 new steps at the top of these 10 steps-

STEPA

STEPB

STEPC

STEPD

STEP1

STEP2

.

.

.

STEP10

Requirement is that the functionality of the 10th step should not be affected by the new steps i.e. STEP10 should be executed only if any of the steps from STEP1 to STEP9 abend and not if STEPA to STEPD abend. Now if we leave the 10th step unchanged that i.e. its still COND=ONLY, then it will be executed even when any of step A, B, C or D abends which is not desired.

Please suggest a solution.
shivendu
 
Posts: 11
Joined: Sun May 04, 2008 3:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with COND=ONLY

 

Re: Issue with COND=ONLY

Postby dick scherrer » Sun May 04, 2008 10:48 pm

Hello shivendu and welcome to the forums,

To do what you want, i believe you could use something like:
//CHECK  IF (STEP1.ABEND = TRUE)                 
//       OR (STEP2.ABEND = TRUE)                 
//       OR (STEP3.ABEND = TRUE)                 
//       OR (STEP4.ABEND = TRUE)                 
//       OR (etc.) THEN             
//*                                             
//STEP10 EXEC PGM=yourpgm                       
//*                                               
//CHECK  ENDIF               
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post