PMENU Procedure

ITEM Statement

Identifies an item to be listed in a menu bar or in a menu.
Building a Menu Bar for an FSEDIT Application

Creating a Dialog Box to Search Multiple Variables

Associating Menus with a FRAME Application

Syntax

Summary of Optional Arguments

defines a key sequence that can be used instead of selecting an item.
specifies the action for the item.
indicates that the item is not an active choice in this window.
specifies text that is displayed when the user displays the menu item.
specifies a value that is used as an identifier for an item in a menu.
defines a single character that can select the item.
places a check box or a radio button next to an item.

Required Arguments

command
a single word that is a valid SAS command for the window in which the menu appears. Commands that are more than one word, such as WHERE CLEAR, must be enclosed in single quotation marks. The command appears in uppercase letters on the menu bar.
If you want to control the case of a SAS command on the menu, then enclose the command in single quotation marks. The case that you use then appears on the menu.
'menu-item'
a word or text string, enclosed in quotation marks, that describes the action that occurs when the user selects this item. A menu item should not begin with a percent sign (%).

Optional Arguments

ACCELERATE=name-of-key
defines a key sequence that can be used instead of selecting an item. When the user presses the key sequence, it has the same effect as selecting the item from the menu bar or menu.
Restrictions:The functionality of this option is limited to only a few characters. For details, see the SAS documentation for your operating environment.

This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored.

action-option
is one of the following:
DIALOG=dialog-box
specifies the name of an associated DIALOG statement, which displays a dialog box when the user selects this item.
MENU=pull-down-menu
specifies the name of an associated MENU statement, which displays a menu when the user selects this item.
SELECTION=selection
specifies the name of an associated SELECTION statement, which submits a command when the user selects this item.
SUBMENU=submenu
associates the item with a common submenu. specifies the name of an associated SUBMENU statement, which displays a pmenu entry when the user selects this item.
If no DIALOG=, MENU=, SELECTION=, or SUBMENU= option is specified, then the command or menu-item text string is submitted as a command-line command when the user selects the item.
GRAY
indicates that the item is not an active choice in this window. This option is useful when you want to define standard lists of items for many windows, but not all items are valid in all windows. When this option is set and the user selects the item, no action occurs.
HELP='help-text'
specifies text that is displayed when the user displays the menu item. For example, if you use a mouse to pull down a menu, then position the mouse pointer over the item and the text is displayed.
Restriction:This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored.
Tip:The place where the text is displayed is operating environment-specific.
ID=integer
specifies a value that is used as an identifier for an item in a menu. This identifier is used within a SAS/AF application to selectively activate or deactivate items in a menu or to set the state of an item as a check box or a radio button.
Restrictions:Integers from 0 to 3000 are reserved for operating environment and SAS use.

This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored.

Note:The minimum value allowed is 3001.
Tips:ID= is useful with the WINFO function in SAS Component Language.

You can use the same ID for more than one item.

MNEMONIC=character
underlines the first occurrence of character in the text string that appears on the menu. The character must be in the text string.
The character is typically used in combination with another key, such as ALT. When you use the key sequence, it has the same effect as putting your cursor on the item. But it does not invoke the action that the item controls.
Restriction:This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored.
STATE=CHECK|RADIO
provides the ability to place a check box or a radio button next to an item that has been selected.
Restriction:This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored.
Tip:STATE= is used with the ID= option and the WINFO function in SAS Component Language.

Details

Defining Items on the Menu Bar

You must use ITEM statements to name all the items that appear in a menu bar. You also use the ITEM statement to name the items that appear in any menus. The items that you specify in the ITEM statement can be commands that are issued when the user selects the item, or they can be descriptions of other actions that are performed by associated DIALOG, MENU, SELECTION, or SUBMENU statements.
All ITEM statements for a menu must be placed immediately after the MENU statement and before any DIALOG, SELECTION, SUBMENU, or other MENU statements. In some operating environments, you can insert SEPARATOR statements between ITEM statements to produce lines separating groups of items in a menu. See SEPARATOR Statement for more information.
Note: If you specify a menu bar that is too long for the window, then it might be truncated or wrapped to multiple lines.