NET/MASTER Network Control Language (NCL) Programmer's Guide
Sending a Message to an NCL Process When it Is Started
Environments and Command Processing
16–60 106160 Tandem Computers Incorporated
Specifying the Environment The START verb can specify the environment in which the started NCL process
executes. By default, the started NCL process executes in the current execution
environment. Other environments in which the started NCL process can execute are
the dependent processing environment associated with the invoking NCL process and
the background processing environments in which virtual users execute.
For example, you could start an NCL process used for the automation of an operations
task in the background processing environment in which BMON operates. Executing
the NCL process in the BMON environment is useful because the NCL process
automatically sends the results of commands to all monitor-class users who are
profiled to receive them. An example of an operations task is attempting to restart an
Expand or SNAX/XF line after EMSPROC receives a message that a line has failed.
The results could report whether the Expand or SNAX/XF line is successfully
restarted.
Synchronizing Execution The START verb can synchronize execution between the invoking NCL process and
the started NCL process by specifying NOTIFY=YES. If execution is synchronized, the
invoking NCL process does not continue execution until it receives the results of
attempting to start the new NCL process. If execution is successful, the NCL ID of the
started NCL process is available to the invoking NCL process in the &SYSMSG
variable and the &SYS.RETCODE system variable contains a return code of zero (0). If
execution is unsuccessful, &SYSMSG is not affected and &SYS.RETCODE contains a
return code indicating an error.
If execution is not synchronized (NOTIFY=NO), the invoking NCL process continues
execution without waiting for the results of attempting to start the new NCL process.
Additionally, the NCL ID of the started NCL process is not made available to the
invoking NCL process and the value of &SYS.RETCODE is always 0.
For example, you could synchronize the execution of an NCL process used for the
automation of an operations task. This is useful because it allows you to confirm that a
certain task has started. If the task of attempting to restart an Expand or SNAX/XF
line is not started by the designated NCL process, then an error message could be
displayed.
Example The following NCL procedures show how to use the START verb to start an NCL
process.
The first NCL procedure is an EMSPROC procedure called ZEX1624N. It is designed
to start one NCL process to automatically recover a failed Expand line and another
NCL process to automatically recover a failed SNAX/XF line. Recovery is triggered
by specific event messages. For more information on the EMSPROC NCL procedure,
see Section 17, “Developing System-Level NCL Procedures.”
The second and third NCL procedures (ZEX1625N and ZEX1626N), both of which are
started by the EMSPROC NCL procedure, perform the work of recovery. ZEX1625N
attempts to recover an Expand line; ZEX1626N, a SNAX/XF line. (By modifying the
code, you could use the same NCL process to perform both tasks.) The information
required to attempt recovery is passed by the EMSPROC NCL procedure using the
START verb.