A SERVICE OF

logo

716 Chapter 8
Command Definitions SP-Z
WHILE
Nesting of IF and WHILE blocks is limited to a combined total of 30 levels. Each IF or
WHILE block read by the Command Interpreter increments the nesting count by 1.
NOTE You may not write a WHILE construct in such a way that it physically crosses
from one user command (UDCs or command files) to another.
Use
This command may be issued from a session, job, program, or in BREAK. Pressing Break
aborts the execution of this command.
Example
The following is an example of the WHILE command:
WHILE SETVAR (FILENAME, &
INPUT ("PLEASE ENTER THE NEXT FILENAME TO PURGE:") &
)<> "" DO
PLEASE ENTER THE NEXTFILENAME TO PURGE: OLDFILE1
*** EXPRESSION TRUE
CONTINUE
PURGE !FILENAME
ENDWHILE
Related Information
Commands ELSE, ELSEIF, ENDWHILE, ESCAPE, IF, RETURN, SETVAR, SHOWVAR
Manuals Appendix B, "Expression Evaluator Functions"