z/OS TSO/E REXX User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


ITERATE Instruction

z/OS TSO/E REXX User's Guide
SA32-0982-00

Anotherinstruction, ITERATE, stops execution from within the loop and passes control to the DO instruction at the top of the loop. Depending on the type of DO instruction, a control variable is increased and tested and/or a condition is tested to determine whether to repeat the loop. Like LEAVE, ITERATE is used within the loop.
DO count = 1 TO 10
  IF count = 8
    THEN
      ITERATE
    ELSE
      SAY 'Number' count
END
This example results in a list of numbers from 1 to 10 with the exception of number 8.
   Number 1
   Number 2
   Number 3
   Number 4
   Number 5
   Number 6
   Number 7
   Number 9
   Number 10

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014