COBOL Identification Division

COBOL Divisions COBOL Environment Division

Advertisements


The IDENTIFICATION DIVISION provides the program name and other items used to uniquely identify the program.

This division is required in every COBOL program.

In other words, the identification is used to identify the programmer who has write program and it may contain optional entries like Author, Installation, Date-written, Date-compiled and security depending on the requirement.

PROGRAM-ID is a keyword and it must be specified immediately after the IDENTIFICATION DIVISION and it is mandatory in COBOL program.

Program name can be up to 8 characters max.

All the entries in IDENTIFICATION DIVISION should be coded in AREA A.

The complete syntax of the identification division is as follows.

Syntax:

	[Mandatory]	IDENTIFICATION DIVISION.
	[Mandatory]	PROGRAM-ID. NameOfProgram.
	[Optional]	AUTHOR. NameOfProgrammer.
	[Optional]	INSTALLATION. Development-center.
	[Optional]	DATE-WRITTEN. mm/dd/yy.
	[Optional]	DATE-COMPILED. mm/dd/yy. HH:MM:SS.
	[Optional]	SECURITY. Program-type.

Program-id:

The name of program will be updated with Program id.

The length of the program name is up to 8 characters max.

By using the program name provided with Program-id, the load module will be created after the compilation.

To execute the program, the name provided with program-id needs to be provided in JCL or in PPT entries.

The actual source name and name provided with program-id may not be the same in all cases.

This is a mandatory entry.

Author:

Author describes the name of the programmer who written the program.

This is comment entry which is set of character from the computer character set.

The comment entry can be written any number of lines before starting another statement in AREA A.

This is optional in IDENTIFICATION DIVISION.

Installation:

Installation describes the name of the location or company where the installed.

This is also a comment entry.

This is optional in IDENTIFICATION DIVISION.

Date-written:

Date-written describes the actual date of the program written.

This is also a comment entry.

This is optional in IDENTIFICATION DIVISION.

Date-compiled:

Date-compiled describes the actual date of the program compiled.

Date-compiled details automatically written by the compiler during the compilation time.

This is also a comment entry.

This is optional in IDENTIFICATION DIVISION.

Security:

The security describes the confidentiality level of the program.

This is also a comment entry.

This is optional in IDENTIFICATION DIVISION.


Practical Example:

A simple program with all entries of identification division was coded like below.


If any questions on the above, post your queries on Cobol Discussion forum


COBOL Divisions COBOL Environment Division

Advertisements