NET/MASTER Network Control Language (NCL) Reference Manual
#ERR
Panel Control Statements
6–10 106126 Tandem Computers Incorporated
Considerations
If multiple #ERR statements are defined that contain contradictory options, the
final #ERR statement containing the repeated option(s) is the one that is accepted.
For example, the following two statements are in conflict:
#ERR ALARM = NO, COLOR=RED, HLITE=BLINK
#ERR ALARM=YES, HLITE=NONE
Both statements are accepted. The color option from the first statement is not in
conflict with any options in the second statement, so COLOR=RED remains
effective. The other options become ALARM=YES and HLITE=NONE, because
they are in the final #ERR statement that contains these options.
If you want the NCL procedure that issued the panel to gain control when an error
is detected, you must use the PANELRC option of the CONTROL verb. In this
case, the &SYS.RETCODE system variable contains an error code. The local
&SYSMSG variable contains the text of the error message that describes the error,
and the &SYS.PANEL.FLD system variable contains the variable name of the field
in error. When NCL detects an error in variables as a result of their display on a
panel, they are said to acquire an error attribute. The procedure can determine the
variable name of the field in error (from the &SYS.PANEL.FLD system variable)
and the error message to issue (from the local &SYSMSG variable ), and can alter
its processing accordingly. The text of the error message in the &SYSMSG variable
can be altered, if desired.
The SETERR operand of the ASSIGN verb provides a method for assigning error
attributes to multiple (input field) variables before displaying the panel. This
allows internal validation to check all the fields and then display the panel
showing all incorrect fields. This is also a technique for testing that the #ERR
panel statement displays the erroneous fields as required.
See also the ASSIGN and CONTROL verbs in Section 3, “Verbs.” The ASSIGN
verb can assign a list or range of values to multiple variables. In particular,
Format 3 of the ASSIGN verb describes how you can manipulate the ERROR
attributes of variables, independently of panel control statements. The CONTROL
verb has some options, such as the PANELRC option, that can affect the way
panels are displayed and processed.
See also the ON core statement in Section 2, “Core Statements.” The description of
the ON statement contains a table of system-defined error condition names. This
table lists conditions, such as the PANEL_SKIP_PMENU condition, that can occur
during the processing of panel skip requests and that must be handled by the
initiating procedure. The #ERR statement does not handle these conditions.