Purpose
Exits a processing loop created by a WHILE or ON command regardless of the outcome of the command condition.
The WHILE command is described later in this chapter.
Terminates WHILE and ON command processing.
Syntax
►►─── EXIT ──── . ────────────────────────────────────────────────────────────►◄
Usage
Considerations
Example
The statements below illustrate the use of an EXIT command. The DISPLAY command is executed when A is greater than B or when Z becomes greater than 100, whichever occurs first:
WHILE A LE B
REPEAT.
ADD 1 TO Z.
IF Z GT 100
THEN EXIT.
ADD 1 TO A.
END.
DISPLAY.
|
Copyright © 2014 CA.
All rights reserved.
|
|