CHCACCEL (Choice Accelerator Text) keyword for display files

Use this field-level keyword on a single-choice selection field in a pull-down record to specify text for the accelerator key on a choice.

Note: CHCACCEL only specifies the text that should describe the accelerator key. It does not enable the function key.
The format of the keyword is:
CHCACCEL(choice-number accelerator-text)

The choice-number parameter specifies the number of the choice on the single selection field that this keyword applies to. Valid values are 1 to 99.

The accelerator-text parameter specifies the text identifying the accelerator key. The parameter can be specified in one of two forms:
  • As a character string: 'Accelerator text'
  • As a program-to-system field: &field-name

The field specified must exist in the same record as the selection field and must be defined as a character field with usage P. This text is placed 3 spaces to the right of the maximum length of the choice text. The maximum length of the accelerator text is determined by the length of the longest choice text. The combination of the two must not exceed the width of the smallest display size specified for the file.

The CHCACCEL keyword is allowed only on single-choice selection fields (SNGCHCFLD keyword specified on the same field) in pull-down records (PULLDOWN keyword specified at the record level).

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the CHCACCEL keyword:

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A
     A          R PULLEDIT                  CF04 CF06
     A                                      PULLDOWN
     A            F1             2Y 0B  1  2SNGCHCFLD
     A                                      CHOICE(1 '>Undo')
     A                                      CHOICE(2 '>Mark')
     A                                      CHOICE(3 '>Copy')
     A                                      CHCACCEL(1 'F4')
     A                                      CHCACCEL(2 &F6);
     A            F6             2A  P

In this example, choice 1 has the accelerator key CF04 and choice 2 has the accelerator key CF06. When the pull-down menu is displayed, the character text F4 appears to the right of the text 'Undo', with 3 spaces in between, and the text in field F6 appears to the right of the text 'Mark', with 3 spaces in between. The longest choice text determines the length of all choice text. The same is true for the ACCEL text. The ACCEL text is then started 3 spaces to the right of the longest choice.