Environment Division

The Environment Division has two sections:

The Environment Division is optional in a COBOL source program.

Read syntax diagramSkip visual syntax diagram
Environment Division - Format

>>-ENVIRONMENT DIVISION.---------------------------------------->

>--+--------------------------------------------------------------+-->
   '-CONFIGURATION SECTION.--| Configuration Section Paragraphs |-'   

>--+------------------------------------------------------------+-><
   '-INPUT-OUTPUT SECTION.--| Input-Output Section Paragraphs |-'   

Configuration Section Paragraphs

|--+---------------------------------------------+-------------->
   '-SOURCE-COMPUTER.--+-----------------------+-'   
                       '-source-computer-entry-'     

>--+---------------------------------------------+-------------->
   '-OBJECT-COMPUTER.--+-----------------------+-'   
                       '-object-computer-entry-'     

>--+-----------------------------------------+------------------|
   '-SPECIAL-NAMES.--+---------------------+-'   
                     '-special-names-entry-'     

Input-Output Section Paragraphs

                  .--------------------.   
                  V                    |   
|--FILE-CONTROL.----file-control-entry-+------------------------>

>--+-----------------------------------------+------------------|
   '-I-O-CONTROL.--+-----------------------+-'   
                   | .-------------------. |     
                   | V                   | |     
                   '---i-o-control-entry-+-'