NET/MASTER Network Control Language (NCL) Programmer's Guide
Sending a Message to an NCL Process When it Is Started
Environments and Command Processing
106160 Tandem Computers Incorporated 16–61
To see how these NCL procedures work, follow these steps:
1. Type the first NCL procedure as shown, calling it ZEX1624N:
zex1624n: PROCEDURE
/* EMSPROC procedure for simple automation. */
/* An asynchronous NCL process is started by */
/* the START verb to handle specific Expand */
/* and SNAX/XF messages, which report line */
/* problems. */
DO FOREVER
EMSREAD VARS=&msgid
IF &$ems.spi \= "" THEN DO
SELECT &msgid
/* Expand NET-LINE-NOT-READY */
WHEN "EXP0045" THEN DO
START PROC=ZEX1625N ENV=BMON NOTIFY=YES MDO=&$ems.
GOSUB CHECK_SUCCESS
END /*do*/
/* SNAX/XF LINE DOWN */
WHEN "SX10023" THEN DO
START PROC=ZEX1626N ENV=BMON NOTIFY=YES MDO=&$ems.
GOSUB CHECK_SUCCESS
END /*do*/
/* SNAX/XF LINE INOP */
WHEN "SX10021" THEN DO
START PROC=ZEX1626N ENV=BMON NOTIFY=YES MDO=&$ems.
GOSUB CHECK_SUCCESS
END /*do*/
OTHERWISE
EMSCONT
END /*select*/
END /*do*/
END /*do*/
CHECK_SUCCESS:
IF &sys.retcode = 0 THEN DO
WRITE LOG=YES INTENS=HIGH,
DATA=NCL PROCESS &sysmsg STARTED FOR EVENT &msgid
EMSCONT INTENS=HIGH
END /*do*/
ELSE
WRITE LOG=YES INTENS=HIGH,
DATA=ERROR &sys.retcode STARTING NCL PROCESS
RETSUB
END zex1624n
2. Copy ZEX1624N to the customized distribution library.
3. Install ZEX1624N as your EMSPROC procedure using the following SYSPARMS
command from the OCS command input line:
SYSPARMS EMSPROC=ZEX1624N
You can use the SHOW SYSPARMS command or the STATUS command to
confirm that ZEX1624N is now your active EMSPROC procedure.