@MENU_CHOICE

Type/Length:    INT, 3, USAGE IS BINARY
Modifiable:    No

This system field contains the sequence number of the item selected.

RETURNS

When an item is selected, its sequence number is stored in the system field @MENU_CHOICE.  The value of @MENU_CHOICE can be examined to determine which item has been selected.

The order of ITEM statements within the LAYOUT SCREEN definition is significant.  The MENU statement/command processes the ITEM statements in the order in which they are defined not in the order that they appear on the screen.  If the selected item is the second ITEM statement in the LAYOUT SCREEN definition, the value of @MENU_CHOICE is 2.

NOTE:  In most cases, @MENU_KEYWORD should be used instead of @MENU_CHOICE.  If the LAYOUT SCREEN definition is changed during maintenance and a new item added or one deleted, the sequence number of the following items will change, which means that any affected Process Module (PM) or Command Module (CM) will also need to be changed.  If @MENU_KEYWORD is used, a menu item can be added or deleted without changing an existing PM or CM.

SEE ALSO:  MENU Statement/Command (earlier in this section).

@Menu_Action    @Menu_Keyword