Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Scope of statements (scope terminators)

Scope terminators delimit the scope of certain Procedure Division statements.Statements which include their explicit scope terminators are termed delimited scope statements.
The scope of statements which are contained within other statements (nested) may also be implicitly terminated.
When statements are nested within other statements, a separator period which terminates the sentence also implicitly terminates all nested statements.

Whenever any statement is contained within another statement, the next phrase of the containing statement following the contained statement terminates the scope of any unterminated contained statement.
When a delimited scope statement is nested within another delimited scope statement with the same verb, each explicit scope terminator terminates the statement begun by the most recently preceding, and as yet unterminated, occurrence of that verb.
When statements are nested within other statements which allow optional conditional phrases, any optional conditional phrase encountered is considered to be the next phrase of the nearest preceding unterminated statement.
An unterminated statement is one which has not been previously terminated either explicitly or implicitly.

In addition to the separator period (implicit scope terminator), the following explicit scope terminators can be used to support structured programming:

END-ACCEPT
END-ADD
END-CALL
END-COMPUTE
END-DELETE
END-DISPLAY

END-DIVIDE
END-EVALUATE
END-IF
END-INVOKE
END-MULTIPLY
END-OPEN

END-PERFORM
END-READ
END-RECEIVE
END-RETURN
END-REWRITE
END-SEARCH

END-START
END-STRING
END-SUBTRACT
END-UNSTRING
END-WRITE
END-XML


Explicit scope terminators are reserved COBOL words.