Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


Identification division

The identification division must be the first division in each COBOL source program, factory definition, object definition, and method definition. The identification division names the program, class, or method and identifies the factory definition and object definition. The identification division can include the date a program, class, or method was written, the date of compilation, and other such documentary information.

Program IDENTIFICATION DIVISION
For a program, the first paragraph of the identification division must be the PROGRAM-ID paragraph. The other paragraphs are optional and can appear in any order.
Class IDENTIFICATION DIVISION
For a class, the first paragraph of the identification division must be the CLASS-ID paragraph. The other paragraphs are optional and can appear in any order.
Factory IDENTIFICATION DIVISION
A factory IDENTIFICATION DIVISION contains only a factory paragraph header.
Object IDENTIFICATION DIVISION
An object IDENTIFICATION DIVISION contains only an object paragraph header.
Method IDENTIFICATION DIVISION
For a method, the first paragraph of the identification division must be the METHOD-ID paragraph. The other paragraphs are optional and can appear in any order.

The following is the format for a program IDENTIFICATION DIVISION.

Read syntax diagramSkip visual syntax diagram
Format: program identification division

>>-+-IDENTIFICATION-+--DIVISION.--PROGRAM-ID--+---+------------->
   '-ID-------------'                         '-.-'   

>--program-name------------------------------------------------->

>--+----------------------------------------------+--+---+------>
   '-+----+--+-RECURSIVE-----------+--+---------+-'  '-.-'   
     '-IS-'  +-COMMON--+---------+-+  '-PROGRAM-'            
             |         '-INITIAL-' |                         
             '-INITIAL--+--------+-'                         
                        '-COMMON-'                           

>--+--------------------------------------+--------------------->
   '-AUTHOR--+---+--+-------------------+-'   
             '-.-'  | .---------------. |     
                    | V               | |     
                    '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-INSTALLATION--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-DATE-WRITTEN--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+---------------------------------------+-------------------->
   '-DATE-COMPILED.--+-------------------+-'   
                     | .---------------. |     
                     | V               | |     
                     '---comment-entry-+-'     

>--+----------------------------------------+------------------><
   '-SECURITY--+---+--+-------------------+-'   
               '-.-'  | .---------------. |     
                      | V               | |     
                      '---comment-entry-+-'     

The following is the format for a class IDENTIFICATION DIVISION.

Read syntax diagramSkip visual syntax diagram
Format: class identification division

>>-+-IDENTIFICATION DIVISION.-+--CLASS-ID.--class-name-1-------->
   '-ID DIVISION.-------------'                            

>--INHERITS--class-name-2.-------------------------------------->

>--+--------------------------------------+--------------------->
   '-AUTHOR--+---+--+-------------------+-'   
             '-.-'  | .---------------. |     
                    | V               | |     
                    '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-INSTALLATION--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-DATE-WRITTEN--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+---------------------------------------+-------------------->
   '-DATE-COMPILED.--+-------------------+-'   
                     | .---------------. |     
                     | V               | |     
                     '---comment-entry-+-'     

>--+----------------------------------------+------------------><
   '-SECURITY--+---+--+-------------------+-'   
               '-.-'  | .---------------. |     
                      | V               | |     
                      '---comment-entry-+-'     

The following is the format for a factory IDENTIFICATION DIVISION.

Read syntax diagramSkip visual syntax diagram
Format: factory identification division

>>-+-IDENTIFICATION-+--DIVISION.--FACTORY.---------------------><
   '-ID-------------'                        

The following is the format for an object IDENTIFICATION DIVISION.

Read syntax diagramSkip visual syntax diagram
Format: object identification division

>>-+-IDENTIFICATION-+--DIVISION.--OBJECT.----------------------><
   '-ID-------------'                       

The following is the format for a method IDENTIFICATION DIVISION.

Read syntax diagramSkip visual syntax diagram
Format: method identification division

>>-+-IDENTIFICATION-+--DIVISION.-------------------------------->
   '-ID-------------'              

>--METHOD-ID--+---+--method-name-1--+---+----------------------->
              '-.-'                 '-.-'   

>--+--------------------------------------+--------------------->
   '-AUTHOR--+---+--+-------------------+-'   
             '-.-'  | .---------------. |     
                    | V               | |     
                    '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-INSTALLATION--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+--------------------------------------------+--------------->
   '-DATE-WRITTEN--+---+--+-------------------+-'   
                   '-.-'  | .---------------. |     
                          | V               | |     
                          '---comment-entry-+-'     

>--+---------------------------------------+-------------------->
   '-DATE-COMPILED.--+-------------------+-'   
                     | .---------------. |     
                     | V               | |     
                     '---comment-entry-+-'     

>--+----------------------------------------+------------------><
   '-SECURITY--+---+--+-------------------+-'   
               '-.-'  | .---------------. |     
                      | V               | |     
                      '---comment-entry-+-'     


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)