Use this field-level keyword on a selection field to control the availability of the choices for the field.
The format of the keyword is either one of the following:
CHCCTL(choice-number &control-field [msg-id [msg-lib/]msg-file]) or CHCCTL(choice-number &control-field [&msg-id [&msg-lib/]&msg-file])
The choice-number parameter is required and it specifies the choice to which this keyword applies. Valid values are 1 to 99.
The control-field parameter is required and it specifies the name of a 1-byte numeric hidden field that, on output, contains the control value for the choice. The field must be defined within the same record as the field you are defining, and must be defined as data type Y (numeric) with length 1, decimal positions 0, and usage H. On input for multiple-choice selection fields, the selection field indicates whether the field was selected.
The message-id and message-file parameters are optional and specify a message to be displayed when the user selects an unavailable choice. If these parameters are not specified, the system issues a default message, CPD919B, when the user selects an unavailable choice. If a field is used for the message-id, that field must exist in the record you are defining and it must be defined as data type A, usage P, and length of 7.
The message-file parameter is a required parameter when the message-id parameter is used. If you do not specify the library parameter, *LIBL is used to search for the message file at program run time. If a field is used for the message library or message file, that field must exist in the record you are defining and it must be defined as data type A, usage P, and length of 10.
When the CHCCTL keyword is specified on a field, a CHOICE or PSHBTNCHC keyword with the same choice number must also be specified for the field.
Option indicators are not valid for this keyword.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.