@comment *********************************************************************
@comment ** 4. IDENTIFICATION DIVISION                                      **
@comment *********************************************************************
@newchapter{IDENTIFICATION DIVISION}
@diagram{IDENTIFICATION DIVISION,ID-Overview,ID-Overview,ID-Overview}
@diagram{PROGRAM-ID Type Clause,ID-PROGRAM-ID-Type,ID-PROGRAM-ID-Type,None}
The identification division provides basic identification of the program by giving it a name and optionally defining some high-level characteristics via the eight pre-defined paragraphs that may be specified.
@enumerate

@item
The paragraphs shown above may be coded in any sequence.

@item
The reserved words @code{AS}, @code{IS} and @code{PROGRAM} are optional and may be included, or not, at the discretion of the programmer.  The presence or absence of these words has no effect upon the program.

@item
A @b{Type Clause} may be coded only when
@syntaxidx{PROGRAM-ID} is specified.  If one is coded, either @code{COMMON}, @code{COMMON INITIAL} or @code{COMMON RECURSIVE} must be specified.

@item
While the actual @code{IDENTIFICATION DIVISION} or @code{ID DIVISION} header is optional, the @code{PROGRAM-ID} /
@syntaxidx{FUNCTION-ID} paragraphs are not; only one or the other, however, may be coded.

@item
The compiler's
@switchidx{-Wobsolete} will cause the GnuCOBOL compiler to issue warnings messages if these (or any other obsolete syntax) is used in a program.

@item
If specified, @var{literal-1} must be an actual alphanumeric literal and may not be a figurative constant.

@item
The @code{PROGRAM-ID} and @code{FUNCTION-ID} paragraphs serve to identify the program to the external (i.e. operating system) environment.  If there is no @code{AS} clause present, the @var{program-id} will serve as that external identification.  If there is an @code{AS} clause specified, that specified literal will serve as the external identification.  For the remainder of this document, that "external identification" will be referred to as the primary entry-point name.

@item
The @code{INITIAL}, @code{COMMON} and @code{RECURSIVE} words are used only within subprograms serving as subroutines.  Their purposes are as follows:
@enumerate A

@item
@syntaxidx{COMMON} should be used only within subprograms that are nested subprograms.  A nested subprogram declared as @code{COMMON} may be called from any nested program in the source file being compiled, not just those "above" it in the nesting structure.

@item
The
@syntaxidx{RECURSIVE} clause, if any, will cause the compiler to generate different object code for the subprogram that will enable it to invoke itself and to properly return back to the program that invoked it.

User-defined functions (i.e. @code{FUNCTION-ID}) are always recursive.

@item
The
@syntaxidx{INITIAL} clause, if specified, guarantees the subprogram will be in its initial (i.e. compiled) state each and every time it is executed, not just the first time.
@end enumerate
@end enumerate
@iftex
@sp 3
@center ------------------------------------------------------------
@center End of Chapter 4 --- IDENTIFICATION DIVISION
@end iftex
