NET/MASTER Network Control Language (NCL) Programmer's Guide
Obtaining Input From a Panel
Working With Panels
14–68 106160 Tandem Computers Incorporated
achieved by substituting variables in control statements, but this process becomes
unwieldy.
Panel Services facilities are provided to simplify the notification of errors. These
facilities assume that error reporting includes additional attention-getting operations
such as the following:
Ringing the terminal alarm
Placing the cursor on the field in error
Displaying error message text
Changing the field in error to high-intensity
Switching the field in error to a different color
Displaying the field in error in reverse video
The #ERR control statement lets you design a common environment for error
conditions. This environment is then applied whenever an input field is specified in
the ERRFLD operand of the #OPT control statement.
The ERRFLD operand is set by the NCL process when an error is detected. If Panel
Services displays a panel where the ERRFLD operand specifies a field that is in error,
the attributes defined within the #ERR panel control statement are used to override
the normal attributes for the field. If the ERRFLD operand is null, the #ERR statement
is ignored.
To indicate an error, the NCL process initializes the error message variable, assigns the
name of the erroneous field to the ERRFLD operand’s variable, and redisplays the
panel. The targeted field is then assigned the new characteristics defined by the #ERR
statement.
It is recommended that you define panel description files so that the #OPT panel
control statement includes an ERRFLD operand that specifies a variable that can be set
by the NCL process.
Internal Validation Facilities You can create your own NCL procedures to perform all necessary panel field
validations. However, Panel Services includes powerful automatic checking
capabilities for this. These are called internal validation facilities.
Panel Services can provide internal validation at a field level. This performs most of
the basic checking required for a field. It can greatly simplify the processing required
within an NCL process.
The type of field validation you require can be specified using the field character
attributes marking the start of a field and by targeting these on an associated #FLD
statement. Multiple #FLD control statements can be used to specify different
validation criteria for individual fields.
You can use the following operands of the #FLD panel control statement to internally
validate input fields:
REQ=YES, to ensure that the specified field is not omitted.
BLANKS=TRAIL, to specify that trailing blanks but not imbedded blanks can be
accepted in input data.