@CLS@ +---------------------------------------------------------------------------+ | Bulletin # 5 File Transfer Tips & Tricks Updated: 07/29/95 | +---------------------------------------------------------------------------+ Definition. File Transfer is simply the process of downloading (receiving a file) from or uploading (sending a file) to a BBS or another system. Types of Files Available on the SYS$COMMAND BBS. SYS$COMMAND carries the following file types: .?? Example: BIN.AA - Download these as "binary" These are fragments of split "tarballs". See bulletin #13 for an explanation of what "tarballs" are. To collect all of the fragments, download all the files which have the same name, BIN.AA through BIN.CT for example. Get the CAT_TGZS.BAT file from file area 2 or the CAT_TGZS.COM (DCL proc.) file from file area 7 to re-assemble the fragments back into the original "tarball". .Z?? Example: CMUIP66A.ZAA - Download these as "binary" These are fragments of split .ZIP files. Get the CAT_ZIPS.BAT file from file area 2 or the CAT_ZIPS.COM (DCL proc.) file from file area 7 to re-assemble the fragments back into the original compressed archive (.ZIP file). .TLB, .OLB, These are Library files (text, object, macro or forms .MLB, .FLB libraries). Download such files as binary files. .ZIP These are either VMS ZIP (File Area 3) or MS-DOS PKZIP File Area 2) archives. PKZIP archives can also be found in File Area B as .EXE files, which are "self-extrac- ting". Just run them from the MS-DOS command prompt. Use VMS ZIP (ZIP.EXE or ZIP.DHX, use DEHEX to restore to .EXE) to "unpack" the files in VMS ZIP archives. Use PKUNZIP to unpack the files in PKZIP archives. (You'll find the current PKZIP and PKUNZIP in the self-extarcting PKZ204G.EXE archive in File Area 2). Download .ZIP files as binary files. Other file types you may find on The @BBS@ .B2S These are BASIC Plus-2 source files. Download .B2S files as ASCII text. .BAS These are BASIC program source files. Download .BAS files as ASCII text. (Note: Files in Area C are DEC BASIC source files. Files in Area B are for use with MS-DOS BASIC Compilers. Files in Area D (Misc) may be BASIC Plus source files for RSTS and/or RSTS/E, or they may be DEC BASIC source files.) .C These are C language program source files. Download .C files as ASCII text. (Note: Files in Area C are DEC/C or VMS/C++ source files. Files in Area B are for use with MS-DOS C Compilers.) .COM These are either DCL command procedures (File Area C) or MS-DOS programs (File Area B). Download DCL procedures as ASCII files. Download MS-DOS programs as binary files. .DHX These are a "hexified" form of binary files (programs or libraries). They are created using the HEXIFY.COM proce- dure. Use DEHEX.COM to restore them. These do NOT work with VMSDEH. Download .DHX files as ASCII text. .EXE These are either VMS executable images (File Area C) or MS-DOS programs (File Area B). Download .EXE files as binary files. Some MS-DOS .EXE files are self-extracting archives. See .ZIP. .HEX These are a "hexified" form of binary files (programs, libraries, etc.). They are created using the VMSHEX program. Use VMSDEH.MAR to restore them. These do NOT work with DEHEX.COM. Download .HEX files as ASCII text. .MAR These are MACRO/32 assembly language program source files. Download .MAR files as ASCII text. SYS$COMMAND does not carry .OBJ files (unless they are contained in .OLB files). There is presently no effective way to up/down load them without "scrambling" them. For uploading one of the file types listed in the foregoing, refer to the description of that file type for the correct download method. Use that same method (ASCII or binary) when doing your upload. Protocols. Usually, file transfer requires a "protocol"; that is, a way of transfer- ring both a file and its characteristics to another system. Some examples of file transfer protocols are ASCII, Kermit, ZMODEM, etc. The simplest file transfer method is ASCII, sometimes also known as text. This is for sending only printable ASCII characters, meaning those in the range of an ASCII space (" ", character 32) through the right-brace ("}", character 126) including all of the punctuation marks, the digits 0 through 9 and upper/lowercase letters. If you don't have a "protocol" such as Kermit or ZMODEM, you can transfer only printable data. One of the oldest and best known protocols for "binary" files is known as Kermit, named after the Jim Henson puppet character. Older versions of Kermit used small, fixed size data blocks resulting in very slow, if effective, file transfer. Newer versions (sometimes called "C-Kermit") support varaible size data blocks, data compression and "sliding windows" (whatever the sam-hill that's supposed to mean - ask your local UNIX guru). Most communication and terminal programs for MS-DOS and Windows support Kermit file transfers. Both ends of the transfer must be told the file specification before the transfer is initiated, although most C-Kermit variations support "batch" (or "wildcard") transfers by informing the receiving end of the source filename. Note, however, that most BBS systems still consider Kermit to be a "non- batch" protocol. Another popular protocol is called ZMODEM. ZMODEM is an evolution of Charles Forsberg's XMODEM. XMODEM, like early Kermit, supports small data blocks, data compression and limited (or no) CRC error checking. Like early Kermit, XMODEM is a "non-batch" protocol. XMODEM-1K (some- times called YMODEM) increased the block size to 1024 bytes, and enhanced error detection somewhat. YMODEM, as XMODEM-1K came to be called, later became YMODEM-B or "batch YMODEM". YMODEM-B added the ability to transfer files in "batches", sometimes even using wild- cards. ZMODEM added variable block sizes, better error detection and correction, and enhanced data compression. In most schools of thought, ZMODEM and C-Kermit are thought of as being about equal in efficiency. I Don't Have a File Transfer Protocol on my VMS System Now. What Can I Do? If you don't currently have a file transfer protocol on your VMS System, you can still download one. SYS$COMMAND provides both C-Kermit for VMS and X/Y/ZMODEM for VMS in an ASCII-downloadable form. Look in file area 3 for DEHEX.COM and either CK9OBJ.DHX or VRZ.DHX. The DEHEX.COM proce- dure will convert .DHX files to either .%LB (any library format, since they're all 512-byte fixed record length) or .EXE. In File Area 3, you can also find CKERMIT.HEX. This is an ASCII text form of a VMS executable, CKERMIT.EXE. You need VMSDEH.MAR (a VAX Assembler program) to restore CKERMIT.HEX. To get these down to your VMS System, you can do this: First, using a modem attached to any async. mux port (TTAx: or TXAx:) or terminal server port, dial up the SYS$COMMAND BBS and log the session. The following is an example of a command that will do this for you: $ SET HOST/DTE/LOG=MYLOG.LOG ddcu: ...where "ddcu:" is the device name for the port to which your modem is connected. The device should be set for both TTSYNC and HOSTSYNC (SET TERMINAL/HOSTSYNC/TTSYNC). Then, while connected to the SYS$COMMAND BBS, select the "[R]ead A Text File" option from the File menu. Use this option to display both DEHEX.COM and either CK9OBJ.DHX or VRZ.DHX. As they scroll up your screen, the data will also be recorded in the file you specified in the /LOG qualifier of the SET HOST/DTE command. After logging off of the BBS, hanging up the phone line, and exiting the SET HOST/DTE command (CTRL+\ will usually do it), edit the log file and extract the two files from the log. This is fairly easy to do with EDT. It can also be done with EVE (TPU), but it does take considerably more work. We recommend sticking with EDT until someone writes a .TPU$SECTION file that emulates ALL of the EDT functionality (including CTRL+K to define function keys in EDT's Change Mode or "keypad" syntax). Once you have extracted DEHEX.COM and CK9OBJ.DHX from your session log, invoke DEHEX to convert CK9OBJ.DHX back to a .EXE file, like so: $ @DEHEX CK9OBJ=.TLB DEHEX can run for a VERY long time on small or busy VAXes, but it does not require assembling and linking a program. Alternatively, you can download VMSDEH.MAR and CKERMIT.HEX using the technique just described. However, once you extract VMSDEH, you'll need to assemble it into an object file using the MACRO/32 assembler that shipd with every version of VMS. The following commands will do that for you: $ MACRO VMSDEH $ LINK VMSDEH Then, RUN VMSDEH. It's an interactive program, and will ask you for the filespec of the .HEX files to be restored. After using VMSDEHX to restore from CKERMIT.HEX, you will then have CKERMIT.EXE. If you transferred DEHEX.COM and CK9OBJ.DHX, you will then have CK9OBJ.TLB. This is a text library and from it you can then extract the EXTRACT_TLB.COM procedure. The following example shows what you need to do: $ LIBR/TEXT/EXTR="EXTRACT_TLB^COM"/OUT=EXTRACT_TLB.COM CK9OBJ It's best to move CK9OBJ.TLB to its own subdirectory, and do your work with that directory as your current default. Then, invoke EXTRACT_TLB to get the remaining files from the text library: $ EXTRACT_TLB CK9OBJ Look for any "read me" or .TXT files that may have been extracted. One of them will tell you how to link the C-Kermit image, and how to begin using it. - * - Here's a quick summary of how to download files from the SYS$COMMAND BBS using C-Kermit for VMS. C-Kermit's HELP facility will illustrate the commands and syntax. 1. Identify the port to which your modem is connected. You will need this info. for C-Kermit. 2. Run C-Kermit. Take note of the "Escape Character" as displayed by C-Kermit, or tell it what character you will type to return to C-Kermit's command mode. 3. Tell C-Kermit which port to use as the comm. port. Also, if you're going to download any .ZIP or .EXE files, tell C-Kermit to set it's file type to BINARY. 4. Issue the "CONNECT" command to C-Kermit. This will allow you to communicate directly with the modem, and so with the remote system (the BBS). 5. Dial-up and log into the BBS as usual. Select a file for download. When the BBS asks which transfer protocol to use, select "K" for Kermit. 6. When the BBS asks you to start your Kermit download, type C-Kermit's "escape" character. This will return you to C-Kermit's command mode. Then, tell C-Kermit to RECEIVE. 7. When the file transfer is complete, tell C-Kermit to CONNECT once again and your BBS session will be resumed. Transferring Files Using an MS-DOS System (PC). This is a somewhat easier method than using C-Kermit. You can download files to your PC, then transfer them to your VMS System by the most convenient means. One two-step process would be to use a program such as Telix (for DOS or Windows) to transfer files via the ZMODEM protocol to your PC, then use TELIX or Reflection or whatever, along with the VRZ program (available in File Area C as both VMS .EXE and ASCII .DHX or .HEX form). +---------------------------- End of Bulletin ------------------------------+