skip to main content

Program Structure

Program Structure
Synopsis
The schema below shows how a COBOL program is structured. For simplifying access to information, it has been split into smaller parts.
 [{IDENTIFICATION} DIVISION. ]
  {ID            }
  { {PROGRAM-ID }. Program-Name [ IS {INITIAL } PROGRAM ] .
    {FUNCTION-ID}                    {RESIDENT}
      [ INSTALLATION. [Comment-Entry .] ]
      [ DATE-WRITTEN. [Comment-Entry .] ]
      [ DATE-COMPILED. [Comment-Entry .] ]
      [ SECURITY. [Comment-Entry .] ]
      [ END PROGRAM. ]                                              }
  { CLASS-IDClass-Name [ AS Literal ]
      [ INSTALLATIONComment-Entry . ]
      [ DATE-WRITTENComment-Entry . ]
      [ DATE-COMPILEDComment-Entry . ]
      [ INSTALLATIONComment-Entry . ]
      [ DATE-WRITTENComment-Entry . ]
      [ DATE-COMPILEDComment-Entry . ]
      [ {IDENTIFICATIONDIVISION.
        {ID            }
          [ PROCEDURE DIVISION.
              METHOD-IDMethod-Name [ AS Literal ] [ IS {PUBLIC   } ] [ OVERRIDE ].
                END METHOD. ] ... ]
          END FACTORY. ]
      [ {IDENTIFICATIONDIVISION.
        {ID            }
          [ PROCEDURE DIVISION.
              METHOD-IDMethod-Name [ AS Literal ] [ IS {PUBLIC   } ] [ OVERRIDE ].
                END METHOD. ] ... ]
          END OBJECT. ]
Syntax rules
1.
Program-Name is a User-defined word, as defined in the Definitions section in the Preface of this document.
2.
Each reference to Comment-Entry is a Comment-Entry, as defined in the Definitions section in the Preface of this document.
3.
Each reference to Class-Name is a User-defined word, as defined in the Definitions section in the Preface of this document.
4.
Interface-Name is a User-defined word, as defined in the Definitions section in the Preface of this document.
5.
Each reference to Method-Name is a User-defined word, as defined in the Definitions section in the Preface of this document.
6.
Each reference to Literal is a Nonnumeric Literal, as defined in the Definitions section in the Preface of this document.
General rules
1.
 

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left