Identification Division

The identification division must be described first in all COBOL source programs. This division consists of a PROGRAM-ID paragraph and OPTIONAL paragraphs that describe the program name and program information.

This chapter explains the structure of the identification division.

1. PROGRAM-ID Paragraph

The PROGRAM-ID paragraph specifies a program’s name and attributes. It is required and must be described first in the identification division.

figure identification division
PROGRAM-ID Paragraph

Descriptions for each item are as follows:

  • program-name

    • Specifies a program name. The hyphen, digits from 0 to 9, and alphabetical characters can be used. At least one alphabetical character must be included.

    • The following values can be set.

      Item Description

      RECURSIVE

      Allows COBOL programs to be recursively called.

      The RECURSIVE clause can be specified only for the outermost program of a compilation unit. Recursive programs cannot include nested subprograms.

      If RECURSIVE is specified, a program can be reentered even if the program is running. If RECURSIVE is not specified, a running program cannot be reentered.

      INITIAL

      Specifies that when a program is called, the program and its nested programs will be in the initial state.

      A program is initialized in the following cases.

      • When a program is first executed

      • Whenever a program that has the INITIAL clause is called

      • When a program is first executed after the CANCEL statement is executed

      The following are executed when a program is in the initial state.

      • The program’s internal data included in the WORKING-STORAGE section is initialized. If a VALUE clause is specified, a data item is initialized with a given data. If no VALUE clause is specified, the initial value of the data item is undefined.

2. OPTIONAL Paragraphs

The following paragraphs are optional in the identification division.

Paragraph Description

AUTHOR

Program developer.

INSTALLATION

Company or a place where the program is used.

DATE-WRITTEN

Date when the program was developed.

DATE-COMPILED

Date when the program was compiled.

SECURITY

Program security level.

The specified contents are used only as source code information and do not affect the execution of the program.