Article 2950 of vmsnet.sources.d: Path: nntpd.lkg.dec.com!pa.dec.com!decwrl!genmagic!sgigate.sgi.com!swrinde!sdd.hp.com!night.primate.wisc.edu!nntp.msstate.edu!nntp.memphis.edu!flowers From: flowers@cc.memphis.edu (Harry Flowers) Newsgroups: vmsnet.sources.d Subject: DCL MENU V4.4 is now available Message-ID: <1995Aug2.173224.55866@msuvx2.memphis.edu> Date: 2 Aug 95 17:32:24 -0500 Organization: The University of Memphis Lines: 108 MENU.COM on narnia.memphis.edu has been updated to V4.4. Since I haven't been posting all the changes, here's the change log since V4.0: 4.0 07/13/94 Added hidden options and ability to customize options and displays by individual user. 4.1 07/14/94 Added "~" option to view all options, including hidden ones, and added control "profiles" (see features). 4.2 11/11/94 Added single-column menu displays. See directions for menu titles for setup details (use "|" as the first character of the title). All menu titles are now centered as well. 4.3 06/14/95 If PSM$ANNOUNCE isn't defined, then construct a header from system info; don't use SYS$ANNOUNCE as a fallback. 4.4 08/02/95 Added option logging; if a file of the same name but extension ".MENULOG" exists in the same location as the menu file, all selections will be logged to that file. Make sure the file is writable by any users using the menu. The log line includes the time, process id, username, and option selected; for arbitrary DCL commands, followed by the command will be logged. It's available via WWW "http://narnia.memphis.edu/anon/", anonymous FTP, and gopher in the [ANONYMOUS.COM] directory. For those unfamiliar with MENU, here are the features: o One-file menu - this command file is the only one which is needed. It is very easy to modify the menu options for anyone with a basic knowledge of DCL command procedures. There is a small amount of error checking for consistent menu setup (for descriptions). o Arbitrary DCL commands - any non-captive user may issue arbitrary DCL commands from the command line. This can happen in one of two ways: 1) Precede the command by an "$", or 2) Enter an "$" and be prompted for the DCL command. One advantage of method #2 is that INQUIRE is used instead of READ, so the full command recall handling is available. o Automatic logout - users are logged out after 45 minutes of inactivity. The READ used has a 3 minute timeout. When the timeout occurs, the time on the menu is updated as well as the timeout counter. After 15 timeouts (45 minutes), the process is logged out unless it has a subprocess which might be active. NOTE: Broadcast messages seem to re-start the time for the read timeout. This extends the time a process waits before automatically logging out. o Captive account handling - captive accounts are handled specially. Captive accounts are not allowed to issue arbitrary DCL commands with the "$" on the command line. A captive account is one authorized with the Captive flag set in the user authorization file (with AUTHORIZE). It is assumed that Ctrl/Y has been disabled for captive accounts, and that they have not been allowed to get to a VMS prompt. Normally, the menu would be called directly from the account's login command procedure. o Error message display - if a fatal error occurs during the execution of an option, the menu waits for a carriage return allowing the user to see the error. It is also displayed below the input line on the menu screen. o Scrolling region for broadcast messages - while the menu is on the screen, the scrolling region is re-defined to be after the last line of options. This causes broadcast messages to scroll in this window and not mess up the menu display. o "Auto" customized - the second line of the display is whatever the system manager has defined for PSM$ANNOUNCE, which is used by the print symbiont on printouts. If PSM$ANNOUNCE is not defined, then a header is made up. PSM$ANNOUNCE will generally have the name of the installation, and in a VAXcluster environment, may have the system node name as well. This can easily be changed by defining a process logical PSM$ANNOUNCE (which will not effect the system definition) if you are unhappy with the contents of PSM$ANNOUNCE. For example: $ DEFINE PSM$ANNOUNCE "My Own Computer" o Option passing - up to eight (8) options can be passed to the menu on the command line. They will execute one after the other. Note that passing "CAPTIVE" as P1 is obsolete, and all parameters will be ignored. Multiple options separated by spaces may also be specified once inside the menu as well. o Sub-menus - up to 256 different menu screens are possible from within the same menu (but not really feasible). The main menu (level 0) and up to 255 sub-menus may be defined. This allows multiple menus without having to chain to another command file. o Customizable - the same menu command procedure may be customized for individual users by replacing any of the setup items before END_MENU with lines in a command file in the same directory and with the same name but a file type of ".CONTROL". Just place the lines in the file, make sure it's readable, and end the lines with "!username!", where username is the VMS username for which you wish to override the symbol definitions. The leading "$" normally needed in command files is optional for this file, as matches will be read in and the statements executed within this command procedure. The most common usage of this is to individualize MENU_OPTIONS (and MENU_OPTIONS_*) definitions to restrict options available to individual users. Here's an example: MENU_OPTIONS = "N/ /F/ /P/ /X/ /L" !USER01!USER03! MENU_OPTIONS = "N/ /F/ /P/ /X/ /L" !USER02! MENU_OPTIONS_1 = "1/M/P/ /2/N/G/L/A/ /X/Z" !USER01! HEADING_DELIMITER = "#" !USER03! OPT_N = "_Networking Menu" !USER02! Users whose menu options do not include a certain option will not be able to execute that option. All three users would just have options N, F, P, X, and L in their first menu. USER01 also has his level 1 submenu modified. USER03 is using a different heading delimiter. Option "N" for USER02 is hidden on his menu (it's available, but not shown), though it would be better to have a MENU_OPTIONS for this user that moved option "N" to the end, so the spacing is better. Also, you may define a symbol "menu file name"_CONTROL which will be used instead of the user's username in the above substitutions. For example, if this was CBI_MENU.COM, then CBI_MENU.CONTROL would be the control file and CBI_MENU_CONTROL would be the symbol that could specify a user profile to override username. -- Harry Flowers Internet:FLOWERS@CC.MEMPHIS.EDU or FLOWERS@NARNIA.MEMPHIS.EDU The University of Memphis, 112 Administration Bldg., Memphis, TN 38152 (USA)