CHCUNAVAIL (Choice Color/Display Attribute when Unavailable) keyword for display files

Use this field-level keyword to specify the color or display attributes to be used when displaying the unavailable choices in a selection field or a push button field.

This keyword can also be used to indicate unavailable choices in a subfile single or multiple choice selection list.

The format of the keyword is:
CHCUNAVAIL([color] [display-attributes])

One parameter must be specified.

The color parameter indicates the color of choice text specified on the CHOICE keywords for the field on a color display station, when the choices are unavailable. It also indicates the color of unavailable entries in a single or multiple choice selection list displayed on a color display.

The valid values for the color parameter are:

Value Meaning
BLU Blue
GRN Green
PNK Pink
RED Red
TRQ Turquoise
YLW Yellow
WHT White

If the color parameter is not specified, the default color for unavailable choices in a selection field is blue. This parameter is ignored on a monochrome display.

The display-attribute parameter indicates the display attributes of the choice text specified on the CHOICE or PSHBTNCHC keyword for the field. The parameter is specified as an expression of the form (*DSPATR value1 <value2 <value3...>>).

Value Meaning
BL Blink
CS Column separator
HI High intensity
ND Nondisplay
RI Reverse image
UL Underline

The default display attribute for unavailable choices in a selection field on monochrome display stations is normal (or low) intensity. Also, the first character of an unavailable choice on a monochrome display station is overwritten with an asterisk (*).

Note: Display attributes CS, HI, and BL can cause fields on 5292, 3179, 3197 Models C1 and C2, 3486, 3487 Model HC, and 34881 workstations to appear as color fields. Separator lines do not appear when display attributes HI, RI, and UL are used.

When used on a field specification, this keyword is allowed only if there are also one or more CHOICE or PSHBTNCHC keywords. When used on a subfile control record, this keyword is allowed only if the SFLSNGCHC or SFLMLTCHC keyword is also used on the subfile control record.

Option indicators are valid for this keyword.

Example

The following example shows how to specify the CHCUNAVAIL keyword:

|....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
      A
      A          R RECORD
      A            F1             2Y 0B  2  5SNGCHCFLD CHECK(ER)
      A                                      CHOICE(1 'Choice number 1')
      A                                      CHOICE(2 'Choice number 2')
      A                                      CHCCTL(1 &CHCCTL1);
      A                                      CHCCTL(2 &CHCCTL2);
      A                                      CHCUNAVAIL((*COLOR TRQ))
      A            :
      A            :
      A

In this example, the unavailable choices for the selection field are displayed in turquoise on a color display.

Related reference
SFLMLTCHC (Subfile Multiple Choice Selection List) keyword for display files
COLOR (Color) keyword for display files
1 Dependent on the monitor attached to the display device.