Previous Topic: &$MHOPT=RETURN Statement

Next Topic: &$MHOPT=COMMAND


&$MHOPT=EXIT Statement

This statement indicates that a menu is terminating. When the value of &$MHOPT is EXIT, you can use the menu service procedure to perform any special processing that is required on the termination of the menu.

Read-Only Variables

This statement contains the following read-only variables:

&$MHOPT

This variable is set to EXIT.

&$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.

Modifiable Variables

This statement contains the following modifiable variables:

&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; exit from the menu

16

Do not exit; redisplay the menu