Copyright 1993-2016 by Kevin G. Barkes All rights reserved. This article may be duplicated or redistributed provided no alterations of any kind are made to this file. This edition of DCL Dialogue is sponsored by Networking Dynamics, developers and marketers of productivity software for OpenVMS systems. Contact our website www.networkingdynamics.com to download free demos of our software and see how you will save time, money and raise productivity! Be sure to mention DCL Dialogue! DCL DIALOGUE Originally published January, 1993 DCL's Greatest Hits By Kevin G. Barkes A few years ago when my son was reading Boy's Life instead of grabbing my copy of Rolling Stone, I noticed an interesting phenomenon. Upon receipt of the magazine, Doug would immediately turn to the joke page and regale me with the gems located thereon. Frequently, to his consternation, he would discover I already knew the punch lines. That's because I remember reading the same jokes when I subscribed to BL in the 60s. I also noticed, during Doug's MAD Magazine phase, that they recycled material from time to time as well. I really don't like rehashing subjects I've previously discussed in this column. But the readership does churn a bit, and a respectable number of new VMS users pick up this magazine for the first time each month. This point was driven home to me when last week I received three reader inquiries asking about the undocumented DCL CHECKSUM command, and if I new it existed. "Of course I know about it," I harummphed. "It appeared in my column." "When?" one of the callers asked. A quick search through my files noted a reference to CHECKSUM in a fall 1988 column. There was silence on the other end of the phone. "In 1988 I was a sophomore in high school," the somewhat sarcastic voice said. Sigh. Oldtimers, bear with me. Here's a condensed collection of "greatest hits", the most frequently asked questions/ requested code from the past seven years or so. This should cover it until the millenium: + Even if you're not on a cluster, MONITOR CLUSTER will provide a nifty display of your system's cpu, memory, lock and disk load. + A handy procedure that uses the terminal buffer size to toggle between 80 and 132 column mode: $ PTERM = F$GETDVI(F$GETJPI(F$GETJPI("","MASTER_PID"),- "TERMINAL"),"TT_PHYDEVNAM") $ OLD = F$GETDVI(PTERM,"DEVBUFSIZ") $ NEW = 80 $ IF OLD .EQ. 80 THEN NEW = 132 $ IF P1 .NE. 0 THEN NEW = P1 $ SET TERM/WIDTH='NEW' 'PTERM' + Rather than killing off a process that's hogging the system, you can put it in suspended animation. Use SET PROCESS/SUSPEND to put the process to sleep and SET PROCESS/RESUME to restart it when the slow system bellyachers go home. + Nifty code to execute commands on remote notes. The procedure must be present in the user's SYS$LOGIN directory on all nodes, and it assumes that proxy logins have been set up so that a username and password need not be specified in the procedure: $ IF F$MODE() .EQS. "NETWORK" THEN GOTO REMOTE $ LOCAL: OPEN/READ/WRITE RMT$NET 'P1'"TASK=RMTCMD" $ WRITE RMT$NET P2 $ RDREPLY: READ/END_OF_FILE=CLSRMT RMT$NET RESULTS $ WRITE SYS$OUTPUT RESULTS $ GOTO RDREPLY $ REMOTE: OPEN/READ/WRITE RMT$NET SYS$NET $ READ/END_OF_FILE=NOCMD RMT$NET COMMAND $ IF COMMAND .EQS. "" THEN GOTO NOCMD $ DEFINE/USER SYS$OUTPUT RMT$NET $ 'COMMAND' $ GOTO CLSRMT $ NOCMD: WRITE RMS$NET "NO COMMAND RECEIVED - RMTCMD" $ CLSRMT: CLOSE RMT$NET $ EXIT + If you're using DECwindows, change the value on the line sm.pointer_shape: to -142 in your DECW$SM_GENERAL.DAT file. This transforms the pointer to an outline of the Starship Enterprise. + File specification shorthand: you can access prior versions of files by specifying a version offset instead of an explicit version number. For example, EDIT FILE.DAT;-1 will edit the file one version number lower than the highest available version number. The version number ;0 specifies the highest version number of a file and ;-0 specifies the lowest. For that matter, the ;0 itself is optional. So, if you wanted to delete the latest version of a file, keeping prior versions intact, and you didn't know the actual version number, you could enter DELETE FILE.DAT; or DELETE FILE.DAT. + You can replace DEC's name on the flag page of your printouts by adding the following line to your system startup procedure: $ DEFINE/SYSTEM/EXEC PSM$ANNOUNCE "Replacement text" + And, finally, CHECKSUM. CHECKSUM (filename) calculates the checksum of a file and places it in the symbol CHECKSUM$CHECKSUM. Great for home-grown security applications. CHECKSUM/IMAGE returns additional information about .EXE files. ********************* Mass vs. Energy After two months of sitting under my desk, I finally installed Pathworks on my VAXstation and PC. I put it off because, frankly, I was spooked by the 20 or so manuals which came with the software. Barkes' Rule: The degree of software installation difficulty is directly proportional to the volume of the documentation, or, watch your butt when the doc weighs more than the iron. Still, it went in rather easily and even works quite well with Windows 3.1. DEC could do us all a favor, though, and give us an eight page booklet with "bare bones" .COM and .BAT files to put up a "minimum" installation on which to build more elaborate configurations. One side bonus: STARTNET.BAT is now my teaching example for spaghetti code. Strange arrivals of the month: Chris Chiesa's sixel graphics Jolt Cola logo and an anonymously submitted .GIF file showing the bridge of the Enterprise with a VAX stuck in a corner. I guess cabin fever knows no season... ********************** Kevin G. Barkes is an independent consultant who wrote this column prior to the presidential election but couldn't pass up the one-liner: "Saying (candidate of your choice) is our best hope is like saying Moe was the smart Stooge." Kevin lurks on comp.os.vms and can be reached at kgbarkes@gmail.com