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

Writing a MSGPROC NCL Procedure
An NCL Tutorial
106160 Tandem Computers Incorporated 3–31
Note Your user ID may be different from the user ID, NNMUSER, shown in this example.
The DELAY Verb
DELAY temporarily suspends execution of an NCL process. In MESSGEN, the NCL
process is suspended for 10 seconds.
The END Core Statements
The first END core statement ends the DO loop. The last END core statement ends the
NCL procedure.
The MSGPROC NCL
Procedure
The MSGPROC NCL procedure, shown in the following listing, filters and processes
messages before they arrive at the OCS window:
msgproc: PROCEDURE
/* Simple MSGPROC procedure */
DO FOREVER
/* Read message text into variables */
MSGREAD VARS=&word*
/* Process message */
IF &word1 = "Hello" THEN
IF &word&(SYS.VARCNT) \= &SYS.USER.ID THEN
/* Delete if begins with Hello and not ours */
MSGDEL
ELSE
/* Modify if begins with Hello and ours */
MSGCONT COLOR=BLUE HLITE=BLINK
ELSE
/* No change if does not begin with Hello */
MSGCONT
END
END msgproc
Follow the steps described earlier in this section to create, test compile, and correct
MSGPROC. However, do not use the START or EXEC command to execute the
MSGPROC NCL procedure. To install the procedure as part of your OCS profile, you
must enter the following command from the OCS command input line:
PROFILE MSGPROC=MSGPROC