Previous Topic: $MHOPT=ENTRY Statement

Next Topic: &$MHOPT=RETURN Statement


&$MHOPT=SELECT Statement

This statement indicates that the user has selected a menu option. When the value of &$MHOPT is SELECT, you can use the menu service procedure to perform any special processing that is required upon a menu option being selected.

Read-Only Variables

This statement contains the following read-only variables:

&$MHOPT

This variable is set to SELECT.

&$MHAPPLID

This variable is set to the ID of the application to which the menu belongs.

&$MHMENUNUM

This variable is set to the menu number.

&$MHSELECT

This variable is set to the option the user selects from the menu.

&$MHSELECTNUM

This variable is set to the relative numeric position of the selected option on the menu, as defined on the CAS : Menu Options panel.

Modifiable Variables

This statement contains the following modifiable variables:

&$MHERRLIST

Use this variable to return the names of the input fields that contain incorrect values to the system. This variable can be set to the input fields that are in error in the form fieldname1, fieldname2...fieldnameN. The fields are placed in error status on the panel, and the cursor is located in the first field that is in error.

&SYSMSG

Use this variable to return a message. If an error occurs during special processing, this variable must be set to an error message.

Return Codes

The variable &RETCODE must be set by the menu service procedure to one of the following return codes:

0

Proceed; execute the action

8

Error; redisplay the menu