Previous Topic: #ALIAS Control Statement—Define Alternative Name for Input Variables

Next Topic: #FLD Control Statement—Define or Modify a Panel Definition Field Character

#ERR Control Statement—Define Action Taken During Error Processing

This control statement determines the processing required when a panel is being redisplayed following an error condition.

An error condition can be detected either by Panel Services internal validation or by the processing NCL procedure. If detected by internal validation (and &CONTROL PANELRC is not in effect), Panel Services invokes error processing automatically. If detected by the processing NCL procedure, error processing is invoked in one of two ways:

When #ERR processing is initiated, the cursor is positioned to the first field in error. The panel is redisplayed, applying the attributes defined on the #ERR statement to the fields in error. This technique provides the panel user with a simple means of drawing the terminal operator's attention to the field in error. This is particularly effective on color terminals where the color of any field in error can be altered and reverts to normal when the error condition is rectified.

Normally only one #ERR statement is defined. However, if required to accommodate the operands, multiple statements can be defined. They can be defined in any order. However, as with #OPT, #FLD, and #NOTE statements, any #ERR statement must precede the start of the panel, as determined by the first line that is not a control statement.

This control statement has the following format:

#ERR [ INTENS={ HIGH | LOW } ]
   [ { COLOR | COLOUR }={ BLUE | RED | PINK | GREEN |
                     TURQUOISE | YELLOW | WHITE | DEFAULT } ]
   [ { HLIGHT | HLITE }={ USCORE | REVERSE | BLINK | NONE } ]
    [  ALARM={ YES | NO } ]
INTENS={ HIGH | LOW }

Determines the intensity of the error field when displayed. The INTENS operand is ignored for terminals with extended color and highlighting when either the COLOR or HLIGHT operand is specified.

HIGH

Specifies that the field is displayed in double intensity.

LOW

Specifies that the field is displayed in low or standard intensity.

{ COLOR | COLOUR }={BLUE | RED | PINK | GREEN |
TURQUOISE | YELLOW | WHITE| DEFAULT}

Determines the color of the field. The operand applies only to IBM terminals with seven-color support and Fujitsu terminals with three- or seven-color support.

If the terminal does not support extended color, the COLOR operand is ignored. This feature enables COLOR to be specified on panels that are displayed on both color and non-color terminals. COLOR can be used with the HLIGHT operand.

For Fujitsu terminals that support extended color data streams, but support only three colors, the following color relationships are used:

Specified

Result (on Fujitsu three-color terminal)

GREEN

GREEN

RED

RED

PINK

RED

BLUE

GREEN

TURQUOISE

GREEN

YELLOW

WHITE

WHITE

WHITE

DEFAULT

GREEN

Fujitsu seven-color terminals are treated the same as IBM seven-color terminals.

The DEFAULT keyword indicates that the color of the field is to be determined from the INTENS operand. This feature is useful if you want to set the color from an NCL procedure (that is, COLOR=&COLOR is specified and the NCL procedure can set the &COLOR variable to DEFAULT).

{ HLIGHT | HLITE }={ USCORE | REVERSE | BLINK | NONE }

Applies only to terminals with extended highlighting support, and determines the highlighting to be used for the field.

The HLIGHT operand is ignored if the terminal does not support extended highlighting, so HLIGHT can be specified on panels that are displayed on terminals that do not support extended highlighting. HLIGHT can be used with the COLOR operand.

When NONE is specified, the HLIGHT operand is ignored and no extended highlighting is performed for this field.

ALARM={ YES | NO }

Determines whether to ring the terminal alarm when the panel is displayed with an error condition. This alarm works independently of the ALARM operand on the #OPT control statement.

Examples: #ERR Control Statement

#ERR COLOR=RED HLIGHT=REVERSE ALARM=YES
#ERR COLOR=YELLOW HLIGHT=BLINK INTENS=HIGH

Notes: