Use this field-level keyword on a selection list to control the availability of choices for the list.
The format of the keyword is either one of the following:
SFLCHCCTL[(msg-id [[msg-lib/]msg-file])] or SFLCHCCTL[(&msg-id [[&msg-lib/]&msg-file])]
The msg-id and msg-file parameters are optional. They specify that a message will 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 msg-file parameter is a required parameter when the msg-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 SFLCHCCTL keyword is specified on a field, that field will be
considered the control field for that record. That field must be the
first field defined in the subfile record. That field must have a
length of 1, data type of Y, decimal positions of zero, and have a usage of
H. That field must be defined as the first field in the subfile.
The control field works as follows:
Table 7. Control field for the SFLCHCCTL keyword
Control value | Meaning on Output | Meaning of Input |
---|---|---|
0 | Available | Not selected |
1 | Selected | Selected |
2 | Unavailable. Cannot place cursor on choice unless help for choice is available.1 |
|
3 | Unavailable. Placing cursor on choice is allowed. |
|
4 | Unavailable. Cannot place cursor on choice even if help for the choice is available.1 |
|
|
Option indicators are not valid for this keyword.
SFLNXTCHC keyword can not be specified in a record that contains a field with the SFLCHCCTL keyword.
Only one SFLCHCCTL keyword can be used in one subfile record.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.