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

Development Considerations for System-Level NCL Procedures
Developing System-Level NCL Procedures
17–14 106160 Tandem Computers Incorporated
Prevent the System-Level NCL Procedure From Terminating
System-level NCL procedures should not be allowed to terminate once they begin
execution. They should constantly monitor the flow of messages. If a system-level
procedure terminates, a critical system-level message that you want to intercept and
process may pass through to its destination undetected.
Should a system-level EMSPROC or LOGPROC NCL process terminate, a non-
roll-delete (NRD) message is sent to the terminals of all monitor-class users. Normal
message delivery then resumes, that is, all messages are delivered to their destinations
because the system-level NCL process is not available to intercept and process
messages. If a MSGPROC terminates, all messages destined for an OCS window are
displayed on the window.
Note If the NonStop NET/MASTER MS Guardian process in which either EMSPROC or LOGPROC is
executing should fail, the Guardian process and EMSPROC or LOGPROC are restarted automatically by
NonStop NET/MASTER MS.
Ensure That the System-Level NCL Procedure Is Short
System-level procedures should be short procedures, because they are likely to process
many messages in a short period of time. A lengthy system-level procedure or a
system-level procedure that pauses or delays execution for any reason, especially
EMSPROC, may impede the speed of message delivery and affect the performance of
the NCL process.
You should consider designing system-level NCL procedures that can execute
independent NCL processes, using the START command, to carry out analysis and
recovery.
Testing System-Level NCL
Procedures
System-level NCL procedures intercept and process system-level messages. It is
extremely important, therefore, that you test these NCL procedures carefully—
especially EMSPROC and LOGPROC—before you use them.
Detecting Syntax and Logic Errors
You can use the NCLCHECK command to check the syntax of system-level
procedures. This command, however, does not detect errors in logic.
A technique you can use to test the basic logic of EMSPROC and LOGPROC, with
minimum impact on other users, is to test them first as your own MSGPROC
procedure using the MSGREAD, MSGCONT, and MSGDEL verbs. After you are
satisfied with the basic logic, you can replace these verbs with the correct verbs and
refine the NCL procedure with additional logic.
If you are using two NonStop NET/MASTER MS systems—one for production and
one for testing—you may find it useful to use your test system for writing and
debugging system-level procedures.