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 September, 1993 Faster DCL By Kevin G. Barkes I have to be honest: I've never really cared for DCL debuggers. My curmudgeonly attitude's always been that if a command procedure is so large it requires a debugging tool, then it should be rewritten in a high-level language. It was with a somewhat jaundiced eye, then, that I agreed to take a look at Argent's DCLFast utility. Full Featured. DCLFast's debugger component is well engineered, fast, and looks like the standard three-window VMS debugger interface. It does an admirable job of flagging errors, allows the user to set breakpoints and change the contents of symbols, to step through the procedure a line at a time, and to perform all the other acrobatics expected of a full-blown debugger. But what impressed me most were two other utilities which ship with DCLFast. The first, DCLShow, scans all the disks on your system and provides you with a statistical analysis of all the .COM files on your system (Figure 1). DCLShow's output is also useful in convincing the powers that be that you really need DCL debugging help. Even more impressive is the DCLFast Histogram Facility, which runs and analyzes DCL command procedures and produces a detailed report showing how much time is spent executing each command. I ran a copy of my login.com through the Histogram Facility and discovered an old SET TERMINAL/INQUIRE command which I had put in the file for some long-forgotten reason was responsible for nearly 60% of the execution time of the procedure. Removing that single line of code cut my login time in half. I used the facility on several other frequently-used procedures and was able to spot other glaring inefficiencies that were simple to fix. On a large system, where scores of users repeatedly execute the same procedures, the possible cpu savings available from simple optimiztation are immense. A few other notes... installation via VMSINSTAL is painless and uses only about 200 blocks of disk space. When you get the software installed, you call Argent for an appointment with one of their technical support staff, who walks you through a demo of the software over the phone. Technical support is available 24 hours a day, seven days a week. If you're looking for a way to squeeze the last bit of performance out of your .com files and make the debugging chore less painful, DCLFast is your best bet. ---- Hardware Hint: Normally I don't talk about hardware, but Dave Hirsh of Loveland, Ohio passed along a particularly useful tidbit: "Apple recently dropped the price on its CD300 CD ROM player to $429 list. The street price should go as low as $399. It looks almost exactly like DEC's RRD42 CD ROM drive. It should; they both use the exact same Sony mechanism. Two extras that Apple provides are a 2-door dust trap and a 2-state LED that indicates both power and read status. What's even nicer is that the Apple unit can be used on DEC systems that have an external SCSI port. All that's required is a minor internal modification in the CD player. "Remove the 4 side screws and 2 rear screws and slide the cover off. On the back of the CD drive inside you will see an ID select plug. The first pin is marked either parity or mode. The remaining three pins are labelled 1,2 and 4. These form the SCSI ID and are actually set by the SCSI selector switch on the rear of the case. What you want to do is make sure that the parity/mode jumper position is shorted to itself. What this will do is identify it as an RRD42 to the DEC system. If the jumper is not there it is seen as a Sony 8003CDU, which is what the Macintosh needs to see." Thanks, Dave. Of course, opening the CD case may void your warranty and you may have to hide the li'l sucker when Field Service pokes around. Your mileage may vary, void where prohibited by law, and all other disclaimers apply. --- Never Mind: Well, the votes are in and the decision's been made. The new name for DCL Dialogue is... DCL Dialogue. While I did receive a few good suggestions, the majority of people who voted urged me to keep the current name. "Changing the name of your column is as silly as DEC's changing VMS to OpenVMS," one particularly pithy individual wrote. "I'm used to the name. Changing it for the sake of changing it is downright stupid." My Mama didn't raise no stupid consultants. The name stays. --- KGB Online: It may raise some eyebrows, but my company's Internet domain name is now official: kgbreport.com. Fortunately, it seems a lot less sinister since the demise of the USSR. You can send Internet mail directly to me at kgbarkes@gmail.com. And something I discovered during the Gulf War when I stopped by the local IRS office for some tax forms: never wear a "KGB Consulting" jacket in a U.S. federal office building. Those FBI guys have no sense of humor. --- Direct Connection: A day or so after the June issue of DEC Pro hit the mailbox, my info on how to reach President Clinton via email became obsolete. You can now reach the guys in charge directly via the Internet: president@whitehouse.gov vice.president@whitehouse.gov --- Tagline of the Month: "I am Homer of Borg. Prepare to be assim-- Oooh! Donuts!"" ******************** Kevin G. Barkes is an independent consultant who turns 39 this month and still hasn't decided what he wants to do when he grows up. He lurks on comp.os.vms and can be reached at kgbarkes@gmail.com. ---------------------------------------------------------------------- Figure 1. DCLSHOW V2.1 GLOBAL DCL COMMAND PROCEDURE ANALYZER Page 1 13-JUN-1993 20:44:22.54 _SPOCK$DKA100: Number of command procedures found -----> 1083 [8478 blocks] Command procedures changed: Since yesterday ------> 0 [0 blocks] In the last week -----> 0 [0 blocks] In the last month ----> 12 [111 blocks] In the last 6 months -> 275 [3342 blocks] _SPOCK$DKA200: Number of command procedures found -----> 1436 [6369 blocks] Command procedures changed: Since yesterday ------> 1 [3 blocks] In the last week -----> 6 [18 blocks] In the last month ----> 71 [258 blocks] In the last 6 months -> 583 [2418 blocks] _SPOCK$DKA300: Number of command procedures found -----> 226 [2844 blocks] Command procedures changed: Since yesterday ------> 0 [0 blocks] In the last week -----> 0 [0 blocks] In the last month ----> 0 [0 blocks] In the last 6 months -> 0 [0 blocks] ************************* SYSTEM GRAND TOTALS ***************************** Number of command procedures found -----> 2745 [17691 blocks] Command procedures changed: Since yesterday ------> 1 [3 blocks] In the last week -----> 6 [18 blocks] In the last month ----> 83 [369 blocks] In the last 6 months -> 858 [5760 blocks] ------------------------------------------------------------------------------- FIGURE 2. RUN STATISTICS --- ---------- 1 COMMAND PROCEDURE SUMMARY Main command procedure name : USER2:[BARKES]TESTLOGIN.COM;2 Total number of lines - - ->: 23 Creation date - - - >: 30-MAY-1993 10:22:03.29 Number of executable lines >: 21 Modification date - >: 30-MAY-1993 10:22:03.44 Number of comment lines - ->: 0 Percent command lines: 0.00% Last line executed - - - - >: 21 Last DCL command - ->: $ EXIT Exit status code - - - - - >: X1 Exit status text - ->: %SYSTEM-S-NORMAL, normal successful completion 2 RESOURCE USAGE CPU time consumed - - - - ->: 1.92 secs Procedure start time>: 30-MAY-1993 10:22:16.84 CPU time remaining - - - - >: -unlimited- Procedure end time ->: 30-MAY-1993 10:22:23.84 Maximum memory- - - - - - ->: 6 pages Elapsed time - - - ->: 0 00:00:07.00 DCL lines executed - - - ->: 17 Buffered I/O count ->: 106 Images activated - - - - - >: 3 Direct I/O count - ->: 6 Page faults - - - - - - - ->: 197 Files left open - - >: 0 3 PROCESS DESCRIPTION User name - - - ->: BARKES UIC - - ->: [50,17] Base priority - >: 4 Account name - - >: KGB Process id: 5C Current priority : 4 Job type - - - - >: Interactive CLI Table : SPOCK$DKA100:[SYS0.SYSCOMMON.][SYSLIB]DCLTABLES Current privileges: TMPMBX,NETMBX,READALL Default privileges: TMPMBX,NETMBX,READALL ELAPSED TIME HISTOGRAM ------- ---- --------- line freq time histogram % elapsed time DCL source line ---- ---- -------------------- ---- -------------- ------------------------------------------------------------------------ 1 1 * 1.43 0 00:00:00.10 $ SET NOON 2 1 * 1.29 0 00:00:00.09 $ SET PROT=(s:rwed,o:rwed,g:rwed,w:rwed)/DEFAULT 3 1 * 1.29 0 00:00:00.09 $ IF F$MODE() .NES. "INTERACTIVE" THEN EXIT 4 1 * 1.57 0 00:00:00.11 $ IF F$EXTRACT(0,2,F$GETJPI("","TERMINAL")) .EQS. "TT" $ THEN 5 0 0.00 $ SET TERM/NOEIGHT 6 0 0.00 $ SET TERM/WIDTH=132 7 0 0.00 $ ENDIF 8 1 * 1.43 0 00:00:00.10 $ SET CONTROL=T 9 1 ************ 58.7 0 00:00:04.10 $ SET TERM/INQUIRE 10 1 ** 6.29 0 00:00:00.44 $ WRITE SYS$OUTPUT "System last booted at ''F$GETSYI("BOOTTIME")'" 11 1 * 1.57 0 00:00:00.11 $ WRITE SYS$OUTPUT "Operating system software version ''F$GETSYI("VERSION" 12 1 * 1.72 0 00:00:00.12 $ WRITE SYS$OUTPUT "" 13 1 *** 11.3 0 00:00:00.79 $ @USER2:[BARKES.COM]DISKPER 14 1 * 1.43 0 00:00:00.10 $ SET PROMPT = " " 15 1 * 4.86 0 00:00:00.34 $ R SYS$LOGIN:KGBLOGIN 16 1 * 1.43 0 00:00:00.10 $ NOODGE:== 'EDIT' SYS$LOGIN:NOODGE.DAT 17 1 * 1.43 0 00:00:00.10 $ IF F$EXTRACT(0,1,F$GETJPI("","TERMINAL")) .EQS. "T" THEN- SPAWN/NOWAIT/INPUT=KGB$COM:NOODGE.COM 18 1 * 1.29 0 00:00:00.09 $ SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER NO NONE" 19 1 * 1.29 0 00:00:00.09 $ REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER YES NONE" 20 1 * 1.72 0 00:00:00.12 $ SHUTDOWN1 == "@SYS$SYSTEM:SHUTDOWN" 21 0 0.00 $ EXIT --------------------------------------------------------------------------------------------------------------------------------- Total: 23 lines 100.00% 0 00:00:06.99