COBOL/400 Language Help

Format 1 (Basic PERFORM)

Description
The procedures referenced in the basic PERFORM statement are run once and control then passes to the next executable statement following the PERFORM statement.
Format 1 (Basic PERFORM)
 
 ->->--PERFORM-*-procedure-name-1---------------------------->1
             +
             +
             +
             *--------------------------------------------->2
 
 1->----*----------------------------*-----*----------------><-
       *-THROUGH-*-procedure-name-2-*     +
       *-THRU----*                        +
                                          +
 2->---imperative-statement END-PERFORM---*
 

procedure-name-1 or -2

Procedure-name-1, procedure-name-2 must name a section or paragraph in the Procedure Division.

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

If you specify procedure-name-1, you must not specify imperative-statement and the END-PERFORM phrase.

If you omit procedure-name-1, you must specify imperative-statement and the END-PERFORM phrase.

imperative-statement

Imperative-statement represents the statements to be executed for an in-line PERFORM statement.


[ Top of Page | Previous Page | Next Page | Table of Contents ]