Multiple choice technology programming languages

STEP1 EXEC PGM=P1 STEP2 EXEC PGM=P2,COND=EVEN STEP3 EXEC PGM=P3,COND=((8,LE,STEP1),ONLY) If the condition code of the step1 is 4 and the step2 was abended then which statement is correct.

  1. step1, step2 and step3 will execute

  2. only step1 and step3 will execute

  3. only step1 and step2 will execute

  4. only step1 will execute

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

STEP1 executes and returns a condition code of 4. STEP2 executes next because it has COND=EVEN (runs even if previous steps abended), and it abends. STEP3 has COND=((8,LE,STEP1),ONLY). ONLY means run only if a prior step abended. Since STEP2 abended, and the condition 8 LE 4 is false (meaning STEP1's code 4 is not greater than or equal to 8, so we do not bypass), STEP3 executes. Thus, all three steps execute.