3 Quick Tips Mastering COND parameter usage in JOB and STEP

The parameter COND controls your job steps execution as you wish in your JCL. There are some key diffrences for giving COND parameter in JOB and in STEP.

To indicate the results of its execution, a program can issue a return code. Using a COND parameter, you can test the return code and, based on the test, either 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),ONLY)

  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.


Best examples to use IF/THEN/ELSE in JCL

Top differences of COBOL  Search and Search-All


Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.