Multiple choice technology mainframe

Complete correctly: The EXIT clause ends...

  1. Ia loop unconditionally and continues with the next clause after the loop

  2. IF var_1 = var_2 THEN var_1 = var_1 + a loop and EXEC unconditionally, but doesn't return to the caller of the EXEC.

  3. a loop and EXEC unconditionally, returns to the caller of the EXEC and provides a return code.

  4. a loop and EXEC unconditionally, returns to the caller of the EXEC, but doesn't provide a return code.

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

The EXIT clause in JCL terminates a loop immediately and transfers control back to the calling EXEC with a return code. This is different from a normal loop exit which would continue with the next statement after the loop. The return code allows the calling program to check if the EXEC completed successfully or encountered a condition that required early termination.

AI explanation

The EXIT clause (as used in REXX/CLIST-style exec processing) unconditionally terminates the current loop and the EXEC itself, passing control back to whatever invoked the EXEC and supplying a return code to that caller. This differs from a plain loop-ending clause (like LEAVE), which only exits the loop and continues within the same program rather than returning to the caller.