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

Single and Repetitive Execution
Controlling Execution Flow
5–24 106160 Tandem Computers Incorporated
The following screen shows the results of executing the procedure:
(08:17) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0516N
Enter a number in the OCS command input line
|NM1060 PROCEDURE ZEX0516N NCLID 58 PAUSED
You have entered 33
Enter a number in the OCS command input line
|NM1060 PROCEDURE ZEX0516N NCLID 58 PAUSED
You have entered 12
Enter a number in the OCS command input line
|NM1060 PROCEDURE ZEX0516N NCLID 58 PAUSED
You have entered 16
Enter a number in the OCS command input line
|NM1060 PROCEDURE ZEX0516N NCLID 58 PAUSED
You have entered ABC
Final total is 61
NNM1005 START ZEX0516N PROCESSING COMPLETE. NCLID 000058
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The values entered are 33, 12, 16, and ABC. After ABC is entered, the NCL process
terminates execution.
Label Searching Rules for the ITERATE and LEAVE Statements
When NCL searches for labels specified on an ITERATE or LEAVE statement, it uses
the following search rules:
1. If the statement includes a target label, NCL begins to search out from the
immediately enclosing DO loop for a target label associated with an active DO
loop.
a. If NCL finds a matching label, the statement processes the DO loop.
b. If NCL does not find a matching label, NCL raises a compilation error. (Since
the label must be constant, NCL searches for it during compilation.)
2. If the statement does not include a target label, NCL does not search for a label. It
targets the immediately enclosing DO loop. (The immediately enclosing DO loop
does not require a label.)