submitted by: Robert A. Harris MD-115 Leeds & Northrup Co. Dickerson Road North Wales, Pa. 19454 (215)-643-2000 (x2380) This directory tree contains programs and command procedures developed at L&N which we find useful. This software is furnished for free and may be used and copied as desired. This software or any other copies thereof may be provided or otherwise made available to any other person. No title to and ownership of the software is hereby transferred or allowed. This software may not be sold for profit. The information in this software is subject to change without notice and should not be construed as a commitment by Leeds & Northrup Co. to supply support. Leeds & Northrup assumes no responsibility for the use or reliability of this software on any equipment whatsoever. This software is also not guaranteed to work. After all this is +-----------------+ | FREEBE SOFTWARE | +-----------------+ Each of the subdirectories supplied contains its own AAAREADME.1ST file explaining the files contained within and how to installed them for use. ---- ---- ---- ---- Many of the command procedures and programs supplied from L&N reference the logical name SYS$COM: where we store common programs, command procedures, and data files. You may either define this logical name to point to the directory where you keep your common files (and have stored the files needed by the L&N procedures), or you can modify the L&N files to reference your common storage directory. ---- ---- ---- ---- The one command procedure used frequently by other command procedures is Page 2 UNIQUE.COM This command procedure will obtain a unique file name which can be used by other procedures for the creation of temparary files. This command procedure is stored in the subdirectory [...LN.UNIQUE] and should be installed in the SYS$COM: directory before trying to use any of the other command procedures supplied. 1. [...LN.CALENDAR] This directory contains a Snoopy Calendar program. It generates a 2 page per month calendar. The first page is a picture and the second page is a month of the year. The data file contains 14 pictures so that you can run a calendar from December of the ending year, 12 months of the new year, and January of the following year. 2. [...LN.COM] This directory contains many useful command procedures in use at L&N. a) EDTSEARCH.COM This is command procedure to search a wildcarded/list of files for the specified character string. When a file is found that contains the specified character string, EDT is invoked to allow the user to make editing changes to the file. This is extreamly useful when the changes necessary to a large group of files are more complex than a simple search and replace can perform, yet you don't know exactly which files require the necessary changes. b) HOME.COM This is a command procdure which will return a user to his login directory (Main directory), optionally a subdirectory attached to the main directory may be specified. With GETUAF.EXE properly installed it may also be used to find another users Home directory. c) EDT.COM This is a command procedure to invoke EDT and remember the name of the last file edited. Makes jumping in and out of a file during development much easier. d) UIC.COM This is a command procedure to change the UIC of the current user to whatever is specified, or if nothing is specified, change it to be the same as the current default directory's UIC (including rooted directories like SYS$MANAGER:). Privilege is required. Page 3 e) SETTIMER.COM & DISPTIMER.COM These 2 command procedures are used to obtain performance information about programs or command procedures. SETTIMER.COM invoked just before the program or procedure to be studied is executed and records the processes current CPU time usage, page faults, direct I/O, and buffered I/O. DISPTIMER.COM is then called after the study target has completed so that the amount of CPU time, number of page faults, number of direct I/O's, and number of buffered I/O's the target used may be calculated and displayed. 3. [...LN.DATES] This directory contains some simple routines for dealing with dates. a) DAY.FOR This is a program to calculate what day of the week its for either the current date or for a user specified date. b) HOLIDAY.COM This is a procedure to compare the current date or a specified date against a list of holidays and return a status value indicating if the date is a holiday. c) NUMDATE.COM This is a procedure to take the specified dd-mmm-yyyy date and convert it into a yyyymmdd format sutable for naming dated files with. d) CHARDATE.COM This is a procedure to take NUMDATE.COM yyyymmdd format file names and convert them to dd-mmm-yyyy format. 4. [...LN.DETAB] DETAB is a program that will remove tabs from a file. It only works on standard column of 8 tab stops. However it is a fast implementation. It uses RMS I/O and Macro code to perform fast detabbing. Also see ENTAB. 5. [...LN.DOWN] DOWN is a program to move down the directory tree to the subdirectory specified. If you specify a value between 1 & 8, then DOWN will look on the logical name stack created by UP to determine the name(s) of the subdirectory to go down to (also see UP) Page 4 6. [...LN.ENTAB] ENTAB is a program to replace multiple blanks with tab characters. It only implements standard column of 8 entabbing, however it is a fast implementation. It uses RMS I/O and Macro code to entab the records as fast a possible. Also see DETAB 7. [...LN.GETQUOTA] GETQUOTA.FOR is a program for working with a modified disk quota system. As you may have already discovered, the DEC disk quotas are difficult to live with. Programers almost always use up all the quota they are allowed and then don't have enough to edit a file, compile a program, or any other productive activities. GETQUOTA is a tool that can be used as part of a more flexable quota system. 8. [...LN.GETTERM] GETTERM is a program to obtain information about a terminal (default is the terminal attached to the interactive process) and return this information in a symbol for use by a command procedure. 9. [...LN.GETUAF] The GET User Authorization File data (GETUAF) program allows a privileged VAX/VMS user to obtain from the User Authorization File (UAF) information about another user by specifying either the Username or the user's UIC. This is a copy of the program I submitted to the DECUS Library. 10. [...LN.HLP] This is a useful subroutine for interfacing with the VAX/VMS help facilities. It allows you to supply VAX/VMS style help from within your own programs. The interface it supplies is very easy to use and the program supplies the '?' instant action keyin just like DCL's HELP does. 11. [...LN.IFMOD] The IF MODified (IFMOD) program is a poor mans Module Management System (DEC/MMS). It supplies one of the key features of DEC/MMS, which is the ability to determine if a source file has been modified since the last time it was compilied. IFMOD compares the modification dates of specified files, and depending on whether the results are true or false, it executes a user specified DCL command (the syntax of the IFMOD command is similar to the DCL IF command). The basic idea is: If file A is used to generate file B, then IFMOD can be used to determine if file A has been changed (since the last time file B was created) and re-generate file B if necessary. This is a copy of the program I submitted to the DECUS Library. Page 5 12. [...LN.MAIL] This directory contains some utilities useful for dealing with mail files without calling MAIL. a) MAILDIR.FOR This is a program to generate a directory listing of the user's mail file. Optionally a specified mail file may be examined (assuming you have read privilege to the file). b) MAILNEW.FOR This is a program to read the user's mail file and if there is any new mail in the file to generate a directory listing of the new mail entries. This turns out to be very useful if you are attached via a 300 baud modem and you don't want to read excess mail or mail that could wait until you have access to a faster terminal. 13. [...LN.OFFLOAD] This directory contains a command procedure that will build another command procedrue which will correctly read or write a BACKUP format tape (using the DEC BACKUP program). It is extreamly useful for user's who need to write a BACKUP format tape but don't have much experience dealing with magtapes or the BACKUP program. 14. [...LN.OWNER] This directory contains the OWNER program which if installed with the right privileges (BYPASS) will allow a user to change the ownership of a file stored in one of his directories to match the UIC of the directory it is stored in. There are other programs which do the same thing, HOWEVER, this version DOES NOT use the directory pathname supplied by the user to determine its parent directory. Instead the target file is opened and its back link pointer is used to find its parent directory. This gets around the problem of a user creating a duplicate file name in one of his directories with PIP or his own RMS program and then using OWNER to take over the ownership of someone elses file (such as MAIL.MAI, SYSUAF.DAT, etc...). 15. [...LN.PROMPT] The PROMPT program allows a command procedure to prompt for input from the specified device and have the response returned in a specified local symbol. This program works very much like the INQUIRE command execpt it has some features which makes it ideal for some special applications (such as allowing the system startup command procedure to prompt for options during system boot). These features include a timeout so the prompt will not wait forever (that way startup will continue booting if an operator is not present to answer questions) and the terminal that the prompt Page 6 is sent to & reply taken from may be specified (such as OPA0:). This is a copy of the program I submitted to the DECUS Library. 16. [...LN.REMOTE] REMOTE is a program that will allow you to send commands to a remote node, have them executed, and any output results returned to your SYS$OUTPUT device. When the remote node is specified with a privileged account and password (typically done with logical names so that nothing is typed) you can have REMOTE perform system maintenance functions without having to login to the remote node. It is also extreamly useful when used inside of command procedures. 17. [...LN.RIM] This is a re-worked copy of the RIM documentation found of the '83 SIG tapes. It has had extensive RUNOFF formatting commands inserted, the Index has been expanded, a table of contents has been added, and input syntax information has been added (obtained from the .HLP file). 18. [...LN.RMSIO] This directory contains the example source files and RUNOFF source which went into the March, 1984, PageSwapper article: "RMS I/O for Improved Fortran I/O Performance" By Robert A. Harris The files are included here for anyone that would like to test out how RMS I/O may help performance on their system, but don't want to keyin the code from the written article. 19. [...LN.SU] This directory contains programs for raising and lowering a privileged user's privileges a) SU.FOR This is a program to take a user with SETPRV, grant him all privileges, and change his UIC to [1,4]. The command is call Super User since that is what the user becomes after running this program. The program will save the previous privileges and UIC of the user so he may reduce his privileges back to their previous state later. The program may be called multiple times and the previous states are saved in a stack like maner. This makes it ideal for placing within command procedure that could be run when you have all privilege or when you have no privileges, since you will be returned to you previous state when NU is run. Page 7 b) NU.FOR This is a program to restore the user's privileges and UIC sometime after having run SU 20. [...LN.TIME] The TIME calculator allows a VAX/VMS user to perform Addition, Substraction, Multiplication, Division, and Comparison on time values when using DCL (Digital Command Language interpreter). This ability is very useful when time values have to be calculated for use in various DCL commands (ie. BACKUP, SUBMIT, PRINT, DELETE, DIRECTORY,...). The calculator can deal with Absolute time and Delta time formats as well as handling month and year transistions. It also has the ability to return the results in a DCL symbol which can then be used by the DCL commands which follow. Once the calculator is defined as a DCL foreign command, it is then used just like any other command on the system. The TIME calculator converts all time values to 64 bit binary values which are then used to perform all calculations and comparisons. The system services SYS$BINTIM and SYS$ASCTIM are used for the time conversions. This is a copy of the program I submitted to the DECUS Library. 21. [...LN.TRANSFORM] TRANSFORM is a program that will transform the specified file from one type of carriage control to another. It will also perform bolding, right justification, and top of page margin inserting services as well. 22. [...LN.UNIQUE] UNIQUE.COM is a command procedure that generates a unique file name for use by command procedures that need to create temparary files and can not affort to get in trouble by having 2 users run the same command procedure in the same directory at the same time. If this were to happen and the procedure in question did not use unique temparary file names, then it is very easy for the users to get very screwed up results, by one user's process grabing the other user's temparary file. 23. [...LN.UP] UP is a program to move up the directory tree. If a numeric parameter is specified, then that number of directory levels are moved up until [000000] is reached. As you move up, the subdirectories you left are saved in a logical name stack so that you can move DOWN later without having to specify the subdirectory name (see the DOWN subdirectory for that program). 24. [...LN.USERON] This is a program which will check to see if a specified user is currently logged onto the system. The user must have World privilege or the program must be installed with the Page 8 privilege (the preferred way). 25. [...LN.WHAT] This is my version of SHOW SYSTEM or FINGER. It was written as my introduction into using VAX/VMS systems services. It also has the ability to obtain information about a remote VAX/VMS node (assuming WHAT is installed on the remote). 26. [...LN.WHO] WHO was my very first attempt at writing anything on a VAX. It started out as a command procedure which reformated one of the unsupported programs supplied with the early 2.0 VMS. Next it became a proc which used the VMS program and then call my own program to do the reformatting. Finally I decided to figure out how to use the SYS$GETJPI system service and wrote this version of the program. It supplies the same information as SHOW USERS but in a more desirable format (at least I think so).