MPE/iX Commands Reference Manual (32650-90877)

Chapter 5 181
Command List III
Commands DATA thru EXIT
expression is evaluated, and if true, the IF block is executed; if false, the ELSE block (if
one exists) is executed. If false and no ELSE exists, then execution continues following the
ENDIF.
Use
This command may be issued from a session, job, program, or in BREAK. Pressing
Break
has no effect on this command.
Example
The following examples show the IF block ending with the ENDIF command:
IF
logical_expression
ELSE
logical_expression
.
.
.
ENDIF
IF
logical_expression
ELSEIF
logical_expression
.
.
.
ENDIF
Related Information
Commands IF, ELSE, ELSEIF
Manuals None
ENDWHILE
Terminates a WHILE block. (Native Mode)
Syntax
ENDWHILE
Parameters
None
Operation Notes
This command terminates a conditional block that begins with a WHILE command. The
WHILE and ENDWHILE commands constitute a WHILE block. The WHILE command evaluates
an expression, and so long as that expression evaluates as true, the command(s) between
WHILE and ENDWHILE are executed. If the expression evaluates as false, execution of the
WHILE block ceases and execution passes to the command following ENDWHILE. Execution
terminates if any command not protected by a preceding CONTINUE causes an error.