NET/MASTER Network Control Language (NCL) Programmer's Guide

Obtaining Input From a Panel
Working With Panels
14–70 106160 Tandem Computers Incorporated
If you use CONTROL PANELRC, the NCL process retrieves control if internal
validation detects that a required field has been omitted. The name of the field in error
is supplied in a variable called &SYS.PANEL.FLD and the text of the error message
registered by internal validation is supplied in the &SYSMSG variable.
If an NCL process uses advanced internal validation, you must write it so that it can
handle all possible return codes from the PANEL verb.
If no internal validation is performed or no internal validation error is detected,
&SYSMSG and &SYS.PANEL.FLD are set to a null value when control is returned to
the NCL process after the PANEL verb. This ensures that the NCL process does not
have to explicitly clear variables if an error is not found.
Discovering Which Input
Fields Have Changed
NCL procedures need a simple mechanism for discovering which input fields have
been modified on a panel with multiple fields, each of which must have its input
validated.
When an NCL process sets the CONTROL FLDCTL verb, Panel Services automatically
creates a stack of all modified input fields returned from the terminal. This stack is
built by scanning the input panel line-by-line from top to bottom and from left to right.
The system variable &SYS.PANEL.MODFLD is initialized with the name of the input
field variable that is logically at the top of the stack.
Each time the &SYS.PANEL.MODFLD variable is referred to, its value changes to the
name of the variable associated with the next modified input field on the panel. When
the NCL process processes the last panel input field variable name,
&SYS.PANEL.MODFLD is reset to a null value.
An NCL process may have one active &SYS.PANEL.MODFLD stack at a time. If
another panel is displayed while CONTROL FLDCTL is set, then the current
&SYS.PANEL.MODFLD stack is rebuilt. Unaccessed &SYS.PANEL.MODFLD
variables remain in the stack if they are in the panel just displayed. Alternatively, if
CONTROL NOFLDCTL is issued to suspend the &SYS.PANEL.MODFLD stack
generation, any number of other panels may be presented without destroying the
&SYS.PANEL.MODFLD stack. The &SYS.PANEL.MODFLD stack is available for use
unchanged as soon as CONTROL FLDCTL is reissued.
The OPT=SETERR, OPT=MODFLD, OPT=SETMOD, and OPT=RESETMOD operands
of the ASSIGN verb can help you to manipulate the &SYS.PANEL.MODFLD stack.
You can use the OPT=SETOUT and OPT=RESETOUT operands of the ASSIGN verb to
control the attributes of input and outvar fields. See the subsection “Controlling
Output Field Attributes,” later in this section.
Controlling Input Field
Initialization
When displaying an asynchronous panel, it is possible to receive output directed to the
panel while input is being entered. This may result in partially updated panel input
fields being reset when the panel is redisplayed to reflect the received output.
The FMTINPUT operand of the #OPT statement in a panel description file determines
if input fields are formatted when a panel is displayed. This operand can be used to
control input field reinitialization for both synchronous and asynchronous panels.