You can customize your NCL environment using optional initialization files. In addition, on OpenVMS you have the option of using a keypad definition file. Tru64 UNIX allows you to define symbols for use with NCL. Setting a default NCL context is another way of customizing your NCL environment. This allows you to specify a particular entity or default access control information to be used for the remainder of an NCL session. For information on setting a default NCL context, refer to HELP NCL DEFAULT_CONTEXT.
1 – Initialization File
The initialization file contains NCL commands that are executed when you start NCL; that is, before you receive the NCL prompt. Alternatively, the initialization file is executed prior to executing an NCL script file that is specified as part of a DCL command line. In the following example, the initialization file will be executed before the ROUTING.NCL script: $ ncl @routing.ncl
1.1 – OpenVMS
NCL uses the default file name SYS$LOGIN:NCL$INIT.COM unless you have defined an alternative file use the NCL$INIT logical. To use NCL$NODEA_INIT.COM as an initialization file, use the following DCL define command: $ define ncl$init ncl$nodea_init.com When NCL starts up, it will check for the file NCL$NODEA_INIT.COM, and if it exists, will execute the ncl commands within it.
1.2 – Tru64 UNIX
For Tru64 UNIX, if the file .nclrc exists in the user's top level directory, the command within it will be executed automatically when NCL is started.
2 – Key Definition File (OpenVMS)
The key definition file associates commonly used NCL commands with keys on the keypad. Use the define/key command to create the definition. NCL uses the default file name SYS$LOGIN:NCL$KEYDEF.INIT unless you have defined an alternative file use the NCL$KEYDEF logical. The SYS$EXAMPLES:SETUP_NCL_KEYPAD.COM command file creates files that allow you to execute commonly used NCL commands using one or two keystrokes on the keypad. This command file should be executed from the system account. It works in a cluster environment, but only for those roots on a single system disk and only for those nodes booted into the cluster at the time you execute the command file. $ @sys$examples:setup_ncl_keypad This command file creates Keypad definitions files for NCL to be used with the HP DECnet-Plus for OpenVMS products. It creates files in SYS$MANAGER: and SYS$HELP:. All files begin with NCL$KEYDEF. A copy of this file will be made in SYS$UPDATE: In a cluster environment, NCL scripts are created in SYS$SPECIFIC: directories for each node on this system disk. This file may be copied to any system running HP DECnet-Plus for OpenVMS. Note: Please add "$ DEFINE/SYSTEM NCL$KEYDEF SYS$MANAGER:NCL$KEYDEF.INIT" to your OpenVMS startup procedure. Continue? [Y/N Def: Y]: Creating NCL Key Definition Init File... Creating NCL Key Definition Help Text Files... Installing in a cluster environment. Scripts created for each member... %SYSMAN-I-ENV, current command environment: Clusterwide on local cluster Username SYSTEM will be used on nonlocal nodes %SYSMAN-I-OUTPUT, command execution on node NODEA NSP Show Nodes Complete... OSI Show Nodes Complete... Show Routing Adjacencies Complete... %SYSMAN-I-OUTPUT, command execution on node NODEB NSP Show Nodes Complete... OSI Show Nodes Complete... Show Routing Adjacencies Complete... %SYSMAN-I-OUTPUT, command execution on node NODEA %SYSMAN-I-OUTPUT, command execution on node NODEB $ Once in NCL, keypad <EMPHASIS>(PF4) displays an introduction and keypad PF2 provides help on the keypad layout.
3 – Defining Symbols (Tru64 UNIX)
You can define symbols to represent commonly used class/instance pairs of NCL commands. Symbol definitions are provided to cut down on the amount of repetitive typing you must perform. Use the define and read control verbs to create and verify symbol definitions. For example: define ncl symbol NAME = "VALUE" undefine ncl symbol [ NAME | * ] show ncl symbol [ NAME | * ] list ncl symbol [ NAME | * ] ncl> define ncl sym rc1 = "routing circuit circuit-1" ncl> show rc1 Node 0 Routing Circuit circuit-1 AT 1994-07-14-15:10:10.976-04:00I0.226 Identifiers Name = circuit-1 The first parameter to the define command is the symbol and all remaining text is the equivalence string (the translation of the symbol). The symbol can be from 1 to 500 characters in length and contain any ISO latin-1 characters (?). At definition time, the equivalence string is not parsed. NCL will parse the full NCL command and any symbols that form part of the command. To delete symbols, use the undefine verb. For example: ncl> undefine Ether,Remote_Node ! To delete specific symbols . . . ncl> undefine * ! To delete all remaining symbols . . . You can use "." to mean "the entity used in the last command."