1 ZMENU
!
  ZMENU is a utility designed to display a menu from within a command proced-
  ure, to select a menu item based on a user's instructions, and to communi-
  cate the user's selection to the procedure so that it can perform further
  processing based on which item was selected.

  To see an example of ZMENU, execute:

	$ @HERE:ZMENU.TEST

  you may examine the example procedure HERE:ZMENU.TEST and the example menu
  file HERE:ZMENU.MENU.

  ZMENU is called as:

    $ ZMENU [menu_file] [/SYMBOLS] [/POINTER=("text"[,plen])] -

	[/ITEM="char"] [/WIDE] [/NOINTERRUPT] [/DEBUG] [/VERSION]

  If no menu file is specified, SYS$INPUT is assumed.  If no file type is
  specified, .MENU is assumed.

  ZMENU clears the screen, and displays the contents of the specified menu
  file (up to 24 lines).  If the /WIDE qualifier is used, the screen is made
  132 columns wide first.

  Any lines in the menu file beginning with "!" are assumed to be comments
  and are not displayed.

  Occurrences of the ITEM character (default "^") are displayed as blanks.
  A pointer (default "-->") is displayed at the first (upper leftmost) item
  location.  The rightmost character of the pointer is placed over the item
  character.  Items must not be so close to the left margin that the pointer
  will not fit.  You can choose your own item character and/or pointer string.

  If the user enters an ARROW key, the pointer is moved to the next key loca-
  tion in the direction the arrow key specifies.

  When the user enters CTRL/W, the screen is refreshed.

  When the user enters RETURN, SELECT, DO, or ENTER, then DCL Symbol CHOICE is
  set to the number of the item at which the pointer is currently displayed,
  and ZMENU exits.  The items are numbered as follows:  the upper-left-most
  item is numbered 1; the search for the next item goes down that screen col-
  umn, then down the next screen column, etc.  A sample numbering of items
  would be:
			1	 6
			2	 7
			3	5
			4	 8

  If /SYMBOLS is specified, then occurences of DCL Symbol names (in apostro-
  phes) in the menu file are replaced by the current value of the symbols.
  This allows the displayed text to vary based on the state of the command
  procedure.

  If you use the /NOINTERRUPT qualifier, then if the user CONTROL-Ys out of
  ZMENU, CHOICE will be set to 0 and no other effects of the interrupt will
  be visible to the procedure.

  The menu designer may include VTxxx escape sequences within the file to
  control the screen appearance.  If desired, an upside down question mark
  "¿" can be used everywhere an ESCAPE character is needed.  Use of escape
  sequences makes screen layout design harder, since the sequences take up
  columns in the file, but not on the screen.  Escape sequences must not be
  used on lines containing menu items, unless they are after all menu items
  on the line.

  The pointer may be up to 24 characters long.  It may include escape sequen-
  ces; if so, the second value (plen) must be an integer giving the visible
  length of the pointer.

  When no screen I/O is being done, the cursor is left parked near the lower
  right-hand corner of the screen (line 22, col- umn 80 or column 132) where
  it is less conspicuous.  

  If the string "00:00:00" exists in the file, the current time is displayed
  at that location every five seconds (if this string appears more than once
  in the file, only the first occurrence is used).

  If the first non-comment line in the file contains "/" in column 1, it is
  not displayed.  Instead, it is assumed to contain some or all of the qual-
  ifiers allowed on the command line (except /DEBUG and /VERSION).  This line
  is always examined for DCL symbols regardless of whether /SYMBOLS is used
  on the command line.  Values specified on this line override qualifiers on
  the command line.  In many cases it makes more sense to keep these values
  with the menu file.

  If /DEBUG is specified, then the lines are displayed with the item char-
  acter visible (they will disappear when the pointer covers them), and the
  item number being currently pointed to is displayed in the lower right-
  hand corner.

  If the user enters "H" or "h" or "?" or PF2 or F15 (HELP), a HELP display
  appears on the bottom five lines of the screen; it goes away when the user
  enters a blank.

  If ZMENU is called from a non-interactive process, or if the menu contains
  fewer than two selectable items, ZMENU exits with a diagnostic.

  If the /VERSION qualifier is specified, ZMENU displays its current version
  number and creation date, and exits without processing any menu.
!
