Delimited Scope Terminator


A Delimited scoper terminator acts as a scope terminating statement to the COBOL statements so that the resulting COBOL statement can be identified as ended or nested.

There are two types of delimited scope statements -

  • Implicit scope terminators
  • Explicit scope terminators

Implicit scope terminator -

A period is considered as an implicit scope terminator. If the period is coded at the end of any statement, that terminates the scope of the current statement and all previous statements that are not terminated earlier.

For example -

COMPUTE WS-A = WS-B + WS-C.

Period specifies that the COMPUTE statement is ended and next statement follows.

Explicit scope terminator -

An explicit scope terminator is a statement that marks the end of PROCEDURE DIVISION statements. Most PROCEDURE DIVISION statements have their explicit scope terminators separately. The explicit scope terminator starts with END- followed by the statement.

For example -

COMPUTE WS-A = WS-B + WS-C
END-COMPUTE

END-COMPUTE is the scope terminator for COMPUTE statement.

Some of the explicit scope terminators listed below -

  • END-ADD
  • END-CALL
  • END-COMPUTE
  • END-DELETE
  • END-DIVIDE
  • END-EVALUATE
  • END-IF
  • END-INVOKE
  • END-MULTIPLY
  • END-PERFORM
  • END-READ
  • END-RETURN
  • END-REWRITE
  • END-SEARCH
  • END-START
  • END-STRING
  • END-SUBTRACT
  • END-UNSTRING
  • END-WRITE