z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


COND parameter

z/OS MVS JCL Reference
SA23-1385-00

Parameter type

Keyword, optional

Purpose

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. If any of the test conditions are satisfied, the system evaluates the COND parameter as true and bypasses the job step. If none of the test conditions specified on the COND parameter are satisfied, the system evaluates the COND parameter as false and executes the job step.

The system performs the COND parameter tests against return codes from the current execution of the job. If a test returns a previously bypassed step, the system evaluates the test as false.

Bypassing a step because of a return code test is not the same as abnormally terminating the step. The system abnormally terminates a step following an error so serious that it prevents successful execution. In contrast, bypassing of a step is merely its omission.

If a step abnormally terminates, the system normally bypasses all following steps in the job unless the step(s) are part of an IF/THEN/ELSE/ENDIF construct that specifies the ABEND, ABENDCC, or ¬ABEND keywords, described in IF/THEN/ELSE/ENDIF statement construct. Another way to make the system execute a following step, for instance, to write a dump, is to code EVEN or ONLY on that step’s EXEC statement. The EVEN or ONLY subparameters are interpreted first. If they indicate that the step should be executed, then the return code tests, if specified, are performed. If no return code tests were typed or if none of the coded tests is satisfied, the system executes the step. Finally, steps following a step that terminated abnormally might execute. This occurs if the step that abended contained a recovery routine like ESPIE, ESTAE or FRR that intercepted the abend and requested that normal termination occur.

Instead of coding a JOB statement COND parameter, code an EXEC statement COND parameter when you want to:
  • Specify different tests for each job step.
  • Name a specific step whose return code the system is to test.
  • Specify special conditions for executing a job step.
  • Bypass only one step. When a step is bypassed because of a JOB COND parameter, all following steps in the job are bypassed.
Note: Depending on the program invoked, a test showing that a return code from a step is zero is not sufficient to verify that the step did not fail. The system can fail a step (or job) even if the return code is zero. For example, this could happen as a result of specifying CATLG_ERR FAILJOB(YES) and incurring a "post execution error". To determine if a step failed due to a "post execution error", the SMF type 30, sub-type 4 record for the job step can be examined. In this record, bit SMF30SYE in the two-byte SMF30STI field will be on if the job failed due to a "post execution error".

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014