Multiple choice technology mainframe

Say A, B, C, ... are COBOL statements, in which order will they be executed? MAIN-PAR. PERFORM INIT-PAR Z PERFORM TERM-PAR X STOP RUN. INIT-PAR. A B PERFORM READ-X. LOOP-PAR. E F. TERM-PAR. G H. READ-X. X.

  1. A B Z E F Z X

  2. A B X Z E F G H Z X

  3. A B X Z G H X

  4. A B X Z G H Z

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

Execution follows: MAIN-PAR calls INIT-PAR (A, B, then PERFORM READ-X executes X), then PERFORM LOOP-PAR (but LOOP-PAR is never defined, so this might be an error - however READ-X contains X so X executes again), then PERFORM TERM-PAR (G, H), then STOP RUN (Z). Sequence: A, B, X, X, G, H, Z. However option C shows A B X Z G H X which seems inconsistent. Let me re-examine - the LOOP-PAR is never called from INIT-PAR since it only says PERFORM READ-X. So after INIT-PAR completes (A,B,X), control returns to MAIN-PAR which then does Z (PERFORM LOOP-PAR) but LOOP-PAR isn't shown... actually the option might be assuming simplified flow.