Here Step1 returned RC = 0. we know that COND in Job card will override COND in EXEC.
As a result i expected the step2 will be executed as the COND parameter in the job card will override it. But the output i got is, step 1 only executed and not step 2. Please help me to understand the logic.
COND written in EXEC statement overrides on COND written in JOB stmt.
this is wrong. both are evaluated. the first step is always executed
jcl reference =>
If you code the COND parameter on the JOB statement and on one or more of the job's EXEC statements, and if a return code test on the JOB statement is satisfied, the job terminates. In this case, the system ignores any EXEC statement COND parameters.
If the tests on the JOB statement are not satisfied, the system then performs the return code tests on the EXEC statement. If an EXEC return code test is satisfied, the step is bypassed.