Multiple choice technology mainframe

When is a scope terminator mandatory?

  1. in-line PERFORMS

  2. EVALUATE

  3. IF

  4. all

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

Scope terminators (like END-PERFORM, END-EVALUATE) are mandatory for in-line PERFORMs and EVALUATE statements to clearly delimit the statement block. They are optional (not mandatory) for IF statements, though recommended for clarity. 'all' is incorrect.

AI explanation

In-line PERFORM statements (ones with imperative statements directly inside the PERFORM rather than a separate paragraph) require an explicit END-PERFORM scope terminator because there's no paragraph boundary to mark where the loop body ends. Likewise, EVALUATE requires END-EVALUATE to unambiguously close its WHEN branches. IF, by contrast, can be terminated either by END-IF or simply by a period, so its terminator isn't mandatory the way the other two are.