HLPCMDKEY (Help Command Key) keyword for display files

You use this record-level keyword to return control to your application program after a command attention (CA) or command function (CF) key is pressed on an application help record format.

This keyword is specified on the application help record format. For control to return, the command key must be specified on both the application record format and the application help record format.

This keyword has no parameters.

A CA or CF key must be specified either at the file level or on the help record containing the HLPCMDKEY keyword. If no CAnn or CFnn keys are specified at the file level or on the help record, a warning message (severity 10) is issued. If all the CAnn and CFnn keys specified at the file level and on the same help record as the HLPCMDKEY keyword have option indicators, a warning message (severity 10) is issued. When a response indicator is specified on a CA or CF key on the application help record format, a warning message (severity 10) is issued and the response indicator will be ignored.

If you specify this keyword on the help record and the display station user presses one of the command keys that is specified on both the application record and the application help record, the following case happens:
  • If the command key is a CAnn key, no input data from the application record format is transmitted to the application program.
  • If the command key is a CFnn key, input data from the application record format is transmitted to the application program.
  • The command key will be returned to the application program.

The command key must be specified on both the application record format and the application help record format. If the command key is specified only on the application record format, the command key will not be allowed when the application help record format is displayed. If the command key is specified only on the application help record format, the command key will function as the Enter key and control will not return to the application program.

You cannot specify HLPCMDKEY on subfile (SFL keyword), subfile control (SFLCTL keyword), or user-defined (USRDFN keyword) record formats.

You cannot specify the HLPCMDKEY keyword in a file containing the USRDSPMGT keyword.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the HLPCMDKEY keyword. The first record is the application record format and the second record is the application help record format.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R APPRCD                    CA01
00020A                                      CA03
00030A                                      CF12(12)
00040A                                      CA04
00050A                                      HELP
00060A          H                           HLPRCD(HELPRCD)
00070A                                      HLPARA(1 1 24 80)
00080A                                  8  2'THIS IS THE APPLICATION'
00090A                                  9  2'RECORD FORMAT'
00100A            INPUT1        10   B 12 10
00110A            INPUT2        10   B 13 10
00120A            INPUT3        10   B 14 20
00130A*
00140A          R HELPRCD                   HLPCMDKEY
00150A                                      CA01(11)
00160A                                      CF03
00170A                                      CF05
00180A                                      CF12
00190A                                  5  8'SPECIFY COMPANY NAME'
00200A                                  6  9'SPECIFY STREET'
00210A                                  7 10'SPECIFY CITY, STATE, ZIP'
     A

If the user is at the application help display, the following case occurs:

  • If the CMD1 key is pressed, control is returned to the application program, but no data from the application record format is transmitted to the application program. Response indicator 11 is not set on because it was specified on the help record format rather than on the application record format.
  • If the CMD12 key is pressed, control is returned to the application program and data from the application record format is transmitted to the application program. Response indicator 12 is on.
  • If the CMD5 key is pressed, it functions as the Enter key. The same CA or CF keys must be specified on both the application record format and the application help record format for control to be returned to the application program.
  • If the CMD3 key is pressed, it functions as the Enter key. The corresponding CA or CF keys must be specified on both the application help record format and the application record format for control to be returned to the program.
  • If the CMD4 key is pressed, it results in a message indicating that the CMD4 key is not allowed. The same CA or CF keys must be specified on both the application record format and the application help record format in order for control to be returned to the application program.