Copyright 1991-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 August 1991 The Return of Stupid DCL Tricks By Kevin G. Barkes Thanks to a problem with a leased external disk drive, I'm stuck at VMS 5.3-1. As I write this, some bozo is trying to suck out all the files on my BBS system at 300 baud. And after spending five hours rewiring the eight phone lines in my office, the intercom on the kitchen phone is now trying to receive faxes from the DEC Pro offices in Horsham, PA. This is not the moment to attack some weighty, momentous subject. I'm just not up to it. Instead, it's time once again for Stupid DCL Tricks, or Nifty Things Which Can't Be Expanded Into A Full Column But Are Too Good To Pass Up. KERMIT, BACKUP, and COPY Mark Buda is a busy guy. In addition to running the VAXCat BBS system in Merrimack, NH, he's played a major role in the development of C-Kermit, a VAX/VMS flavor of the popular file transfer protocol which supports large packet sizes and other goodies. But I'm a big M.B. fan because of the spiffy way in which he solved a major problem: how to transfer otherwise unsupported RMS file types using Kermit. Let's say you have a directory on your VAX containing ASCII files, .EXEs, and a couple .OBJ files which you want to download to another VAX system. ASCII is the default file type for Kermit, so the first group of files can be moved over with no problem. For the .EXEs, you'll have to issue a SET FILE TYPE FIXED on the receiving end before starting the transfer. The .OBJs are a pain--Kermit won't normally handle object files under any circumstances. You can get around the problem by first putting them in an object library using the VMS Librarian command. VMS library files have fixed, 512-byte records (like .EXEs) and Kermit can deal with them. But it's still darned inconvenient and, it turns out, unnecessary. Here are Mark's five easy steps to downloading a group of files of any type: First, create a backup saveset of the files you want to transfer. Let's say you want to transfer a subdirectory named "tools": $ BACKUP [.TOOLS] ALL.BCK /SAVE Next, confirm the block size of the newly-created saveset. It'll probably be 32256, but let's check, anyway: $ BACKUP/LIST ALL.BCK /SAVE Fire up Kermit, set FILE TYPE FIXED on the receiving end, and transfer the file. You now have a worthless backup saveset. But it's easy to fix. Enter the following command, and ignore the error message: $ BACKUP FOO.BAR X.BCK /SAVE/BLOCK=nnnnn (where nnnnn is the block size) Finally: $ COPY ALL.BCK X.BCK /OVERLAY The result? X.BCK now contains a nice, legal backup saveset ready to be restored on your local system. A simple $ BACKUP X.BCK /SAVE [...] and you're in business. What's really great about this technique is that it permits you to transfer complete directory structures via Kermit. I can send my entire "consulting" directory (six subdirectories, about 60 files, 1,200 blocks) with one Kermit command. At 9600 bps, using 1,000-byte C-Kermit packets, the transmission takes under 20 minutes. And a note to those people who download .EXE and .TLB files from the VAX Forum on CompuServe. If you're using "normal" VMS Kermit, which can be identified by its "Kermit-32>" prompt, always use FILE TYPE FIXED. Kermit-32's BINARY file type is only intended for the transfer of PC-type binary files. C-Kermit doesn't have a FIXED file type, but its BINARY is really the same as Kermit-32's FIXED type. And remember to set the file type on the receiving end, not the transmitting end. ************ If you're tired of plugging DEC on the flag page of your printouts, you can add whatever you like with a simple $ DEFINE/SYSTEM/EXEC PSM$ANNOUNCE "Replacement text" in your system startup file. ************ The spirit of the '60s lives on within the bowels of Digital. Try the following: $ TECO := $ TECO32 $ TECO make love ************ If your're like most folks, you have a large number of symbol assignments which point to command files: $ CD :== @KGB$COM:CD.COM $ WARP :== @KGB$COM:SETPRI $ CKERM :== @KGB$COM:CKERMIT You can end up with a cluttered LOGIN.COM file and a crowded symbol table. Ted Pack of Modesto, CA suggests replacing all those symbol assignments with: $ X :== @KGB$COM:X And the command file, X.COM: $!@@@ X.COM $! P1 is the command file to execute $ IF P1 .EQS. "" THEN - INQUIRE/NOPUNC P1 "Job, sir? " $ @KGB$COM:'P1' 'P2' 'P3' 'P4' 'P5' 'P6' 'P7' 'P8' So now, instead of doing: $ WARP 9 to increase my priority and peeve everyone else, I do $ X WARP 9 As Ted points out, using x.com eliminates the need to edit and rerun LOGIN.COM whenever you add, delete or rename a command file. It also reduces the possibility of symbol assignments conflicting with actual DCL commands. Hmmm. My office lights just went out. Must be the phone. ************ Kevin G. Barkes is an independent consultant who publishes the KGB Report newsletter, maintains the www.kgbreport.com website, lurks on comp.os.vms, and can be reached at kgbarkes@gmail.com.