🖥 JCL
JCL COND Parameter
Intermediate 🕑 15 min read
👁 0 views
15
Code Example
## JCL COND Parameter
The COND parameter controls conditional step execution based on return codes from previous steps.
### Syntax
\`\`\`jcl
COND=((code,operator)[,stepname[.procstep]])
COND=((code,operator,stepname),(code,operator,stepname),...)
COND=EVEN
COND=ONLY
\`\`\`
### Operators
| Operator | Meaning |
|----------|---------|
| GT | Greater than |
| GE | Greater or equal |
| EQ | Equal |
| NE | Not equal |
| LT | Less than |
| LE | Less or equal |
### Logic (IMPORTANT)
If condition is TRUE, step is **BYPASSED** (not executed).
Think: "SKIP this step IF..."
### Examples Explained
\`\`\`jcl
COND=(4,LT) Skip if 4 < any RC (skip if RC > 4)
COND=(0,NE) Skip if 0 != any RC (skip if any RC != 0)
COND=(8,LE,STEP1) Skip if 8 <= STEP1 RC (skip if STEP1 RC >= 8)
\`\`\`
### EVEN and ONLY
- **EVEN**: Execute even if previous step abended
- **ONLY**: Execute only if previous step abended
### Job-Level COND
On JOB statement, applies to all steps:
\`\`\`jcl
//JOB1 JOB ...,COND=(8,LE)
\`\`\`