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

Examples of System-Level NCL Procedures
Developing System-Level NCL Procedures
106160 Tandem Computers Incorporated 17–33
EMSPROC NCL Procedures The following EMSPROC NCL procedure allows all EMS messages to pass through
unchanged:
zex1710n: PROCEDURE
/* Passes all messages unchanged */
SAY EMSPROC starting
DO FOREVER
EMSREAD
END /*do*/
END zex1710n
This NCL procedure does not delete messages and it does not change messages. It
produces the same result as having no EMSPROC.
Note As discussed earlier in this section, the EMSCONT verb is not required after the EMSREAD verb when a
message is passed on with no changes.
The following EMSPROC NCL procedure filters and displays messages from various
subsystems, in distinctive colors:
zex1711n: PROCEDURE
/* EMSPROC to display various subsystem events in */
/* distinctive colors */
SAY EMSPROC starting
DO FOREVER
EMSREAD
IF &$ems.spi \= "" THEN DO
/* Get the owner, subsystem, and version,*/
/* number from the SSID */
PARSE VARS=(&owner,&subsys,&version),
DELIM='.' DATA=&$ems.spi.tandem.zspi_tkn_ssid
SELECT
WHEN &owner = TANDEM AND &subsys = EMS THEN
EMSCONT COLOR=RED
WHEN &owner = TANDEM AND &subsys = NNM THEN
EMSCONT COLOR=PINK
WHEN &owner = TANDEM AND &subsys = PATHWAY THEN
EMSCONT COLOR=TURQUOISE
WHEN &owner = TANDEM AND &subsys = SNAX THEN
EMSCONT COLOR=YELLOW
WHEN &owner = TANDEM AND &subsys = DNS THEN
EMSCONT COLOR=WHITE
OTHERWISE
EMSCONT
END /*select*/
END /*do*/
ELSE
EMSCONT
END /*do forever */
END zex1711n