COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
6 Environment Division
The Environment Division is optional in a COBOL program. It has two optional sections, the
Configuration Section and the Input-Output Section.
The Configuration Section states the type of computer on which to compile the program and the
type of computer on which to run the program. This section can also:
• Define the association between program-supplied names and system-supplied facilities such
as program switches or character sets
• Provide for substitution of the dollar sign ($) and decimal point (.) characters
• Adjust the character set to allow national alphabet extensions to pass the ALPHABETIC test
The Input-Output Section includes:
• File declarations
• File buffer allocations
• $RECEIVE supplementary declarations for interprocess communication
If the program does not need to describe anything previously listed and does not use files, it does
not need the Environment Division.
If the program has the Environment Division and you move the program to an HP system from
another type of system, you must change the information in the Environment Division.
Topics:
• Environment Division Syntax
• Configuration Section
• Input-Output Section
Environment Division Syntax
ENVIRONMENT DIVISION.
is the division header. It must begin in area A.
CONFIGURATION section
is defined in Configuration Section.
INPUT-OUTPUT section
is defined in Input-Output Section.
Configuration Section
The Configuration Section is forbidden in a contained program and is optional in any other
program. The compiler prints a warning if a Configuration Section paragraph is out of order; it
reports an error if a paragraph is repeated.
Environment Division Syntax 101










