VLDCMDKEY (Valid Command Key) keyword for display files

Use this file- or record-level keyword to specify that the i5/OS™ program is to set on the specified response indicator when any valid command key other than the Enter key is pressed by the workstation user.

One use of this function is to perform a simple test to determine if the workstation user has requested a function you want to watch for in your program.

See the System/36 environment considerations for display files topic for information about how to specify the VLDCMDKEY keyword in files that are used in the System/36™ environment.

The format of the keyword is:
VLDCMDKEY(response-indicator ['text'])

The response-indicator parameter is required.

The optional text is included on the computer printout created at program compilation to explain the intended use of the indicator. This text's only function in the file or the program is a comment. The single quotation marks are required. If you specify more than 50 characters between the single quotation marks, the text is truncated to 50 characters on the program computer printout.

For a command key to be considered valid, you must have activated the key by specifying it with one of the following keywords:
Keyword
Comments
ALTHELP(CAnn)
With or without response indicator on the HELP keyword. Causes the command attention key specified to be considered a valid command key.
ALTPAGEUP(CFnn)
With or without response indicator on the PAGEUP keyword. Causes the command function key specified to be considered a valid command key if PAGEUP is also specified.
ALTPAGEDWN(CFnn)
With or without response indicator on the PAGEDOWN keyword. Causes the command function key specified to be considered a valid command key if PAGEDOWN is also specified.
CAnn
With or without response indicator.
CFnn
With or without response indicator.
CLEAR
With or without response indicator.
HELP
Valid only when HELP key is passed back to application as follows:
  • HELP and HLPRTN (with or without a response indicator).
  • HELP (with or without a response indicator) and no help areas are defined for any records currently being displayed.
HOME
With or without response indicator.
PAGEDOWN
With or without response indicator.
PAGEUP
With or without response indicator.
PRINT
Valid only when PRINT key is passed back to application as follows:
  • PRINT (with a response indicator).
  • PRINT (*PGM).
ROLLUP
With or without response indicator.
ROLLDOWN
With or without response indicator.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the VLDCMDKEY keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R REC1                      VLDCMDKEY(90 'Any valid key')
00020A                                      CA01(91)
00030A                                      CA02(92)
00040A                                      CA03(93)
00050A                                      CLEAR(94)
     A

In this example, Indicator 90 is set on if any of four keys (CA01, CA02, CA03, or Clear) is pressed.