Pages

Search This Blog

Sunday, 9 March 2014

COND PARAMETER IN JCL - OVERRIDE

COND parameters in JCL used to bypass selective steps in a job based on the condition returned by previous step. It can be coded in both JOB and EXEC statement.
//MYJOB  JOB  (U3369),'RAJESH', COND=(4,GT)
//STEP1  EXEC  PGM=PROG1
//STEP2  EXEC  PGM=COBPROG,COND=(8,EQ)
 
 The first step in a job will not check for conditions at any time. 
With the above example consider 
if step 1 returns 0:
STEP2 first checks it with the JOB card condition.

4> 0 true, so no step is executed halts execution
If first step returns 8:

4>8 false, now step condition is verified. 8=8 true, so step 2 is not executed because
of the step condition
If first step returns 12:

4> 12 false, now step condition is verified, 8=12 false, so step 2 is executed.

This means JOB COND overrides STEP condition. 

No comments:

Post a Comment