PMENU Procedure

MENU Statement

Names the catalog entry that stores the menus or defines a menu.
Building a Menu Bar for an FSEDIT Application

Associating Menus with a FRAME Application

Syntax

MENU menu-bar;

Required Arguments

One of the following arguments is required:

menu-bar
names the catalog entry that stores the menus.
pull-down-menu
names the menu that appears when the user selects an item in the menu bar. The value of pull-down-menu must match the pull-down-menu name that is specified in the MENU= option in a previous ITEM statement.

Details

Defining Menus

When used to define a menu, the MENU statement must follow an ITEM statement that specifies the MENU= option. Both the ITEM statement and the MENU statement for the menu must be in the same RUN group as the MENU statement that defines the menu bar for the PMENU catalog entry.
For both menu bars and menus, follow the MENU statement with ITEM statements that define each of the items that appear on the menu. Group all ITEM statements for a menu together. For example, the following PROC PMENU step creates one catalog entry, WINDOWS, which produces a menu bar with two items, Primary windows and Other windows. When you select one of these items, a menu is displayed.
   libname proclib 'SAS-data-library';

   proc pmenu cat=proclib.mycat;

         /* create catalog entry */
      menu windows;
      item 'Primary windows' menu=prime;
      item 'Other windows' menu=other;

         /* create first menu */
      menu prime;
      item output;
      item manager;
      item log;
      item pgm;

         /* create second menu */
      menu other;
      item keys;
      item help;
      item pmenu;
      item bye;

      /* end of run group */
   run;
The following figure shows the resulting menu selections.
Menu
Menu