Copyright 1988-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 December, 1988 By Kevin G. Barkes The End of Year Closeout Before plunging headlong into 1989, there's a small matter of backlog here at DCL Dialogue. The mail's been particularly heavy as of late, and with scheduling and other problems the letter pile has become rather significant. Complicating matters is a recent spate of letters without addresses. I answer all the mail I receive and eagerly look forward to printing user submissions, but I can't without your return address. So please, before you drop us a line, make certain your note has all the necessary information so we can get in touch with you. MORE STUPID DCL TRICKS The record counting procedure, REC.COM, created more mail than any other topic published here. What began as a simple throwaway idea has mushroomed into a major issue, and it's time to sort things out. As Joseph Pasquale and Jim Laing noted in the September Letters to the Editor column, the SEARCH command executes much faster than the APPEND command contained in the original procedure. But there's a problem, as Dale M. Kilgus, DP Manager of Nordica USA in Vermont, and several readers on CompuServe's VAX Forum discovered. The SEARCH command cannot read records greater than 2048 bytes in length. If you try using the modified REC.COM on files with immense record lengths, SEARCH will complain mightily. This is an example of what I call "My Application Myopia". Most of the work I perform on VAXen relates to text processing and publishing. Rarely do record lengths exceed 100 or 200 bytes. So, when testing out the procedures, I did so on files with relatively small records. It never occurred to me to run some enormous records through them. It should also be noted that the DCL Dictionary has no explicit information concerning SEARCH's record length limitation. It's possible to re-write the procedures to work around the generated error message, but doing so complicates things. We leave the realm of "stupid DCL tricks" and enter the area of full utilities. Perhaps the best solution is to use the SEARCH-based procedures for small files, and the slower APPEND flavor in other circumstances. Speaking of full utilities, George W. Holbert and his associates at Northrop Corporation in Pico Rivera, CA developed a nifty command procedure which counts both records and bytes in a file, and supports wildcard input. Unfortunately, it's too long to include here. Gerald Kaman Tsui of New York points out a useful facility within the EVE/TPU editor which many people, especially those new to VMS and/or TPU, have overlooked. It permits you to switch between DCL and the editor without having to EXIT and endure the lengthy EDIT startup. It's particularly useful for programmers in their debugging phase. "In addition", Gerald notes, "everything in the edit session stays (number of files opened, paste buffer, cursor position, etc.) "This is possible because VMS allows users to SPAWN jobs and use the ATTACH command to switch between them. "Define these two symbols in your LOGIN.COM file: $ INIT_EVE :== SPAWN/WAIT/PROCESS=SEVE EDIT/TPU (/SEC=your section file) $ SEVE := ATTACH SEVE "To use the procedure, at the DCL prompt type in INIT_EVE file_name.ext. "At the TPU Command: prompt, type in WRITE, then ATTACH. Compile your source code or do whatever else you need at the $ prompt, then type in SEVE to return to the editor. Repeat these steps until you're complete, then enter EXIT at the TPU command prompt to terminate the SEVE subprocess." Gerald suggests defining WRITE and ATTACH keys in the editor to speed up the process. You may have to check with your system manager to make certain you have sufficient privileges and quotas to spawn subprocesses. Also, you should use a process name other than "SEVE", since process names must be unique (and the odds are the person who passed this article on to you read this first). If you eliminate the /PROCESS=SEVE line in the first symbol definition, VMS will create a subprocess named YOUR_PROCESS_(n), where (n) is the current number of subprocesses owned by your parent process. Of course, you'll have to change the SEVE symbol to NAME_1, or, if you're heavily into spawning, "manually" enter the command ATTACH NAME_(n). This is an old trick for TPU buffs, but the EVE manual is a bit intimidating and it's easy to overlook. You may also want to write a short .COM file to automate the procedure. Gerald included one but, alas, space is at a premium. ODDS AND ENDS Russ Allen submitted a procedure which expands file name wild cards to pass to C programs, making VMS act like UNIX. (Hmmm... I hope Russ doesn't get hit with a "look and feel" suit from AT&T...) We'll take a closer look at it in a future column, provided Russ gets in contact with us and provides his address (hint, hint). This month's reader-submitted procedure is DIRECTORY_TREE.COM (Program 1). Shishir Gundavaram's utility draws a tree-like display of the directory the user specifies. By directing output to a file, you can easily generate "roadmaps" to your convoluted subdirectory structure. Finally, in the holiday spirit, I encountered a DCL hacker-type at a new client site who pronounces DCL (DEE SEE EL) as "DEE SEL" (rhymes with Cecil). "Seems appropriate to me," he pointed out. "A diesel engine is slow and dirty but produces a lot of power, simply and cheap. So's DCL." Why not? Happy DCLing! ---------- Kevin G. Barkes is an independent consultant. He publishes the KGB Report newsletter, operates the www.kgbreport.com website, lurks on comp.os.vms, and can be reached at kgbarkes@gmail.com.