Defining an Alias for Mapped Keys
The label constant defines an alias for a key that is mapped to a menu item, FRS key, or FRS command. Because not all terminal keyboards are the same, using an alias can make it easier for the runtime user of an application to quickly find the correct control or function key. By specifying the letters on a keyboard key cap as an alias in a label statement, a runtime user need not memorize the layout of a keyboard or go through a trial and error period. If defined, aliases are displayed for mapped menu items on the menu line and for all mapped objects in the help facility.
The syntax for the label variant of the set_frs statement is:
set_frs frs
(label(menuN|frskeyN|frs_command) = value
{, label(menuN|frskeyN|frs_command) = value})
Value defines the alias. You can use a string literal or a program string variable for value. The label statement accepts the exact same set of object names as the map statement.
As an example, assume that the third function key on a keyboard has the letters CONT on it and that the following statement is executed in an application:
exec frs set_frs frs (map(menuitem1) = pf3);
The menu line looks like this:
Run(PF3) Help End
The quick way for a runtime user to select the first menu item is to press PF3. However, because there is no key with the letters PF3 on it, the user must mentally make the association between pf3 and the key that has CONT printed on it. This makes the application harder to use. However, if the application also contains the following statement:
exec frs set_frs frs (label(menuitem1) = 'CONT');
then the menu line is
Run(CONT) Help End
The user can easily see which key to press.
Any mappings or aliases created by the set_frs statement remain in effect for the remainder of the application unless overridden by another map or label statement.
Aliases can be specified in mapping files. See the Character-based Querying and Reporting Tools User Guide for a complete discussion on mapping files.