Page 1 of 1

Issue with COND=ONLY

PostPosted: Sun May 04, 2008 3:57 pm
by shivendu
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.

Re: Issue with COND=ONLY

PostPosted: Sun May 04, 2008 10:48 pm
by dick scherrer
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