VAX BASED CP/M 'MODEM7' COMPATIBLE FILE TRANSFER PROGRAMS This document describes the file transfer system in use between a VAX 780 and an IBM PC. This file transfer system is compatible with the CP/M MODEM7 file transfer protocols, and was developed in C using the public domain CMODEM program as the basis for the file transfer portion. Two filter programs are provided in the package to insert/delete CR's in CR/LF combinations to match the VAX conventions on text files. These routines are run on the VAX, and are invoked automatically by the use of the appropriate DCL procedures. These DCL procedures should be used on text files only. FTP should be used directly when transferring binary files. The programs in use are as follows: $ FTP -x FileName This routine handles file sending ('-s'), receiving ('-r'), or appending ('-a') from a remote system. Direction of flow in the above commands is relative to the VAX. On the command line -x is one of the above (-s,-r,-a) and FileName is the file to be sent or received. $ VAX2IBM InFile OutFile Routine to convert LF-only line termination to the CRLF line termination required by CP/M and MS/DOS compatible systems. $ IBM2VAX InFile OutFile Routine to convert CRLF line termination into the LF-only line termination required by the VAX RMS file system. Also removes any CTRL-Z characters found (CP/M EOF marker). The DCL procedures in use are as follows: $ FSEND FileName Invokes VAX2IBM to build a properly formatted text file, then FTP to send that file to the remote system. $ FRECV FileName Invokes FTP to receive a text file from the remote system, then invokes IBM2VAX to properly format that file for VAX RMS. A couple of notes are in order: The FTP routine is set up such that only ONE port is required in order to run it, the terminal that issues the FTP command is the same one that sends/receives the file. The use of a simple terminal emulator program to activate the VAX is all that is required. The protocols are set up for this form of delayed synchronization. FTP has been tested at 9600 baud and should not fall behind. When the VAX is heavily loaded, occasional timeouts may occur. These timeouts most often manifest themselves in checksum or other errors. The timeouts are necessary for proper synch of the protocol in case of errors, and may not be disturbed. DEC C runtime will output the LF's to the file during the IBM to VAX conversion. This differs slightly from the way it would appear on the VAX in RMS native form (null characters, with some form of char count as termination). If file is then copied using the DCL COPY command, the LF's are removed, and Null characters and char counts are inserted in their place. The only places I have found where the conversion format will cause a problem is with the DIFF command, and with CMS. With DIFF, use DIFF/IGNORE=SPACING to cause a comparison of file contents only. With CMS, edit the file and save it. The new version will be in the correct format. The original MODEM program was developed by Ward Christensen several years ago, and has undergone extensive modifications in the user interface. The protocol has not changed, except in spin-off versions that play around with CRC instead of simple checksums for verification. These are normally identified as MODEM9 and and above. There may be other (possibly better) protocols around, but this one has become the de facto standard for the micro world. If you have problems, contact me before changing the protocol. I could actually have an implementation bug (shock!). It has been tested fairly extensively with at least two other systems, but bugs are insidious. Bugs, enhancements and any other wild ideas should be reported via mail to LOAFMAN (TCC01 or TCC02), or via phone to: Kenneth W. Loafman work: (214)556-8889 (sometime during the day) home: (214)245-2618 (before 10:00pm weekdays)