FLUSH STATEMENT/COMMAND

FLUSH removes the menu and its associated windows from memory.  If the menu is displayed on the screen, the FLUSH statement/command also erases the menu from the screen.

After a FLUSH, the menu ID is removed and is not available. FLUSH menu ID should be executed for each menu if it is no longer needed.  This will save memory space used by the process.

SYNTAX

FLUSH menu_id [{IF; UNLESS} clause] [iterate_clause]

menu_id

is an integer field that contains the menu ID returned by GENERATE.  This field is a valid integer user-defined field, a Global Storage (GS) field, or a system field.

EXAMPLE

FLUSH %MENU_ID IF (%MENU_ID NE 0

This statement/command removes the menu and its associated windows from memory if %MENU_ID is not equal to zero.  The menu ID is in the GS field %MENU_ID.

Menu Statement/Command    Menu-Related System Fields