The following steps describe how to implement a MENU statement:
Create a MENU block with a title and write
the end of the menu block with the END
MENU keywords.
According to the type of menu rendering you need, add an
ATTRIBUTES clause with the
required STYLE attribute.
List all the options that you want to offer to the end
user when the menu executes. Typical CRUD programs
will implement "Append", "Modify", "Delete" operations
for a given database application entity (customers, orders, items
tables). Typical dialog box menus have "Yes" /
"No" / "Cancel" options.
According to TUI or GUI mode, define action views (topmenu,
toolbar or form buttons) for each menu action,
and use either COMMAND [KEY] or
ON ACTION clauses to define the menu options.
When the menu is not a popup or dialog menu, do not forget
to implement an option to leave the menu with
the EXIT MENU control instruction.
Implement the code to be executed in every option.