JCL condition codes are an excellent option in controlling the execution of JCL steps. Total 3 ways we can control the execution of steps. As you know JCL is powerful language in MVS.
The first point – is to control the execution of Job steps in JCL. The second point – is giving Condition code in the step.
1. COND in Job Step
//step2 exec pgm=program,cond=(4,GE).
This step executes when the condition 4>=RC.step1, fails. similarly you can control execution of steps in the proc. Refer here for more details.
2. COND in Job Card
//jobname job (acctinfo),cond=(4,LE).
for each step, it checks COND code in the job. If false, then only that step executes.