KEYI (Key Item)

The KEYI tag defines a key assignment within a key mapping list.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-<KEYI--KEY=virtual-key--CMD=internal-command-name------------>

>--+-----------------+--+----------------+---------------------->
   |       .-UPPER-. |  |      .-NO----. |   
   '-CASE=-+-MIXED-+-'  '-FKA=-+-YES---+-'   
                               +-LONG--+     
                               '-SHORT-'     

>--+------------------+-->--+----------+--+---------+----------><
   '-PARM=parm-string-'     '-FKA-text-'  '-</KEYI>-'   

Parameters

KEY=virtual-key
This attribute specifies the name of the key to assign to the command. The conversion utility supports F1-F24 only.
CMD=internal-command-name
This attribute specifies the command that ISPF runs when the user presses the key.

The internal-command-name must follow the standard naming convention described in Rules for variable names.

As an extension to the Dialog Tag Language, the conversion utility supports special ISPF command syntax for internal-command-name. In this case, the internal-command-name must have these characteristics:
  • 2-9 single-byte characters in length
  • The first character must be a ‘>’, ‘:’, or ‘%’.

    To code the > character you must use the &gtsym predefined entity. See Predefined entities for more information.

  • The second character must be A-Z, a-z, @, #, or $.
  • Remaining characters, if any, must be A-Z, a-z, @, #, $, or 0-9.

Lowercase characters are translated to their uppercase equivalents by default.

CASE=UPPER | MIXED
This attribute specifies whether the internal-command-name is converted to uppercase characters or stored as entered in the tag definition.
FKA=NO | YES | LONG | SHORT
This attribute specifies whether the key assignment is to appear in the function key area of an application panel. The default value NO indicates that the key is not to appear. You must specify FKA=YES, FKA=LONG, or FKA=SHORT if you want the key to be displayed in the function key area.

When FKA=NO is specified, the key is active even if it is not displayed.

PARM=parm-string
This attribute allows a parameter to be added to the command specified by the CMD attribute. The combined length of the command and the parameter is limited to 40 bytes. When the combined length exceeds 40 bytes, truncation of the PARM occurs at the end of the last complete word in the parm-string, for a parm-string containing multiple words. A parm-string which is a single word is truncated at position 40.
FKA-text
This is the text for the key which is to appear in the function key area of the panels that refer to the key list. This text is appended to the string "Fn=" (with no intervening space) to create the displayed format. Use initial caps for the FKA-text value.

If not specified, the FKA-text defaults to the internal-command-name specified for the key.

The function key area is formatted at run time based on the panel size. The maximum number of bytes allowed for FKA-text is 64. If the text exceeds 64 bytes, it is truncated and a warning message is issued. The conversion utility removes excess blanks from FKA-text. The first 8 bytes of the resulting text are used by ISPF.

Comments

The KEYI tag defines a key assignment within a key mapping list. Key assignments provide a means of associating commands with keys.

KEYI tags with the same assignment cause the conversion utility to issue a warning message and retain only the first occurrence.

Restrictions

Processing

None.

Examples

Here is source file markup that contains a key mapping list and an application panel that refers to the key mapping list. The F7 and F8 keys do not appear on the panel because they both have an FKA value of NO. Figure 1 shows the formatted application panel with the displayed keys.
<!DOCTYPE DM SYSTEM(
  <!entity sampvar1 system>
  <!entity sampabc system>
  <!entity sampbody system>)>
&sampvar1;

<KEYL NAME=keylxmp>
  <KEYI KEY=f1  CMD=help     FKA=yes>Help
  <KEYI KEY=f2  CMD=split    FKA=yes>Split
  <KEYI KEY=f3  CMD=exit     FKA=yes>Exit
  <KEYI KEY=f5  CMD=search   FKA=no>Display
  <KEYI KEY=f6  CMD=keyhlp   FKA=yes>Keyshelp
  <KEYI KEY=f7  CMD=backward FKA=no>Backward
  <KEYI KEY=f8  CMD=forward  FKA=no>Forward
  <KEYI KEY=f9  CMD=swap     FKA=yes>Swap
  <KEYI KEY=f10 CMD=actions  FKA=no>Actions
  <KEYI KEY=f12 CMD=cancel   FKA=yes>Cancel
</KEYL>

<PANEL NAME=keyi KEYLIST=keylxmp>Library Card Registration
<AB>
&sampabc;
</AB>
&sampbody;
</PANEL>
Figure 1. Key Items
   File  Search  Help
 --------------------------------------------------------------------------
                         Library Card Registration

 Type in patron's name and card number if applicable.

 Then select an action bar choice.

 Date . . . :
 Card No. . . _______  (A 7-digit number)
 Name . . . . _________________________  (Last, First, M.I.)
 Address  . . _________________________

 Choose one of the following           Check valid branches
 __  1.  New                           _  North Branch
     2.  Renewal                       _  South Branch
     3.  Replacement                   _  East Branch
                                       _  West Branch

 Enter a command ===> ______________________________________________________
  F1=Help        F2=Split       F3=Exit        F6=KEYSHELP    F9=Swap
 F12=Cancel