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 syntax diagram shows the format for a PROCEDURE DIVISION header in a program.

Format: program procedure division header

Read syntax diagramSkip visual syntax diagramPROCEDURE DIVISIONUSINGBYREFERENCEBYVALUEdata-name-1RETURNINGdata-name-2.

The following syntax diagram shows 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 diagramPROCEDURE DIVISION.

The following syntax diagram shows the format for a PROCEDURE DIVISION header in a method.

Format: method procedure division header

Read syntax diagramSkip visual syntax diagramPROCEDURE DIVISIONUSINGBYVALUEdata-name-1RETURNINGdata-name-2