COBOL/400 Language Help

Format 2 (PERFORM with TIMES)

Description
The procedures referred to in Format 2 (PERFORM with TIMES) are executed the number of times specified by the value in identifier-1 or integer-1. Control then passes to the next executable statement following the PERFORM statement.
Format 2 (PERFORM with TIMES)
 
->->---PERFORM-*-procedure-name-1-------------------------->1
             +
             +
             +
             *-phrase-1 imperative-statement------------->2
 
 
1->----*----------------------------*-phrase-1--*---------><-
      *-THROUGH-*-procedure-name-2-*           +
      *-THRU----*                              +
                                               +
2->----END-PERFORM------------------------------*
 
 
 where phrase-1 is:
 
->->----*identifier-1-*--TIMES--------------------------><-
      *-integer-1---*
 

identifier-1

Identifier-1 must name an integer item. If it is zero or negative when the PERFORM statement is initiated, control passes to the statement following the PERFORM statement.

After the PERFORM statement has been initiated, any change to identifier-1 has no effect in varying the number of times the procedures are initiated.

integer-1

Integer-1 must be a positive signed integer.


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