ContentsIndexPreviousNext

8.8 Changing Menu Results

The default action of a menu item is to return an exception value equal to the item's ID. You can change the default action of a particular item by using the MENU-ITEM configuration variable.

Use MENU-ITEM in exactly the same fashion as the KEYSTROKE variable, except that the last entry on the line is the menu's ID, not the key code. For example, to cause a menu item whose ID is "200" to act the same as the Delete key, use the following:

MENU-ITEM   Edit=Delete   200

Alternately, you could cause menu item "200" to call the "notepad" sample program by using:

MENU-ITEM   Hot-Key="notepad"  200

You can program these entries in COBOL by using the SET ENVIRONMENT verb. For example,

SET  ENVIRONMENT  "MENU-ITEM"  TO
 "Edit=Delete  200"