NET/MASTER Network Control Language (NCL) Programmer's Guide

Conditional Execution
Controlling Execution Flow
5–26 106160 Tandem Computers Incorporated
The following screen shows the results of executing the procedure twice:
(07:15) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0517N YXYZ
The answer is YES
NNM1005 START ZEX0517N PROCESSING COMPLETE. NCLID 007020
START ZEX0517N
The answer is NO
NNM1005 START ZEX0517N PROCESSING COMPLETE. NCLID 007021
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
When the procedure is executed for the first time, the IF statement evaluates to TRUE.
When the procedure is executed for the second time, the IF statement evaluates to
FALSE.
Using the IF Statement With the DO Statement
The execution path following the THEN and ELSE keywords can execute a single
statement or a group of statements. If you want to execute a group of statements, you
must enclose the group with the DO and END core statements. The syntax of an IF
statement that uses DO and END is the following:
IF
expression
THEN DO
statement1
statement2
statement3
END
ELSE DO
statement4
statement5
statement6
END