You can define multiple menus by separating their definitions
with RUN statements. A group of statements that ends with a RUN statement
is called a RUN group. You must completely define a PMENU catalog
entry before submitting a RUN statement. You do not have to restart
the procedure after a RUN statement.
You must include an
initial MENU statement that defines the menu bar, and you must include
all ITEM statements and any SELECTION, MENU, SUBMENU, and DIALOG statements
as well as statements that are associated with the DIALOG statement
within the same RUN group. For example, the following statements
define two separate PMENU catalog entries. Both are stored in the
same catalog, but each PMENU catalog entry is independent of the other.
In the example, both PMENU catalog entries create menu bars that
simply list windowing environment commands the user can select and
execute:
libname proclib 'SAS-data-library';
proc pmenu catalog=proclib.mycat;
menu menu1;
item end;
item bye;
run;
menu menu2;
item end;
item pgm;
item log;
item output;
run;
When you submit these
statements, you receive a message that says that the PMENU entries
have been created.
To display one of these menu bars, you must associate the
PMENU catalog entry with a window and then activate the window with
the menus turned on, as described in Steps for Building and Using PMENU Catalog Entries.