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

Writing a MSGPROC NCL Procedure
An NCL Tutorial
3–30 106160 Tandem Computers Incorporated
Follow the steps described earlier in this section to create, test compile, correct, and
execute MESSGEN. The following screen shows the results of executing the
MESSGEN NCL procedure in the OCS message display area:
(13:02) --------------------- OPERATOR CONTROL SERVICES ----------------------
START MESSGEN
Message
Hello message
Hello message NNMUSER
Message
Hello message
Hello message NNMUSER
Message
Hello message
Hello message NNMUSER
Message
Hello message
Hello message NNMUSER
Message
Hello message
Hello message NNMUSER
Message
Hello message
Hello message NNMUSER
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
Examine this screen carefully, because it is different when you use a MSGPROC NCL
procedure to filter messages before they arrive at the OCS window.
Note After you have examined the output, terminate execution of MESSGEN by using the PROFILE
MSGPROC=FLUSH command or by typing X in the OCS command line to exit from OCS.
Features of MESSGEN Here are some features of the MESSGEN NCL procedure.
The DO FOREVER Core Statement
DO marks the beginning of a group of statements that is executed once or repetitively.
If DO marks the beginning of a repetitive DO loop, the loop is executed the number of
times specified by a condition. In MESSGEN, the FOREVER keyword sets the
condition.
(Although the FOREVER keyword implies that the DO loop is executed forever, this is
not so in practice; you can instruct NCL to control execution of a runaway DO loop.
See Section 5, “Controlling Execution Flow,” for more information.)
The &SYS.USER.ID System Variable
The system variable &SYS.USER.ID holds the user ID of the user executing the NCL
procedure.