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

Obtaining Input From a Panel
Working With Panels
106160 Tandem Computers Incorporated 14–69
RANGE=( start, end ), to specify that the entered data must be numeric and in a
certain range.
Internal validation error processing depends on how the CONTROL [NO]PANELRC
option is set. If CONTROL NOPANELRC is set, automatic internal validation occurs.
If CONTROL PANELRC is set, advanced internal validation may be used.
Automatic Internal
Validation
An input error detected by internal validation where CONTROL PANELRC is not in
effect is automatically handled by Panel Services. Control is not returned to the NCL
process.
Panel Services assigns the appropriate error text to the &SYSMSG variable,
automatically redisplays the panel, rings the terminal alarm, and places the cursor at
the field in error. The display options defined, for example, color and highlighting
attributes, within the #ERR statement for the panel are applied to the erroneous field.
To take advantage of automatic internal validation, ensure that the &SYSMSG variable
field is described somewhere in the panel description file when designing the panel.
Position the &SYSMSG field towards the top of the panel so that any message it
includes is visible in split screen mode. If &SYSMSG is not provided, the error text
cannot be displayed and you may not be able to find the cause of error. (The error
message texts used by internal validation are detailed in the EDIT operand of the
#FLD control statement.)
The field for the &SYSMSG variable is normally a high-intensity field, or some
prominent color (for color terminals).
The &SYSMSG variable always resets to a null value when control returns to the NCL
process if no internal validation is performed and no errors are detected. This ensures
an NCL process does not have to explicitly clear the &SYSMSG variable if no error is
found.
The &SYSMSG variable is not limited to internal validation uses. NCL procedures can
use it to display error messages or text assigned during processing.
Internal validation facilities cannot address all of the validation requirements that an
NCL process performs. Like other user variables, the &SYSMSG variable does not
span different nesting levels—it is unique to each level unless made available by
enabling variable sharing.
Advanced Internal
Validation
While automatic internal validation greatly simplifies an NCL procedure, sometimes
you may want an NCL process to continue processing when a validation error is
detected, bypassing the automatic redisplay normally performed. For example, if a
field is specified as mandatory, using REQ=YES, automatic internal validation forces
the field to be entered and issues the message REQUIRED FIELD OMITTED if the field
is omitted.
If CONTROL PANELRC is set before a PANEL verb is executed, the NCL process is
designed to process a range of return codes. These return codes accommodate a
variety of conditions possible when processing a panel and signify there is no
automatic redisplay performed after an error is detected.