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 February 1991 Teleportation For Fun and Profit By Kevin G. Barkes The voice on the other end of the phone sounded panicked. "I've upgraded to a new version of VMS. Turns out an important piece of software we use is incompatible with it. I have a big mail run that has to ship Monday morning at 8 a.m. I don't have time to roll back the old version of VMS and since it's Saturday the vendor can't ship the updated program overnight. He says he can telecommunicate it to me but I don't have any file transfer protocols installed. Can you help?" Panicked, but succinct and lucid. I reached for my coat and grabbed the bag containing TK50 and nine-track tapes of Kermit and other handy utilities. "Where are you located?" I asked, fishing for my car keys. "Hawaii," came the response. On to plan two. "Do you have a modem connected to your VAX?" I inquired. "Yes," he replied, "but we use it strictly for dial-in... no communication protocols at all." "No problem," I responded. I quickly added his name to the user list on my BBS system. Then I talked him through the following outdial sequence on his VAX: ___ Update: The BBS has been replaced with the www.kgbreport.com website --- ----------------------------------------------------------------- $ SET HOST/LOG/DTE TXA3: %REM-I-EXIT, connection established, type ^\ to exit. ATDT4128540511 RRING CONNECT 2400 Fido/FidoNet v12t FidoNet address 1:129/38 SYS$OUTPUT BBS * FidoNet 1:129/38 * 412.854.0511 The BBS for VAX/VMS System Professionals "There are a lot of BBSes out there, and this is one of them." . . ---------------------------------------------------------------- I gave him his username and password, directed him to the VAX Kermit files area of the BBS, and had him download in ASCII format the file DEHEX.DAT: ---------------------------------------------------------------- File Section Command (?=help): d a dehex.dat ASCII Text transfer Ready to send "dehex.dat" Start now, or five Control-X's to abort Control-S to pause, Control-C to abort, Strike any key to start: .TITLE DEHEX .SBTTL Stuart Hecht and Eric McQueen .LIBRARY /SYS$LIBRARY:STARLET/ .LIBRARY /SYS$LIBRARY:LIB/ .IDENT /1.1.00/ . . . .SBTTL End of the Dehexify .END DEHEX Sent 1 files, 24,641 bytes in 4:17 (including start time), or 95 bytes/sec --------------------------------------------------------------- Next, I directed him to grab the file KERMIT.DAT: --------------------------------------------------------------- File Section Command (?=help): d a kermit.dat ASCII Text transfer Ready to send "kermit.dat" Start now, or five Control-X's to abort Control-S to pause, Control-C to abort, Strike any key to start: :010000FF01FF :010000FE0001 . . . -------------------------------------------------------------- We continued talking on the voice line as the data spilled out of the BBS in plain ASCII format. "This looks fascinating, but what exactly are we doing?" he asked. "Kermit is a file transfer protocol (FTP) created by Frank da Cruz of Columbia University in 1981. It was originally designed to link a DECsystem-20 and a CPM micro, but as it grew more popular it expanded to over 80 implementations, from Commodores to Crays. It gets its name from the popular Muppet character Kermit the Frog. Henson Associates gave Columbia permission to use it. "Kermit isn't public domain; it's owned by Columbia. But Columbia encourages wide distribution of the protocol. That's why you can find it on DECUS tapes and bulletin board systems like mine. The school permits commercial software vendors to include Kermit in their packages provided they charge only reasonable media and production costs. No one's allowed to profit from selling it. "Since Kermit is a decade old, it isn't the protocol of choice on many systems anymore. It's getting harder to find in MS-DOS communications packages, and commercial vendors have produced some superb proprietary protocols that leave old Kermit in the dust. "But it's still your best shot at getting two different computers to exchange data. And because the VAX versions of Kermit support the transfer of 512-byte fixed-length records, it's one of the few "public" protocols around that can handle .EXEs without some type of special post-processing program," I explained. Fortunately, my Hawaiian friend's company had been a long-time subscriber to the VAX Professional, the DEC Pro's sister magazine. I directed him to a series of articles I wrote in October and December of 1988 that explained Kermit in more detail. He grabbed them out of the company library and quickly scanned the mechanics of Kermit's file transfer operations. "This is easy," he exclaimed. "But I still don't quite understand what I'm downloading to my system." "Believe it or not, your dilemma isn't too unusual," I said. "It's the old chicken-or-egg paradox: you need to get Kermit onto your system, but you can't download it unless you already have a file transfer protocol. "The people who supported Kermit came up with a nifty solution to the problem. First, they took the Kermit executable and ran it through a program which "hexified" it: that is, converted the binary data in the .EXE file into a plain ASCII file. "They then wrote a MACRO program called DEHEX which reads the hexified file and converts it back into an executable image. Viola- [(note to editor: I know French. It's a joke.)] you've got a working copy of Kermit. "Sometimes you have problems doing this, especially if the telephone line is noisy and you get hits during the transfer. But so far it looks pretty good." As we talked about the weather in Pittsburgh and Honolulu, the tranfer completed: ------------------------------------------------------------ . . :00B600004A :00B600FA50 :0000000000 Sent 1 files, 94,757 bytes in 15:47 (including start time), or 100 bytes/sec ----------------------------------------------------------- I had him log off the BBS and enter a control-\ to shut down the link and close off the SETHOST.LOG file. "Now, what you do is edit SETHOST.LOG. Pull out the data for the DEHEX.DAT file and put in a file named DEHEX.MAR. Then pick up the KERMIT.DAT data and put it in a separate file as well," I explained. I heard feverish keystrokes at the other end. "Ready," he replied. "Okay, now compile the DEHEX program," $ MACRO DEHEX "link it," $ LINK DEHEX "and run it:" $ RUN DEHEX Please type the file name: KERMIT.DAT kermit.exe $ "That's it," I said. "You now have a functional version of Kermit." The fella thanked me profusely, promised me his undying friendship and a fan letter to my editor. I went back to piddling around the office when the phone rang again. "It doesn't work," came the anquished voice. "I'm trying to download the object file I need to relink to get my application to run, and Kermit keeps blowing up on me. The guy at the vendor said he doesn't have access to the version of the executable I need. What am I going to do?" "Simple," I explained. "We'll just use an old trick I learned from the wizardly sysops on CompuServe's VAX Forum. Executable images aren't the only files with fixed, 512-byte records. So are the ones produced by the VMS Librarian utility. Have your vendor put the .OBJ file in an object library. Transfer it to your end using file type fixed and extract it. It should link with no trouble." "This is great," he said. "I'm going to send Kermit to a buddy of mine at another site as soon as I can cut a tape." "Is his system on DECnet with yours?" I asked. "Yes," he replied, "but it's a real pain to copy stuff over there. I always mess up the target directory specification." "Then just MAIL it to him," I suggested. "There's an undocumented feature in the most recent release of MAIL: the /FOREIGN qualifier. Issue the command: $ MAIL/FOREIGN KERMIT.EXE NODE::USER "If his version of MAIL supports it, he'll get a message directing him to use the utility's EXTRACT command to put the file where he can reach it," I explained. My Hawaiian friend thanked me again and hung up. I forgot about the incident until a few weeks later when a case of fresh pineapples showed up at my doorstep. Hope he doesn't find out I'm allergic to them... ************************************************* Kevin G. Barkes is an independent consultant and publisher of the KGB Report newsletter. He operates the www.kgbreport.com website, lurks on comp.os.vms and can be reached at kgbarkes@gmail.com.