ANS85 

End Markers

End markers indicate the end of a definition

General Format

End Marker

Note: The Delegate-ID paragraph is not yet supported in COBOL for JVM.

Syntax Rules

  1. An end marker must be present in every source unit that contains, is contained in, or precedes another source unit.
  2. Program-name-1 must be identical to the program-name declared in a preceding Program-ID paragraph.
  3. If a Program-ID paragraph declaring a specific program-name is stated between the Program-ID paragraph and the END PROGRAM marker for program-name-1, then an END PROGRAM marker referencing program-name must precede the END PROGRAM marker referencing program-name-1.
  4. ISO2002MF Function-prototype-name-1 must be identical to the function-prototype-name declared in the corresponding Function-ID paragraph.
  5. ISO2002MF User-function-name-1 must be identical to the user-function-name declared in the corresponding Function-ID paragraph.
  6. ISO2002MF Program-prototype-name-1 must be identical to the program-prototype-name declared in the corresponding Program-ID paragraph.
  7. ISO2002MF Class-name-1 must be identical to the class-name declared in the corresponding Class-ID paragraph.
  8. ISO2002MF Method-name-1 must be identical to the method-name declared in the corresponding Method-ID paragraph.

    If the PROPERTY phrase is specified in the Method-ID paragraph, method-name-1 must be omitted.

  9. ISO2002MF Interface-name-1 must be identical to the interface-name declared in the corresponding Interface-ID paragraph.
  10. If the source unit terminated by the end marker is contained within another source unit, the next statement must be either the first statement of a source unit or another end marker that terminates the containing source unit.
  11. If the source unit terminated by an end marker is not contained within another source unit, the next statement must be the first statement of a compilation unit.

General Rules

  1. An end marker indicates the end of the specified source unit.