ILE COBOL Language Reference

PERFORM with TIMES Phrase

The procedure(s) referred to in the TIMES phrase PERFORM statement 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.

PERFORM Statement - Format 2
 
>>-PERFORM------------------------------------------------------>
 
>--+-procedure-name-1--+-------------------------------+--| phrase 1 |-+-><
   |                   '-+-THROUGH-+--procedure-name-2-'               |
   |                     '-THRU----'                                   |
   '-| phrase 1 |--imperative-statement--END-PERFORM-------------------'
 
phrase-1:
 
|--+-identifier-1-+--TIMES--------------------------------------|
   '-integer-1----'
 
 
identifier-1
Must be an integer item.

If identifier-1 is zero or a negative number at the time 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.


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