Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


Identification division

The identification division must be the first division in every COBOL source program, factory definition, object definition, and method definition. It names the program, class, or method and identifies the factory definition and object definition; it 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.

Format: program identification division
Read syntax diagramSkip visual syntax diagram>>-+-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.

Format: class identification division
Read syntax diagramSkip visual syntax diagram>>-+-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.

Format: factory identification division
Read syntax diagramSkip visual syntax diagram>>-+-IDENTIFICATION-+--DIVISION.--FACTORY.---------------------><
   '-ID-------------'                       
 

The following is the format for an object IDENTIFICATION DIVISION.

Format: object identification division
Read syntax diagramSkip visual syntax diagram>>-+-IDENTIFICATION-+--DIVISION.--OBJECT.----------------------><
   '-ID-------------'                      
 

The following is the format for a method IDENTIFICATION DIVISION.

Format: method identification division
Read syntax diagramSkip visual syntax diagram>>-+-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

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)