RD Controls Software Release Note 39.0<P> <b> The EPICURE Menu Shell Process</b>

RD Controls Software Release Note 39.0

The EPICURE Menu Shell Process

R. West

May 24, 1988


The menu process provides a menu interface for the selection and execution of application programs. This process interacts with several different hardware terminals: (1) a text-only terminal such as a VT220, (2) a graphics terminal such as a VT240/330/340, or (3) a workstation such as a VAXstation.

The display for a menu consists of three sections: title line, item list, and message response. A menu list may contain a maximum of 999 entries. However, a display screen can only contain a maximum of sixty entries arranged in 3 columns of 20 lines each. The keys NEXT SCREEN and PREV SCREEN scroll the display forward and backward, respectively, through the menu list. A single menu usually consists of four or fewer display screens.

An individual at a terminal uses the arrow keys to move the cursor to the desired menu entry and then types the RETURN or ENTER key to select that entry. The menu item identified by the cursor is always displayed in reverse video. If the selected menu entry contains the name of an application program, execution of that program is initiated. Selection of an entry which is blank or is a comment results in no action.

There is potentially an unlimited number of menus. However, the number of menus actually implemented will probably be fewer than 10. To get to a different menu, the user types the name of the menu, followed by RETURN or ENTER. The first screen of the named menu is then displayed. To immediately select an entry on a menu which is not currently displayed, the user types the name of the menu and the number of the desired entry. It is also possible to select an entry from the current menu by typing its number instead of making the selection by moving the cursor. If the currently displayed menu screen does not contain the selected menu entry, the corresponding menu screen is accessed and displayed.

On a workstation, several applications may simultaneously be executed. Depending upon their physical memory requirements, the maximum number of simultaneous applications is usually about six. To free some space on the screen of the workstation, the menu display window may be shrunk to an icon after starting the desired application program(s).

A menu list entry contains several fields of information. Only one, the title of the application program, is displayed by the menu process. The menu entry also contains the full name of the executable image, various status flags, and a set of parameters. The set of parameters in a menu entry includes DCL commands for establishing the VMS environment prior to initiating execution of the application program. The contents of any entry or field of a menu may be modified by using any text editor to change the corresponding disk file.

At the highest level, the selection and execution of application programs is controlled by a loop in a DCL command procedure. The DCL procedure initiates the menu process via a RUN command. By interacting with the menu process, the user selects an application program. Based upon the user's selection, the menu process defines various logical names and then passes control to a spawned DCL procedure which uses the defined logical names to execute the selected application program. When the application exits, the subprocess returns control to the menu process to enable the user to make another selection. On a workstation, the menu process continues to execute in parallel with the subprocess, enabling the user have multiple selections simultaneously executing.

Keyboard Usage

The keyboard on a VT220-type terminal consists of several parts: main keypad, editing keypad, auxiliary keypad, and top-row function keys. All keys with the exception of F7 through F9 and F16 (DO) of the top-row function keys are reserved for use by the control system. User programs may assign application-specific meanings to the striking of those top-row function keys not allocated for system use. Striking the RETURN key on the main key pad or the ENTER key on the auxiliary keypad produces the same result. Either one terminates the entry of a sequence of keys from the terminal. One of several standard keys may be used to terminate an operation within an application program:

  1. control-C (or F6) stops an operation in progress and returns to the application's prompt

  2. control-Z (or F10) exits the application and returns to the initiating menu

  3. control-Y aborts the application and returns to the default menu

Control System Service Requests

The HELP key on the editing keypad is used to display a window of help information. Keys PF1 through PF4 on the auxiliary keypad and F17 through F20 of the top-row function keys are used to initiate or ``introduce'' a request for a system service. The request must be terminated either by ENTER or RETURN.

  1. key PF1 - process selection or menu short path

    [PF1] menu-name entry-number ENTER
    introduces a system request to process a menu selection. Entering only the menu-name is a request to display that menu. Entering only the entry-number is a request to initiate execution of the corresponding application in the currently displayed menu. Either the main keypad or the auxiliary keypad may be used to enter numeric input. Entering both the menu-name and the entry-number is a request to execute the application program at the specified entry in the specified menu. Specifying a menu entry which does not reference an application program results in displaying the associated menu screen. Typing the key PF1 is optional.

    When a menu is displayed on the screen, the arrow keys on the editing keypad may be used to move the screen cursor to the desired menu entry. Selection of the item at the cursor is then indicated by typing the RETURN or ENTER key. The keys PREV SCREEN and NEXT SCREEN on the editing keypad scroll the menu display to the previous screen or to the next screen of the menu, respectively.

  2. key PF2 - item selection

    [PF2] entry-number ENTER
    introduces a system request to select the designated entry from the currently displayed menu. Typing the key PF2 is optional

  3. key PF4 introduces a system request to cancel any unterminated keypad service request. This is basically a cancel for the request currently being entered and produces the same result as entering a control-U to cancel the request. This key is processed immediately, i.e., the ENTER terminator is not required.

  4. key PF3 and keys F17 through F20 are unassigned

Menu File

The disk files which contain the menu information are simply ASCII text files which may be modified by any text editor. A menu file may contain from 1 to 999 menu entries, with each entry having the following format:




an integer from 0 to 999, inclusive. Zero assigns the next higher integer to this entry. An entry is discarded if it has the same number as a previous entry.

a short text string which is the title of the application. The leftmost 22 characters of this field are displayed. If no additional fields are specified, this menu entry is considered to be a comment or delimiter entry.

a command line to be executed by VMS. Usually, this will be a RUN command specifying the filename of the application's executable image, though it may just as easily be a request to execute a command file.

a command line to be executed by VMS to establish initial conditions and parameter values prior to executing the application.

Successive menu entries in the disk file may be separated by additional lines to improve readability. The menu process displays a blank title field if there is no corresponding entry in the disk file. If a menu entry is a comment, the program does not display the number of the entry.

The menu process is accessible via the VAX account EPICURE_DEMO with the menu files and all the application programs residing in the area associated with the managing account EPDEMOMGR. The default file used by the menu process is defined by the logical DEFAULT_FILE, which initially is set to DEFAULT.MNU. The default extension for a menu file is MNU.

Security, Privacy, Legal