Basic PERFORM Statement

The procedure(s) referenced in the basic PERFORM statement are executed once, and control then passes to the next executable statement following the PERFORM statement.

Read syntax diagramSkip visual syntax diagram
PERFORM Statement - Format 1

>>-PERFORM------------------------------------------------------>

>--+-procedure-name-1--+-------------------------------+-+-----><
   |                   '-+-THROUGH-+--procedure-name-2-' |   
   |                     '-THRU----'                     |   
   '-imperative-statement--END-PERFORM-------------------'   

procedure-name
Must be a section or paragraph in the Procedure Division.

When both procedure-name-1 and procedure-name-2 are specified, if either is a procedure-name in a declarative procedure, both must be procedure-names in the same declarative procedure.

If the PERFORM statement is in a declarative section, procedure-name-1 and procedure-name-2 must also be in a declarative section.

If procedure-name-1 is specified, imperative-statement and the END-PERFORM phrase must not be specified.

If procedure-name-1 is omitted, imperative-statement and the END-PERFORM phrase must be specified.

imperative-statement
The statement(s) to be executed for an in-line PERFORM.
END-PERFORM
Delimits the scope of the in-line PERFORM statement. Execution of an in-line PERFORM is completed after the last statement contained within it has been executed.