What is a scope terminator?
-
Scope terminator is used to mark the end of a verb
-
Scope terminator is used to mark the end of a statement
-
Both 1 and 2
-
None of the above
A scope terminator marks the end of a verb or statement in COBOL. Explicit scope terminators like END-IF, END-PERFORM, END-READ make the code more readable and prevent ambiguity by clearly defining where a conditional or iterative construct ends. Both options 1 and 2 correctly describe the purpose of scope terminators.
Per COBOL language standards (IBM COBOL documentation), "a scope terminator ends a verb or a statement." Explicit scope terminators (END-IF, END-PERFORM, END-EVALUATE, etc.) close a specific verb without ending the whole sentence, letting verbs be nested inside one another. The implicit scope terminator - a period - ends the scope of all previously unterminated statements at once, i.e., it ends a statement/sentence. Because scope terminators serve both roles depending on which form (explicit vs. implicit) is used, the complete and accurate description is that they mark the end of a verb AND the end of a statement, not just one or the other. So 'Both 1 and 2' is the correct, standards-consistent answer.