NET/MASTER Management Services (MS) Operator's Guide

Sample NCL Procedure
Automating Operations Tasks With NCL Procedures
10–4 106379 Tandem Computers Incorporated
The current OCS window identifier (&SYS.OCS.ID) and the background OCS
window identifier (&SYS.OCS.IDO)
The following example sets the OCS window identifier of the first OCS window
you enter to “ONE” and the OCS window identifier of the second OCS window
you enter to “TWO.” Including similar statements as part of the NCL procedure
that is executed as soon as you enter OCS sets the window identifiers for you.
IF &SYS.OCS.IDO \= "ONE" THEN
CMD "-OCSID ONE"
ELSE
CMD "-OCSID TWO"
System variables are all prefixed with “&SYS.” and are distributed with your NonStop
NET/MASTER MS software. Refer to the NonStop NET/MASTER NCL Reference
Manual for a complete description of all system variables.
Sample NCL
Procedure
Of the many types of NCL procedures you can write, a particularly useful one would
be an NCL procedure that is automatically executed when you enter OCS. Such a
procedure could tailor your OCS profile, define function keys, establish local equate
commands, log you on to remote systems, and so on.
The following example sets up some local equates, defines three function keys, tests
the setting of the current OCS identifiers, assigns an OCS identifier for each window
based on the value of the variables, and sets up two different operations environments.
If executed on entry to OCS, this procedure always identifies the first window as
PROD and sets up a “production” environment, and the second window as TEST and
sets up a “test” environment there. The procedure maintains this situation regardless
of the order in which you enter and exit the windows.