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

Single and Repetitive Execution
Controlling Execution Flow
5–20 106160 Tandem Computers Incorporated
The following example shows an NCL procedure with a nested DO loop:
zex0513n: PROCEDURE
/* Nested DO loop */
DO 2
SAY OUTER LOOP
DO &control = 1 to 5
SAY Inner loop pass &control
END
END
END zex0513n
This procedure has one outer loop, which is executed twice, and one nested (inner)
loop, which is executed five times.
The following screen shows the results of executing the procedure:
(09:41) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0513N
OUTER LOOP
Inner loop pass 1
Inner loop pass 2
Inner loop pass 3
Inner loop pass 4
Inner loop pass 5
OUTER LOOP
Inner loop pass 1
Inner loop pass 2
Inner loop pass 3
Inner loop pass 4
Inner loop pass 5
NNM1005 START ZEX0513N PROCESSING COMPLETE. NCLID 025026
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>