COMMAND clause is used to specify the name, key, description and help number for a menu option. It also contains the statements that are executed when this option is activated.
Key list |
A list of one or more keys that invoke the menu option |
MENU option |
The clause that contains the name and description of a menu option |
HELP clause |
The clause which contains help number corresponding to the menu option |
COMMAND clause can contain a nested MENU statement.
The menu option clause contains the name of the menu option and the description. Both are optional. This clause has the following syntax:
Option |
A character variable or a character string used as the name of a menu option |
Description |
A character variable or a character string used as the description of a menu option |
Expression list |
A 4GL expression that returns a name or a description of a menu option |
There are two ways of specifying the option name and the description.
In the second case a comma separator is present between the name and description:
If a name or a description is represented by a 4GL expression which consists of more than one variable or has any operators, it should be enclosed in parentheses, e.g.:
MENU "my_menu"
COMMAND KEY (F1) (curr_user||status), "Press to change the user"
If a COMMAND clause contains no option name and no description, the menu option will not be visible for a user.