6.2.27.7 Varying Two 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
- identifier-2 and identifier-5 are set to their initial values,
identifier-3 and identifier-6, respectively.
- condition-1 is evaluated as follows:
- If it is false, steps 3 through 7 are executed.
- If it is true, control passes directly to the statement following
the PERFORM statement.
- condition-2 is evaluated as follows:
- If it is false, steps 4 through 6 are executed.
- If it is true, identifier-2 is augmented by identifier-4,
identifier-5 is set to the current value of identifier-6, and step
2 is repeated.
- procedure-1 and procedure-2 are executed once (if specified).
- identifier-5 is augmented by identifier-7.
- Steps 3 through 5 are repeated until condition-2 is true.
- Steps 2 through 6 are repeated until condition-1 is true.
At the end of PERFORM statement execution:
- identifier-5
Contains the current value of identifier-6.
- identifier-2
Has a value that exceeds the last-used setting by the
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).
Figure 14 illustrates the logic of the PERFORM statement when two
identifiers are varied with TEST BEFORE.
Figure 14. Varying Two Identifiers--with TEST BEFORE
Figure 15 illustrates the logic of the PERFORM statement when two
identifiers are varied with TEST AFTER.
Figure 15. Varying Two Identifiers--with TEST AFTER
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.