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


The procedure division header

The procedure division, if specified, is identified by one of the following headers, depending on whether you are specifying a program, a factory definition, an object definition, or a method definition.

The following is the format for a procedure division header in a program.

Format: program procedure division header
Read syntax diagramSkip visual syntax diagram>>-PROCEDURE DIVISION------------------------------------------->
 
>--+-------------------------------------------------------+---->
   |        .--------------------------------------------. |  
   |        |                          .-------------.   | |  
   |        V                          V             |   | |  
   '-USING------+-------------------+----data-name-1-+---+-'  
                +-+----+--REFERENCE-+                         
                | '-BY-'            |                         
                '-+----+--VALUE-----'                         
                  '-BY-'                                      
 
>--+------------------------+--.-------------------------------><
   '-RETURNING--data-name-2-'     
 

The following is the format for a procedure division header in a factory paragraph or object paragraph.

Format: factory and object procedure division header
Read syntax diagramSkip visual syntax diagram>>-PROCEDURE DIVISION.-----------------------------------------><
 

The following is the format for a procedure division header in a method.

Format: method procedure division header
Read syntax diagramSkip visual syntax diagram>>-PROCEDURE DIVISION------------------------------------------->
 
>--+-------------------------------------------+---------------->
   |        .--------------------------------. |  
   |        |                .-------------. | |  
   |        V                V             | | |  
   '-USING----+----+--VALUE----data-name-1-+-+-'  
              '-BY-'                              
 
>--+------------------------+----------------------------------><
   '-RETURNING--data-name-2-'  
 

Terms of use | Feedback

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