General Research Corporation Scientific Computer Network P.O. Box 6770 5383 Hollister Avenue Santa Barbara, CA 93160-6770 (805)964-7724 (805)967-7094 [fax] The contributing authors are: David W. Deley [.DAVID...] Eric Andresen [.ERIC...] Greg Janée [.GREG...] Claude Barbe [.BARBE...] (Schlumberger) [.GRC]-----------[.BARBE]---------[.BOOKREADER] |--[.DAVID]---------[.AUTOLOGIN] | |--[.CHKEXPR] | |--[.CONTROLLER] | |--[.DEALLOC] | |--[.DISKTOTAL] | |--[.DOC] | |--[.EDX] | |--[.FINDDIR] | |--[.FRAG] | |--[.MONITOR] | |--[.OPTIMIZE] | |--[.PRIMES] | |--[.PROSE] | |--[.RANDOM] | |--[.RMSDOC] | |--[.SETPROCNAME] | |--[.SHODIR] | |--[.SMGVT220FIX] | |--[.SRCHQUE] | |--[.TERMINATOR] | |--[.WRAPLINES] | +--[.ZEROACC] |--[.ERIC]----------[.GREP] | +--[.SWING] +--[.GREG]----------[.CALC2] =============================================================================== [.BARBE.BOOKREADER] BOOKREADER_TO_ASCII reads a BOOKREADER file (such as one of the *.DECW$BOOK files on the VMS documentation CDs) and extracts the text, tables, and examples into an ASCII text file. [Designed and coded by Claude Barbe - Schlumberger - SDR Ridgefield, CT, USA 12-Jan-1990 (barbe@sdr.slb.com) (Internet).] ------------------------------------------------------------------------------- [.DAVID.AUTOLOGIN] An example program which causes a terminal to be logged in automatically as if a user had entered their username and password at the terminal. The terminal "jumps to life" by itself. ------------------------------------------------------------------------------- [.DAVID.CHKEXPR] CHKEXPR is a program which will warn a user if his account is about to expire. If a user's account is about to expire, the program will print a warning message, otherwise the program prints nothing. If included as a part of the system wide login procedure, this program will warn a user that his account is about to expire the same way VMS warns a user if his password is about to expire. ------------------------------------------------------------------------------- [.DAVID.CONTROLLER] This is an example .COM file of how to get a batch job which may take more than a day to complete to run at night and suspend itself during the day. ------------------------------------------------------------------------------- [.DAVID.DEALLOC] An example program which queues an AST to a target process causing the target process to deallocate a device it has allocated. ------------------------------------------------------------------------------- [.DAVID.DISKTOTAL] Handy when a disk gets full. Makes a list of all the directories and the total number of files in each directory. Scan the list with an editor and find the offensive directories which have humongous blocks. Helps you quickly find where all the blocks have gone. Run it and give it the name of the disk. ------------------------------------------------------------------------------- [.DAVID.DOC] Miscellaneous possibly useful documentation. ANALYZE_CRASH.DOC An example analysis of a VAX/VMS system crash using the Symbolic Dump Analyzer (SDA). ANALYZE_PROCESS.DOC An example of how to analyze any process on a running system using the Symbolic Dump Analyzer. DCL_TO_SYS.DOC It is not always necessary to spawn a subprocess to execute a DCL command from within a program. Often the same result can be achieved much more quickly by using the appropriate system service routines. DCL_TO_SYS.DOC matches DCL commands with the equivalent VMS operating system provided routines. FORTRAN_ARRAY_ADDRESSING.DOC The correct way to traverse multi-dimensional arrays in FORTRAN. ITEMLIST.DOC Explanation of using itemlists in system service calls. MODEM.PORTS Useful information on interfacing modems to VAX computer ports. PAGE_FAULTS_AND_ARRAY_ADDRESSING.DOC Understanding what a page fault is can sometimes be crucial to writing efficient code. An overview of virtual memory, page faults, and array addressing in code is presented. XMODEM.CRC Article describing how Cyclic Redundancy Codes work. ------------------------------------------------------------------------------- [.DAVID.EDX] The most recent updated version of the EDX editor (version 9.0) Now Alpha AXP/OpenVMS compatible! EDX is a powerful EDT-style TPU based text editor which supports all the major functions of the EDT editor plus many other advanced features not available in the EDT editor or the newer EVE editor. It is intended for users familiar with the EDT editor who would like to switch to a faster, more powerful editor without having to learn a new editor all over again. EDX also supports a WPS-style keypad mode for users who prefer the WPS-style keypad. Following are some of the advanced features of the EDX editor which are not available in EDT or EVE: · Built in spelling checker with 90,000 word dictionary. Spell check a buffer, range, word, or display the dictionary and browse. Includes guessing algorithms and personal supplemental dictionary support. · Edit modules within VMS text libraries. (Fixed). · Obtain a directory listing Include optional /SIZE and /DATE qualifiers. Read in a selected file from the directory listing, delete a selected file, or lock a selected file. · Wildcard search and replace mode, with optional string to exclude as a match, case sensitive or insensitive. · List all lines containing a specified string or wildcard pattern along with the corresponding line number. (The EDT 'TYPE ALL' command) · Search for and highlight matching parenthesis. · Lock files, preventing others from editing them while you do. · Sort a buffer, range, or columnar range. · Columnar cut and paste in insert or overstrike mode. · Translate a buffer from EBCDIC to ASCII, and vice versa. · Compare two buffers line by line. · Translate DCL symbols and logical names. · Create DCL symbols and logical names. Note that all of the above features are performed within the editor without spawning a subprocess. EDX is built on the VAX Text Processing Utility (VAXTPU). Users familiar with VAXTPU can dynamically extend the editor's abilities by adding new functions which perform complex tasks. EDX makes this job easier by defining over 50 general purpose functions not available in VAXTPU itself. ------------------------------------------------------------------------------- [.DAVID.FINDDIR] Handy when you don't know which disk somebody's directory is on. Give it the top level directory name and it searches all the disks and tells you which ones the directory exists on and what files are in that directory. ------------------------------------------------------------------------------- [.DAVID.FRAG] FRAGMENT and DEFRAG are programs which assist in transferring very large files over flaky telephone lines. The idea is to create a backup save set of the files you want to transfer, run FRAGMENT to break the big backup save set file into many little files, transfer all the little files using kermit set to FILE TYPE FIXED with a wildcard filename, run DEFRAG to reconstruct the backup save set file from all the little files, and recover all the files you wanted to transfer from the backup save set. This way if the phone line flakes out during one of the file transfers, you haven't lost everything you've achieved up to that point. ------------------------------------------------------------------------------- [.DAVID.MONITOR] Plots a histogram of CPU utilization and compute queue length throughout the day. This gives a general idea of how heavily utilized the computer is and when peek usage times are. Takes as input the record file generated by the VMS MONITOR utility. A similar program plots a histogram of disk I/O queue length throughout the day. This can help determine if disk I/O bottlenecks are occurring and when. ------------------------------------------------------------------------------- [.DAVID.OPTIMIZE] Given a scalar function F, which is a function of several scalar variables {x(1),x(2),...,x(n)}, find the values of {x(1),x(2),...,x(n)} which MINIMIZE the value of function F. File OPTI2.FOR provides a choice of the Conjugate Direction Method of Fletcher and Reeves (CDM), or POWELL's method. ------------------------------------------------------------------------------- [.DAVID.PRIMES] Routines for generating prime numbers and for finding the prime factors of a given number. ------------------------------------------------------------------------------- [.DAVID.PROSE] This is a small collection of a few fun things to read. DELEY_TOURS.DOC This is a descriptive picture tour of Santa Barbara, California, originally written about 10 years ago. Presented here purely for your enjoyment. Sorry I can't include the pictures or map here. It's still a nice tour to read. GUARANTEE.DOC Our own personal guarantee of satisfaction we've always had. MONKEY.DOC A little monkey business, and a problem for you mathematicians. STORY.DOC A brief story to tell your children at bedtime. ------------------------------------------------------------------------------- [.DAVID.RANDOM] A paper on computer random number generators, with analysis of several commonly found random number generators including MTH$RANDOM (used by VAX FORTRAN and BASIC) and the standard ANSI C rand() function. Anyone using random number generators will find the research done here most interesting and enlightening. Also contains a number of paradoxes in probability to thoroughly amuse and confuse you. ------------------------------------------------------------------------------- [.DAVID.RMSDOC] Explanation of all the RMS internal file organizations. ------------------------------------------------------------------------------- [.DAVID.SETPROCNAME] SETPROCNAME is an executable image that will set your process to a specified name, and make the name unique by appending a 2 or 3 etc. as needed. You may also specify what character (or characters) you want between the name you specify and the number 2,3, or whatever. ------------------------------------------------------------------------------- [.DAVID.SHODIR] SHODIR.FOR is a FORTRAN example subroutine which will display a directory listing of a specified directory the same as the DCL DIRECTORY command does. It can also optionally display a /SIZE and /DATE listing. This subroutine may be placed within a larger user program to allow the user program to quickly display directory listings without spawning a subprocess. ------------------------------------------------------------------------------- [.DAVID.SMGVT220FIX] This explains how to get around the "}z" glitches which sometimes show up on non-DIGITAL brand VT200 terminals. True DIGITAL VT200 terminals accept a few extra escape sequences which show up as "}z" glitches on other VT200 terminals. The fix is to tell SMG that we're a VT100. If we're a VT200 terminal we switch to a VT100 terminal, initialize SMG, and switch back to a VT200 terminal. This switch is sandwiched around the call to SMG$CREATE_VIRTUAL_KEYBOARD (for technical reasons.) An example is illustrated. ------------------------------------------------------------------------------- [.DAVID.SRCHQUE] SRCHQUE is a program which searches a specified batch queue for a specified job name. If it finds the job in the specified queue it returns with a status of success. If it does not find the job in the specified queue it returns with a warning status. This program is handy if you wish to submit a job only if the job does not already exist in the queue. Jobs retained in the queue on error are not counted. ------------------------------------------------------------------------------- [.DAVID.TERMINATOR] TERMINATOR is "Yet Another Idle Terminal Killer" program. The only difference is this one is ours. Read the AAAREADME.DOC file for more information. ------------------------------------------------------------------------------- [.DAVID.WRAPLINES] WRAPLINES is a program which reads ascii text files containing lines up to 2000 characters long, and breaks up lines longer than the value of WRAP into shorter pieces. It creates an output file identical to the input file except that lines longer than the WRAP parameter are "wrapped" around to the next line. This program makes it possible to edit files containing lines longer than 255 characters, which is the maximum EDT can handle. ------------------------------------------------------------------------------- [.DAVID.ZEROACC] We like to give our users a substantial discount for using the computers during non prime time hours. Unfortunately the VMS accounting facility does not provide a convenient way of doing this. It only records the time a user logged in and what his total usage was. It doesn't say what his usage was during a particular rate period. If a user logged in during one rate period, and then stayed logged in after the rates changed, we had no way of determining how much usage the user had acquired up to that point. What we needed was a way to effectively logout a user when the rates changed and log him back in again under the new rates, and thus was born this program. ZEROACC writes an accounting record for each process on the system and resets the accounting data fields of each process back to zero. From an accounting viewpoint it appears as if the user logged out and then logged back in again. The user himself is left undisturbed unaware that anything has happened. Any program he was running at the time continues to run. =============================================================================== [.ERIC.GREP] This is a VMS version of the UNIX GREP tool. It has been written to behave just like the SEARCH command - output, qualifiers and parameters are similar - but is able to search for patterns. It is a complete tool and has a command language definition and online help. It is a nice addition to VMS. ------------------------------------------------------------------------------- [.ERIC.SWING] SWING is an interactive directory tree editor. It displays the current directory structure on the screen and allows the user to SET DEFAULT graphically by traveling through the tree. SWING can add, rename and move directory trees and it can delete directory trees (visually doing what the DELTREE type command procedures do). SWING also creates hardcopy listings of a directory structure. See it to believe it! =============================================================================== [GREG.CALC2] CALC2 is an emulation of a Hewlett-Packard reverse polish calculator for video terminals. =============================================================================== (A few other programs we've submitted to Decus in the past:) BANNER BANNER is a security banner and page marking program. It creates leading and trailing flag pages as well as top and bottom page marks for security marking your line printer output. If you are tired of hand stamping documents - this is the answer. BANNER is a complete tool with a command language definition, help file and manual. [VAX86C] EXCEPTION_INTERCEPTOR Allows programs written in ADA to handle exceptions as they are intended to be handled under VMS using the VMS Condition Handling Facility. Exceptions are part of the ADA language, but ADA does not have nearly the power of VMS's Condition Handling Facility. [VAX90B1] HYPHENATION This is subroutine Hyphenate, an implementation of the TeX82 hyphenation algorithm. Sources and objects are in this directory. [VAX88B2] MODOBJ MODOBJ is a program which modifies object files (modules). Reasons for wanting to modify object files, the exact modifications performed, and usage instructions can all be found in the source file MODOBJ.C. [VAX87C] TIMER TIMER.MAR accurately times machine instructions on a VAX 11/780 or equivalent architecture. Instructions can be found in the source. [VAX87C] WEAVE Weave is a program for reorganizing and duplicating text within files. It was inspired by WEB, a Pascal-based language designed by Knuth. [VAX88B2]