Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

END markers

Function

END markers indicate the end of a known source unit, where a source unit is a sequence of statements that begins with an Identification Division and ends with an END marker.

Format


END  {  PROGRAM program-prototype-name-1
      | PROGRAM program-name-1
      |  CLASS class-name-1
      | FACTORY
      | OBJECT
      | METHOD [method-name-1]
      | INTERFACE interface-name-1
     }.

Syntax rules

  1. An END marker must be present in every source unit that contains, is contained in, or precedes another source unit.

  2. If a PROGRAM-ID paragraph for program-name-2 is stated between a PROGRAM-ID paragraph for program-name-1 and its associated END marker, then the END marker for program-name-2 must precede the END marker for program-name-1.

  3. program-name-1 must be identical to the program name declared in the PROGRAM-ID paragraph of the program to which the END marker refers.

  4. class-name-1 must be identical to the class name declared in the corresponding CLASS-ID paragraph.

  5. method-name-1 must be identical to the method name declared in the corresponding METHOD-ID paragraph.

  6. interface-name-1 must be identical to the interface name declared in the corresponding INTERFACE-ID paragraph.

  7. program-prototype-name-1 must be identical to one of the program prototype names declared in the corresponding PROGRAM-ID paragraph.