Run Submenu
Runs a submenu, not directly linked to a form, within a frame.
Syntax
run submenu begin | { operations end | }
Description
Run submenu displays a submenu that is not directly linked to a displayed form. Use run submenu with an operation list if you want the form to be inactive; the cursor stays on the menu line, and you must make a selection before regaining access to the form. You do not have access to form fields, and field and column activations are not allowed. The submenu is not influenced by form mode. You must include an endloop statement to end the submenu loop.
The run submenu statement signals the start of a submenu that replaces the original menu line for the form. The submenu consists of the double keywords run submenu followed by an operations list (that is, a list of activations and statement blocks). The submenu operation can contain a timeout section (but not a database event section). The keyword end that concludes the run submenu statement must be followed by a semicolon.
As with submenus produced by attached queries, you can include an initialization block in a run submenu statement. This initialization operates the same way as in an initialization statement, except that you cannot declare variables in a run submenu initialization.
Run submenu allows you to display a submenu without attaching it to a query. If your 4GL specification does not require an attached query, do not construct one to display this submenu. 4GL supports two statements, run submenu and display submenu, that display a submenu without an attached query. The principle difference between the two statements is that, in display submenu, the form remains active, while in run submenu, the form is inactive. See
Display Submenu.
You cannot use the resume menu or resume entry statement in a run submenu and its operations.
Example
This example runs a submenu with two options:
run submenu
begin
'Select' =
begin
...
end
...
'End' =
begin
endloop;
end
end;