Identifying a program
Use the IDENTIFICATION DIVISION
to name
a program and optionally provide other identifying information.
You
can use the optional AUTHOR
, INSTALLATION
, DATE-WRITTEN
,
and DATE-COMPILED
paragraphs for descriptive information
about a program. The data you enter in the DATE-COMPILED
paragraph
is replaced with the latest compilation date.
IDENTIFICATION DIVISION.
Program-ID. Helloprog.
Author. A. Programmer.
Installation. Computing Laboratories.
Date-Written. 09/04/2019.
Date-Compiled. 09/08/2019.
Use
the PROGRAM-ID
paragraph to name your program. The
program-name that you assign is used in these ways:
- Other programs use that name to call your program.
- The name appears in the header on each page, except the first, of the program listing that is generated when you compile the program.
- If you use the
NAME
compiler option, the name is placed on theNAME
binder (linkage-editor) control statement to identify the object module that the compilation creates.Tip: 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, yourCALL
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
Tip: 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.Related tasks
Changing the header of a source listing
Identifying a program as recursive
Marking a program as callable by containing programs
Setting a program to an initial state
Changing the header of a source listing
Identifying a program as recursive
Marking a program as callable by containing programs
Setting a program to an initial state
Related references
Compiler limits (Enterprise COBOL for z/OS® Language Reference)
Conventions for program-names (Enterprise COBOL for z/OS Language Reference)
Compiler limits (Enterprise COBOL for z/OS® Language Reference)
Conventions for program-names (Enterprise COBOL for z/OS Language Reference)