Digital Systems Journal Submissions (see AAREADME.TXT for more info) The older material and also the most recent (since Fall '93 tapes) is here. Some intermediate material exists on older VMS SIG tapes and is not here however. INDEX The code included is described below, categorized according to the issue of Digital Systems Journal in which the accompanying article appeared. May/June 1992 ------------- TRACE.VAX Matthew Rabuzzi When VMS errors occur, programmers generally ignore them and keep running or print them and halt. Here's a technique that allows you to see your error traceback and keep running too. CONTXT.VAX Eric M. LaFranchi It's tough to get system information on a clusterwide basis because SYS$GETDVI only reports information about devices attached to your local mode. Here's a method for obtaining device information across the cluster. July/August 1992 ---------------- CBUILT.VAX Eric M. LaFranchi Here's how to use VAX C's ability to access macro instructions to increase performance by rewriting some "C" string functions in macro, thus eliminating the calling sequence overhead. WATCH.VAX Alan Cohn This Ada procedure lets you monitor processes to determine what they're doing, what resources they're using, and if their resources should be changed up or down. In addition, it monitors programs to show you what state they're in and what resources are being used. SYSWCH.VAX Curt Snyder This program watches detached processes to see when they're on the road to failure. It uses a data file to decide which processes to watch, the prameters to watch for, who to notify of failure, and how often to examine the system. DAEMONS.VAX Michael M. Frazier ACMS errors are flashed on a users's screen and written to an error log, and then usually forgotten. Here's how you can stay on top of problems encountered in your ACMS application. MOV.VAX Hunter Goatley The MOVS macro copies a given string to a given destination address. The length of the string can be optionally copied to the DESTLEN parameter. PUSHREG and POPREG accept as inputs a list of registers whose contents are pushed onto and popped off of the stack using PUSHL and POPL instructions. DATAC.VAX Dr. C.P.Yu. The article and code illustrate data typing under C for performance and maintenance-free applications. September/October 1992 ---------------------- XTUNE.VAX George P. Moakley This code was written to test window creation/destruction impact. It generates and destroys 20 windows n times. MACRO.VAX Eric M. LaFranchi, Kathleen D. Morse This MACRO-32 routine is used in early versions of VMS to get the process name. COMM.VAX Joseph R. Crum This application requires that small packets of information be communicated to a cluster-available resource using the lock manager. The FORTRAN example in the article show how. OUTPUT.VAX Hunter Goatley This macro will cause a string to be printed to SYS$OUTPUT by storing the string as an ASCID string and generating a CALLS to LIB$PUT_OUTPUT. The ASCID strings are stored in a psect named RO_DEBUG_DATA. DEATH.VAX Bruce Ellis This program displays cpu time since process creation. An added program illustrates tracking the process deletion of a process which we have not created. November/December 1992 ---------------------- NETNFO.DSJ John McMahon This is a tool to help fill DECnet-caused holes. HANDLE.DSJ Steven J. Rosenstein This mechanism reports the error messages and traceback information to the author and/or maintainer of an application. The use of condition handlers is described and illustrated in the article, complete with a piece of code for demonstration. January/February 1993 --------------------- CALRMS.DSJ Hunter Goatley The article examines some macros provided with OpenVMS. The code shows you how to do file I/O from MACRO using RMS. CSPY.DSJ J.Wren Hunt OpenVMS will not allow you to use $SHOW PROCESS/ CONTINUOUS/ID=pid over a different cluster node. This program does. EACH.DSJ Jerrold Leichter, Ph.D. This command file gives you a flexible way of applying one or several commands in succession to a group of files. It can select files based on any of the DIRECTORY command's fairly extensive set of file selection qualifiers, based on whether they contain a particular text string or, ultimately, based on any selection criteria you wish to program. LOADBL.DSJ Brian Schenkenberger The loadable executive image, a feature of OpenVMS introduced with V5, is relatively uncharted territory for many OpenVMS programmers. This article will explore the mechanisms of the loadable image, its role in the executive reorganization, operating system support for loading the image. Through the examples included in this file, the author shows how to write and load a loadable executive image. MNOWAT.DSJ Bruce Ellis These techniques delete processes that are in the RWAST and/or MUTEX wait states and are apparently undeletable. PAGE.DSJ Eric M. LaFranchi, Kathleen D. Morse The article focuses on migration issues dealing with page size dependencies when porting code from OpenVMS VAX to OpenVMS AXP. The programs here provide examples for getting system-specific page size, and showing page size dependence when setting protection. PRCPRV.DSJ Ehud Gavron The article teaches you how to change the privileges for another process. The program then reveals all the current privilege names for the version of OpenVMS under which a process was built. TSR.DSJ Paul Klissner The technique discussed in this article allows a program to be activated even while the user is in the middle of running unrelated software in the same user process. The example program is a Terminate and Stay Resident calendar/clock that can be made to appear on your screen at virtually any time while you're logged in. March/April 1993 ---------------- ALIGN.DSJ Eric M. LaFranchi, Kathleen D. Morse When you migrate your VAX application to an OpenVMS AXP system, you may lose some performance advantage. The alignment of data and the type of data used by the application can affect the size and performance of the application on OpenVMS AXP systems. The program shows aligned and unaligned data in a COMMON block. FID.DSJ George Merriman This sample VAX C program creates, open and deletes a test file by FID using RMS calls. It also uses SYS$GETDVIW to get the physical name of the disk device and LIB$FID_TO_NAME to get the name of the file. This program demonstrates the use of RMS data structures and the special handling required for the disk device name. The logical name FILE_DEV must be defined to point to the disk on which the files are to be created. NAMXAB.DSJ Hunter Goatley This article continues the discussion of calling RMS to perform file I/O from MACRO. Specifically, it looks at the NAM blocks and eXtended Attribute Blocks. The code assists with utilization of the blocks. PASWRD.DSJ Sridhar Seshadri This privileged installed image provides the ability to save and restore a user's password. The article itself focuses on OpenVMS password encryption, UAF-related system services and security implications. TICKLR.DSJ Alan H. Beer This command procedure lets you prepare a tickler-file type reminder to be received in your VMSmail on the desired day. Mail will notify you of your message when you log in. The reminder can be updates until the day it is sent. WSL.DSJ Bruce Ellis The OpenVMS working set list defines the amount of memory that a process can use at any given time. Proper assignment of the working set list sizes can be crucial to system performance, but sizing working set lists has traditionally been done in an arbitrary fashion. The code here presents a way for calculating proper working set sizes. May/June 1993 ------------- FAOMSG.DSJ Hunter Goatley The article and its code describe the $FAO system service and the MESSAGE utility, and illustrate how these methods can be used by programmers using all OpenVMS languages -- not just MACRO-32. LOGNAM.DSJ David N. Greene The article and its code examine the reasons to use logical names as an applicationwide communications technique, as well as alternative techniques for application communications. They also examine the details of using shareable logical name tables and provide some suggestions for their use in large applications. QCLEAN.DSJ J. Wren Hunt QClean allows any user with OPER privilege or delete access to the queue to delete a range of entries from a batch or print queue without deleting the entire queue. Also, it can selectively delete entries for a specified user throughout the queue. By default, it will ask for confirmation before it deletes an entry. SUPUSR.DSJ Russell Salerno This $SHOW USER utility has an additional imagename, forceexit ability and stopid ability, as well as selection criteria. It uses a CLI interface so it can be used from batch. The selection criteria permit mass stop/ID and mass forcex. July/August 1993 ---------------- BUMP.DSJ Horace A. Vallas, Jr. The easily executed mechanism allows system operators or managers to protect selected users' interactive processes from the evil SPIRIT for variable lengths of time. CLUSIZ.DSJ James Lellman This DCL procedure runs on an existing disk without the /IMAGE switch and lets you know the cluster size when you reformat the disk before restoring it. DBOARD.DSJ Jim Gessling This Motif widget implements a general-purpose meter. The example included in the article provides an understanding of the Motif widget set. The program is called "Dash Board" because it uses the analogy of a tachometer to display CPU usage and a gas gauge to display how much free memory is left. IMDTIM.DSJ Jamie Hanrahan, Jerrold Leichter, Ph.D. This user-written system service cancels timer queue entries by changing their due time so that they come out reliably. NDELET.DSJ J. Wren Hunt This MACRO routine demonstrates how to modify OpenVMS process statuses to recover an accidentally deleted process, and lets network-related jobs show up on a DCL $ SHOW SYSTEM/NETWORK. RECAL2.DSJ Hunter Goatley This program, titled DCLPATCH.MAR, reads a DCL image into memory, applies the patches, and creates a new image file. SECURE.DSJ Bruce Ellis This tool helps you to manipulate processes, even when you're executing at high privilege levels, to ensure system security. TEXTIO.DSJ Dan Heller The code illustrates monitoring and modifying text input on the fly in the Motif Text widget. September/October 1993 ---------------------- BUILD.DSJ George Holbert The article provides you with a collection of recommendations and guidelines for improving the traceability and reliability of your build process, while reducing the amount of system resources consumed during compilation and linking. This collection, called the Housekeeping Library Programs, can be adapted to the special needs of your development environment. CBUGS.DSJ Dr. C.P. Yu This code offers some solutions and work-arounds to some of the bugs in DEC C++ V1.0. FILOWN.DSJ Dennis Leiterman This procedure reads the INDEX.SYS and checks ownership of file headers versus the directory where they reside. It is useful when deleting a user account with improperly owned files. SPFFRG.DSJ Lee K. Gleason This SPTFRAG utility provides the statistics needed to manage system page tables in the systemwide portion of OpenVMS address space. It also troubleshoots problems that can be caused by the increased use of this facility. November/December 1993 ---------------------- NT-IO.DSJ Jamie Hanrahan The article compares OpenVMS and Windows NT programs that perform asynchronous I/O, and how many OpenVMS programs need to be changed only slightly for Windows NT. Code includes an OpenVMS program that performs asynchronous I/O, a "Hello, world" program, a program that uses Win32 APIs, but not asynchronous I/O, a program that uses an asynchronous call and a program mimicking OpenVMS I/O completion ASTs under Windows NT. PFAULT.DSJ Charles Kapps The code examines several algorithms from the point of view of minimizing page faults, and suggests how they can be used to avoid excessive page faulting. RPC.DSJ E. Loren Buhle, Ph.D. This example code examines a methodology for writing a program in a distributed computing environment, concentrating on platform-independent Remote Procedure Calls using Sun's Open Network Computing. XQPLCK.DSJ Brian Schenkenberger The article explores the file system's use of the lock manager in a VMScluster. The code examples have been included to illustrate the need for and the use of some of the lock resources required by the XQP. January/February 1994 --------------------- ALPHAB.DSJ James W. Coburn The code includes a link file to link and create UEI on OpenVMS V5.0, plus commands to add or remove the UEI from your system. LIMITR.DSJ Todd Voros Limiter was written to provide a DCL-level interface to OpenVMS locks, to control concurrent user access. Limiter is incorporated into command procedures that run programs whose use is to be limited. LXDRV.DSJ Bob Heath This technique replaces the OpenVMS terminal class driver with a user-written terminal class driver on a per-port basis. A configuration program and simple terminal driver are presented along with instructions for installing and using them on an OpenVMS system. PHONE.DSJ Eric Osbourne This code demonstrates a simple program that shows how you can add disk space to DEC OSF/1 to yield more than 100 million records. THREAD.DSJ Jamie Hanrahan The code are several small programs to illustrate the use of NT's threads. XCOPY.DSJ Nick Brown XCOPY copies files from one OpenVMS system to another, one or more blocks at a time. After each group of blocks is transferred, it checkpoints the current file location into its DCL environment before proceeding. If the DECnet link fails, the XCOPY process can be restarted from the block that failed. XDISKM.DSJ Antonino N. Mione The article discusses the advantages and disadvantages of UIL. The code presents some ways to overcome the disadvantages. March/April 1994 ---------------- QRDRVR.DSJ Glenn C. Everhart, Ph.D. The code illustrates how you can steal Io from OpenVMS, and speculates on a way to allow multiple thefts. RAD50.DSJ Steven B. Lionel The article describes the differences found when porting a FORTRAN application from OpenVMS VAX to OpenVMS AXP. These routines can be used to refer to the IRAD50, RAD50 and R50ASC routines. Radix-50 constants can generally be replaced with appropriate values of octal constants. RECLOCK.DSJ Chuck Abraham This procedure offers a way to identify owners of locked records so that the records can be unlocked. It was designed for RMS files on a VAX system. STORAJ.DSJ Rex Jaeschke The code helps you to declare public and private data and functions, and to make data temporary or permanent. SWITCH.DSJ Antonino N. Mione The article examines Xlib and the X Toolkit. The example application generates a table of sine, cosine, and tangent values. W32API.DSJ Jamie Hanrahan The code assists the user in communicating between threads when the threads are running in different processes and perhaps even on different systems.