Scope terminators delimit the scope of certain Procedure Division statements (delimited scope statements), and are of two types: explicit and implicit.
The explicit scope terminators are listed below:
- END-ADD
- END-PERFORM
- END-ACCEPT
- END-CALL
- END-CHAIN
- END-COMPUTE
- END-DELETE
- END-DISPLAY
- END-DIVIDE
- END-EVALUATE
- END-IF
- END-MULTIPLY
- END-READ
- END-RETURN
- END-REWRITE
- END-SEARCH
- END-START
- END-STRING
- END-SUBTRACT
- END-UNSTRING
- END-WRITE
Note: In some cases the delimited scope statement with which an explicit scope delimiter is paired is determined differently for different COBOL language specifications.
Implicit scope termination occurs:
- At the end of any sentence, where the separator period terminates the scope of all previous statements not yet terminated
- Within any statement containing another statement. The next phrase of the containing statement (for example, ELSE, WHEN, AT END, and so on) following the contained statement terminates the scope of any unterminated contained statement.