Previous Topic: &$MHOPT=EXIT Statement

Next Topic: &$MHOPT=TIMEOUT Statement


&$MHOPT=COMMAND

This statement indicates that a command that is not known to the system has been issued from the menu. When the value of &$MHOPT is COMMAND, you can use the menu service procedure to perform any special processing that is required to process the command.

Read-Only Variables

This statement contains the following read-only variables:

&$MHOPT

This variable is set to COMMAND.

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

&$MHCMD

This variable is set to the command.

&$MHCMDPARMS

This variable is set to the command parameters.

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

Command processed successfully

4

Command in error; if &SYSMSG is not set, the error message MH0003 is displayed