Varying three identifiers
The topic lists steps of varying three identifiers.
PERFORM PROCEDURE-NAME-1 THROUGH PROCEDURE-NAME-2
VARYING IDENTIFIER-2 FROM IDENTIFIER-3
BY IDENTIFIER-4 UNTIL CONDITION-1
AFTER IDENTIFIER-5 FROM IDENTIFIER-6
BY IDENTIFIER-7 UNTIL CONDITION-2
AFTER IDENTIFIER-8 FROM IDENTIFIER-9
BY IDENTIFIER-10 UNTIL CONDITION-3
The actions are the same as those for two identifiers, except that identifier-8 goes through the complete cycle each time that identifier-5 is augmented by identifier-7, which, in turn, goes through a complete cycle each time that identifier-2 is varied.
At the end of PERFORM statement execution:
- identifier-5 and identifier-8 contain the current values of identifier-6 and identifier-9, respectively.
- identifier-2 has a value exceeding its last-used setting by one increment/decrement value (unless condition-1 was true at the beginning of PERFORM statement execution, in which case identifier-2 contains the current value of identifier-3).