JCL evergreen Interview Question on COND Parameter

Photo Shape Editor: https://www.tuxpi.com/photo-effects/shape-tool
ETL+Hadoop+Skills are in demand

Almost in all interviews this question asked. The basic usage of COND parameter is to control execution of job steps.

  • Some rules for JCL COND parameter

Use the COND parameter to test return codes from previous job steps and determine whether to bypass this job step. You can specify one or more tests on the COND parameter, and you can test return codes from particular job steps or from every job step that has completed processing.

  1. The JOB statement COND parameter performs the same return code tests for every step in a job. If a JOB statement return code test is satisfied, the job terminates.
  2. An EXEC statement COND parameter performs return code tests for only its step in a job. Using EXEC COND parameters, different tests can be performed for each step.

How to bypass execution of first Job Step 

  • Only with COND parameter we cannot bypass first step.
  • With IF/ELSE/ THEN /ENDIF statements in first step, whatever be the condition, the first step skips execution

Rules you always need to remember

  • -COND test satisfies at step level then that step will not execute
  • -COND test satisfies at Job level then the jobs will not execute

Related:

  1. Best example for IF/ELSE/THEN/ENDIF for job step in JCL 
  2. How to give COND parameter both at Job level and Step level
Advertisements

Author: Srini

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