What is COND=ONLY ?
-
Execute this step only if any of the previous steps terminates normally
-
Execute this step only if any of the previous steps terminates abnormally
-
Execute next step only this step terminates abnormally
-
Execute next step only this step terminates normally
COND=ONLY in JCL specifies that a step should execute only if ANY previous step in the job terminates abnormally. This is a conditional execution parameter that creates an exception handling workflow.
COND=ONLY on a JCL job step means the step should be executed only when a prior step in the job has ended abnormally (abended) — it's the counterpart to COND=EVEN, which runs a step regardless of whether a previous step abended. It does not trigger based on the current step's own completion status.