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

Read syntax diagramSkip visual syntax diagramprocedure-division-headerfactory-or-object-procedure-division-headermethod-procedure-division-headerDECLARATIVES.sect.use-statement1paraEND DECLARATIVES.section-name2SECTIONpriority-number3.para
sect
Read syntax diagramSkip visual syntax diagramsection-nameSECTIONpriority-number3
para
Read syntax diagramSkip visual syntax diagramparagraph-name.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.