Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

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

  1. identifier-2 and identifier-5 are set to their initial values, identifier-3 and identifier-6, respectively.
    
    
  2. condition-1 is evaluated as follows:
    
    
    1. If it is false, steps 3 through 7 are executed.
      
      
    2. If it is true, control passes directly to the statement following the PERFORM statement.
      
      

  3. condition-2 is evaluated as follows:
    
    
    1. If it is false, steps 4 through 6 are executed.
      
      
    2. 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.
      
      

  4. procedure-1 and procedure-2 are executed once (if specified).
    
    
  5. identifier-5 is augmented by identifier-7.
    
    
  6. Steps 3 through 5 are repeated until condition-2 is true.
    
    
  7. Steps 2 through 6 are repeated until condition-1 is true.
    
    

At the end of PERFORM statement execution:

Figure 14 illustrates the logic of the PERFORM statement when two identifiers are varied with TEST BEFORE.



PICTURE 7


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.



PICTURE 8


Figure 15. Varying Two Identifiers--with TEST AFTER



Previous Topic Next Topic © 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.