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


Procedure division structure

The procedure division is an optional division.

Program procedure division
The program procedure division consists of optional declaratives, and procedures that contain sections, paragraphs, sentences, and statements.
Factory procedure division
The factory procedure division contains only factory method definitions.
Object procedure division
The object procedure division contains only object method definitions.
Method procedure division
A method procedure division consists of optional declaratives, and procedures that contain sections, paragraphs, sentences, and statements. A method can INVOKE other methods, be recursively invoked, and issue a CALL to a program. A method procedure division cannot contain nested programs or methods.

For additional details on a method procedure division, see Requirements for a method procedure division.

Read syntax diagramSkip visual syntax diagram
Format: procedure division

>>-+-procedure-division-header-------------------+-------------->
   +-factory-or-object-procedure-division-header-+   
   '-method-procedure-division-header------------'   

>--+--------------------------------------------------------------------------------+-->
   |                .------------------------------------------.                    |   
   |                V                            (1)           |                    |   
   '-DECLARATIVES.----| sect |--.--use-statement------| para |-+--END DECLARATIVES.-'   

   .-----------------------------------------------------------------.   
   V              (2)                                                |   
>----section-name------SECTION--+---------------------+--.--| para |-+-><
                                |                 (3) |                  
                                '-priority-number-----'                  

sect

|--section-name--SECTION--+---------------------+---------------|
                          |                 (3) |   
                          '-priority-number-----'   

para

   .-----------------------------------.   
   V                                   |   
|----paragraph-name.--+--------------+-+------------------------|
                      | .----------. |     
                      | V          | |     
                      '---sentence-+-'     

Notes:
  1. The USE statement is described under USE statement
  2. Section-name can be omitted. If you omit section-name, paragraph-name can be omitted.
  3. Priority-numbers are not valid for methods, recursive programs, or programs compiled with the THREAD option.

Terms of use | Feedback

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