The COND parameter in JCL controls the execution of job steps. And can be applied differently at the JOB and STEP levels.

When a program finishes, it generates a return code. The COND parameter allows you to evaluate this code to determine whether to bypass or execute a step.

The COND parameter can be specified on either a JOB or EXEC statement by coding

//jobname JOB acct,progname,COND=(code,operator) 
//jobname JOB acct,progname,
//     COND=((code,operator),(code,operator)) 
//stepname EXEC PGM=x,COND=(code,operator) 
//stepname EXEC PGM=x,COND=(code,operator,stepname) 
//stepname EXEC PROC=x,
//     COND=((code,operator,stepname.procstepname)) 
//stepname EXEC PGM=x,COND=EVEN 
//stepname EXEC PGM=x,COND=ONLY 
//stepname EXEC PGM=x,COND=((code,operator),EVEN) 
//stepname EXEC PGM=x,COND=((code,operator,stepname),

Top Ideas

  1. If an EXEC statement COND parameter causes a step to be bypassed, only that step is not executed; the following steps are executed or not, depending on their COND parameters.
  2. If a JOB statement COND parameter causes a step to be bypassed, the system bypasses all remaining job steps. Bypassing a step because of an EXEC COND parameter is not the same as abnormally terminating the step.
  3. Bypassing permits the following steps to be executed; abnormally terminating causes all following steps to be bypassed, unless they contain EVEN or ONLY in their EXEC COND parameters.