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.
Format: procedure division
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.