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

Tracing System-Level Messages
Developing System-Level NCL Procedures
17–28 106160 Tandem Computers Incorporated
Tracing System-Level
Messages
NonStop NET/MASTER MS allows you to trace its operations by using a group of
TRACE commands to control tracing, and the SHOW TRACE command to display
trace information. The TRACE commands provide the ability to perform two types of
tracing: message tracing and internal event tracing.
This subsection discusses message tracing in relation to system-level NCL procedures.
Message tracing allows you to confirm whether messages traveling to and from
system-level NCL procedures are the messages you expect. The messages you are
tracing are written to a trace file: after you finish tracing, you can examine the trace
file to check whether it contains the correct messages.
To trace system-level messages, follow these steps:
1. Write and install the system-level NCL procedure.
2. Specify the messages to trace.
3. Start the trace.
4. Send messages to the system-level NCL procedure.
5. Stop the trace.
6. Examine the trace file.
This subsection illustrates these steps by tracing messages deleted from a MSGPROC
NCL procedure.
Step 1. Writing and Installing the System-Level NCL Procedure
The first step in tracing system-level messages is to write and install a system-level
NCL procedure. The following MSGPROC NCL procedure is designed to forward all
messages to an OCS window, except those with text AAAAA or ZZZZZ: these
messages are deleted. Type the following NCL procedure, calling it ZEX1719N:
zex1719n: PROCEDURE
/* Deletes selected messages */
SAY MSGPROC starting
DO FOREVER
MSGREAD
IF &$msg.text = AAAAA OR,
&$msg.text = ZZZZZ THEN DO
SAY Deleting &$msg.text
MSGDEL
END /*do*/
ELSE
MSGCONT
END /*do*/
END zex1719n
After typing the MSGPROC NCL procedure, install the procedure by using the
following command from the OCS command input line:
PROFILE MSGPROC=ZEX1719N