It is for naming a program and optionally providing other identifying information.
The program name can be maximum 31 characters long:
allowed A-Z, 0-9, -
can not start with a number
Upon compilation, the compiler will use
the first 8 characters of the program name
independent name given in the compiling JCL
and place the compiled module by this name in the LOADLIB.
Optional information:
AUTHOR
INSTALLATION
DATE-WRITTEN
DATE-COMPILED
The DATE-COMPILED will be overwritten with every compiling.
In modern COBOL, the whole code must be closed with a closing phrase, showing the true end of the source code. This phrase must be written after the PROCEDURE DIVISION.
EXAMPLE FOR THE MINIMUM IDENTIFICATION DIVISION, CLASSIC STYLE:
EXAMPLE FOR THE MINIMUM IDENTIFICATION DIVISION, MODERN ENTERPRISE STYLE:
EXAMPLE FOR THE IDENTIFICATION DIVISION, CLASSIC STYLE:
EXAMPLE FOR THE IDENTIFICATION DIVISION, MODERN ENTERPRISE STYLE:
Do not use program-names that start with prefixes used by IBM products. If you use program-names that start with any of the following prefixes, your CALL statements might resolve to IBM library or compiler routines rather than to your intended program:
AFB
AFH
CBC
CEE
CEH
CEL
CEQ
CEU
DFH
DSN
EDC
FOR
IBM
IFY
IGY
IGZ
ILB
If a program-name is case sensitive, avoid mismatches with the name that the compiler is looking for. Verify that the appropriate setting of the PGMNAME compiler option is in effect.
Code the RECURSIVE attribute on the PROGRAM-ID clause to specify that a program can be recursively reentered while a previous invocation is still active.
You can code RECURSIVE only on the outermost program of a compilation unit. Neither nested subprograms nor programs that contain nested subprograms can be recursive. You must code RECURSIVE for programs that you compile with the THREAD option.
EXAMPLE FOR RECURSIVE IDENTIFICATION: