Infinite Loops

What happens when the control variable of a loop cannot attain the last number? For example, in the following program segment, count does not increase beyond 1.
DO count = 1 to 10
  SAY 'Number' count
  count = count - 1
END

The result is called an infinite loop because count alternates between 1 and 0, producing an endless number of lines saying Number 1.

If your program is in an infinite loop, contact the operator to cancel it. An authorized user can issue the CEMT SET TASK PURGE command to halt an exec.


Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 7 January 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.rexx.doc//dfhrx/iloop.html