NET/MASTER Network Control Language (NCL) Programmer's Guide
Altering NCL Process Execution
Advanced NCL Programming
106160 Tandem Computers Incorporated 18–17
Altering NCL Process
Execution
NCL contains many core statements, verbs, and built-in functions to create powerful
logic capabilities. While each core statement, verb and built-in function has a specific
effect when it is executed, you can modify or influence the mode of execution if you
wish.
All the processing options available to modify NCL execution characteristics are
defined by a special verb—the CONTROL verb. You can use the CONTROL verb in
an NCL process to configure aspects of its internal operational environment.
CONTROL sets NCL process control characteristics. You can use the CONTROL verb
to tailor operational characteristics during the course of NCL process execution.
For example, you can specify how you want variables to be shared between
procedures and functions by default using the CONTROL [NO]SHRVARS option.
You can specify how you want an NCL process to interpret function keys using the
CONTROL [NO]PFK* options. You can specify how you want an NCL process to
handle panel processing using the [NO]FLDCTL, [NO]PANELRC, and [NO]SHAREW
options.
Refer to the NonStop NET/MASTER NCL Reference Manual for a complete description of
every CONTROL verb operand.
Note The CONTROL verb does not affect the logic of the NCL process during execution or have any direct
affect on variables. It changes the execution characteristics of specified subsequent statements in an
NCL process.
Syntax of the CONTROL
Verb
Most options available on the CONTROL verb have two possible settings—on or off.
The CONTROL options are represented by keywords, which typically have the
following form:
CONTROL [NO]
option
Every option has a default setting, which is in effect when an NCL process begins
execution. NCL procedures within the NCL process may then execute CONTROL
verbs anywhere in the logic to set or reset any of the CONTROL options.
The combination of CONTROL option settings that are in force at any instant for a
process are called the CONTROL environment of an NCL process.
Sharing the CONTROL
Environment
By default, when an NCL process calls an NCL procedure using the CALL core
statement, the current CONTROL environment is remembered. It is restored when the
callee NCL procedure terminates and returns control to the calling NCL procedure.
This prevents the calling NCL process from being affected if any CONTROL options
are changed by the callee NCL procedure or by any lower-level procedures.