NET/MASTER Network Control Language (NCL) Programmer's Guide
Writing a MSGPROC NCL Procedure
An NCL Tutorial
3–28 106160 Tandem Computers Incorporated
Writing a MSGPROC
NCL Procedure
One of the most important features of NCL is its ability to intercept and process
message flows that travel to, from, and throughout NonStop NET/MASTER MS.
NonStop NET/MASTER MS is distributed with examples of the three system-level
NCL procedures that handle event messages:
EMSPROC, which is an NCL procedure that intercepts and processes Event
Management Services (EMS) messages.
LOGPROC, which is an NCL procedure that intercepts and processes messages
destined for the NonStop NET/MASTER MS activity log.
MSGPROC, which is an NCL procedure that intercepts and processes messages
destined for an OCS window.
Based on the criteria you specify in the procedure, these NCL procedures can delete a
message, modify one or more of the attributes of a message, or pass a message on
unchanged to its destination. Each procedure uses verbs that are specific to the
function of the procedure to process a specific message type:
EMSPROC uses verbs starting with EMS to process messages.
LOGPROC uses verbs starting with LOG to process messages.
MSGPROC uses verbs starting with MSG to process messages.
While you are working in OCS, you have an OCS profile associated with your OCS
window. Your OCS profile determines whether you have a MSGPROC procedure that
intercepts and processes messages destined for your OCS window. (It also specifies
the name of the MSGPROC procedure if its name is different from “MSGPROC.”)
Because you can tailor aspects of your OCS profile to suit your own requirements, this
subsection briefly discusses how to write a MSGPROC NCL procedure.
Section 17, “Developing System-Level NCL Procedures,” discusses how to develop
system-level NCL procedures in detail. The complete syntax of the EMS*, LOG*, and
MSG* verbs are discussed in the NonStop NET/MASTER NCL Reference Manual.
To show how a MSGPROC NCL procedure works, this subsection discusses two NCL
procedures. The first NCL procedure, the MESSGEN NCL procedure, generates
messages that are sent to your OCS window. The second NCL procedure, the
MSGPROC NCL procedure, filters and processes these messages before they arrive at
the OCS window.
To appreciate how the two procedures interact—how the MSGPROC NCL procedure
filters and processes messages from the MESSGEN NCL procedure—you must create
the procedures separately and then execute them in the correct sequence. The
following five steps summarize what you need to do to appreciate the affect of the
MSGPROC NCL procedure when it is installed:
1. Create, test compile, correct, and execute the MESSGEN NCL procedure.
Carefully examine the output displayed at your OCS window because the
MSGPROC NCL procedure filters and modifies some of the output when
MSGPROC is installed.
2. Terminate execution of the MESSGEN NCL procedure by exiting from OCS.