COND parameter
Parameter type
Keyword, optional
Purpose
Use the COND parameter to specify the return code tests the system uses to determine whether a job will continue processing. Before and after each job step is executed, the system performs the COND parameter tests against the return codes from completed job steps. If none of these tests is satisfied, the system executes the job step; if any test is satisfied, the system bypasses all remaining job steps and terminates the job.
The tests are made against return codes from the current execution of the job. A step bypassed because of an EXEC statement COND parameter does not produce a return code.
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.
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."