COBOL - Group home

End markers

  

End markers are a combination of words followed by a separator period that indicates the end of a COBOL program, method, class, factory, or object definition. The following end marks are IBM extensions for both AIX and Enterprise COBOL. Please pay attention to the conventions when you use them:

  • For programs - program-name must be identical to the program-name of the corresponding PROGRAM-ID paragraph. Every COBOL program, except an outermost program that contains no nested programs and is not followed by another batch program, must end with an END PROGRAM marker.
  • For classes - class-name must be identical to the class-name in the corresponding CLASS-ID paragraph.
  • For methods - method-name must be identical to the method-name in the corresponding METHOD-ID paragraph.
  • For object paragraphs - There is no name in an object paragraph header or in its end marker. The syntax is simply END OBJECT.
  • For factory paragraphs - There is no name in a factory paragraph header or in its end marker. The syntax is simply END FACTORY.