Identification Division - General Description

class, factory object, object, method,

, delegate, enum, operator, valuetype

function or interface.

This entire division (including the division header) is optional in a program definition.

Another way to identify the first source element defined in a file is with the basename, which is derived from the filename of the file containing the source element.

The Identification Division consists of a number of paragraphs. The paragraph header identifies the type of information contained in the paragraph.

The Author, Installation, Date-Written, Date-Compiled, and Security paragraphs are classed as obsolete elements in the ANSI'85 standard and may be deleted from the next full revision of the ANSI Standard.

All dialects in this COBOL implementation except ISO2000 fully support these obsolete paragraphs. The FLAGSTD Compiler directive can be used to detect all occurrences of this syntax.

Although they are a part of the standard COBOL definition, the obsolete paragraphs are explicitly excluded from the X/Open COBOL language definitions and should not be used in a conforming X/Open source program.

General Format


*

Syntax Rules

  1. The paragraphs can appear in any order.
  2. The periods following the paragraph-names in the Identification Division are optional as is the period following the program-name.
  3. The comment-entry can be any combination of the characters from the computer's character set. The continuation of the comment-entry by the use of a hyphen in the continuation area is not permitted. If the Compiler directive SOURCEFORMAT is specified as or defaulted to FIXED, the comment-entry can be contained on one or more lines but is restricted to area B of those lines; the next line commencing in area A begins the next non-comment entry.

    If the Compiler directive SOURCEFORMAT is specified as FREE, the comment-entry cannot be continued; the next line begins the next non-comment entry.

    The comment-entry can contain the SKIP1, SKIP2, SKIP3, EJECT or TITLE statements anywhere on the line. These statements are actioned if they are alone on a line in the comment-entry, and do not terminate the comment-entry.

    The comment-entry can contain the SKIP1, SKIP2, SKIP3, or EJECT statements anywhere in the B margin. These statements are actioned if they are alone on a line in the comment-entry, and do not terminate the comment-entry.

    The comment-entry can be contained in either area A or area B of the comment-entry lines. However, the next occurrence in area A of any one of the following COBOL words or phrases terminates the comment-entry and begin the next paragraph or division:

    • PROGRAM-ID
    • AUTHOR
    • INSTALLATION
    • DATE-WRITTEN
    • DATE-COMPILED
    • SECURITY
    • ENVIRONMENT
    • DATA
    • PROCEDURE