[comp.sys.ibm.pc] Some hints on binary files xfers

len@csd1.milw.wisc.edu (Leonard P Levine,1045E,5170,9624719) (03/05/88)

Hints on using UUDECODE and PKXARC in a UNIX-PC Environment.

I am running a Zenith PC Clone as a stand alone processor and as 
a RS232 wired terminal into my University's Unix system.  I 
suspect that what I have is a fairly common setup and I went 
through some interesting times getting binary and text data from 
the net sources such as SIMTEL20 to my local PC.  I am using 
Kermit as a terminal emulator and file transfer program.  Perhaps 
a summary of what I had to do to get executables transferred to 
my local hardware will help others with similar equipment get 
connected.  

There are five crucial programs (UUDECODE, PKXARC, MSKERMIT, 
KERMIT and FTP) that I use to transfer material to me.  I 
discovered that unless all of them are used correctly, things do 
not work well.  For many of these file transfers three dissimilar 
computers are involved (PC, UNIX and SERVER).  

My desktop PC uses MSKERMIT for file transfer, and UUDECODE and 
PKXARC for file decoding.  

My local UNIX machine has its own version of KERMIT which I use 
for UNIX to PC transfer and FTP which I use for SERVER to UNIX 
transfers.  

The SERVER, such as SIMTEL20 is accessed through the UNIX program 
FTP.

The first problem involves getting files transferred from the 
local UNIX to the PC.  KERMIT works well as a terminal emulator 
but cannot be used as a file transfer system unless the PC 
program MSKERMIT is used under the 'set parity none' option.  
Once that is done, running KERMIT on the UNIX machine will permit 
files to be moved from the UNIX by using the send command on the 
UNIX and the receive command on the PC.  If the file is binary, 
(and only then!) the command 'set file type binary' must be 
executed when in the UNIX KERMIT environment.

The second problem involves getting files properly sent from the 
SERVER to the UNIX computer.  The program FTP may be run on the 
UNIX system with the PC program MSKERMIT run in Terminal 
Emulation Mode (command 'connect').  (Documentation on FTP 
probably can be found by using the UNIX command 'man ftp'.)  I 
connect with the SERVER by using a command such as 'open 
simtel20.arpa' within the FTP program and log in using the user 
name 'anonymous' and the password 'len levine' when prompted.  
(Please use your own name as a password, not mine.  ;-) )  To get 
to the files on the SERVER, the unix-like command 
'cd PD1:<MSDOS.DESKPUB>' may be issued to FTP as well as commands 
like 'dir' once an appropriate location in the file tree is 
established.  If a transfer will involve a binary file the FTP 
command 'tenex' is essential to accommodate the different file 
nature of the UNIX and SERVER computers.  Finally the FTP command 
'get filename' will cause the file 'filename' to be copied from 
the SERVER to the UNIX system.

HINT:  The two commands 'tenex' in the FTP environment and 'set 
file type binary' in the UNIX KERMIT environment are both 
required to move binary files.  Of course neither should be used 
when transferring text files.  No error messages occur if either 
mode is set wrongly; the files just fail when PKXARC is run.

If the file is in UUCP format (identified as a pure text file 
consisting of 'n' lines of 60 characters per line) it must be 
transferred as text and decoded with UUDECODE in the PC.  This 
will result in an .exe or .arc file (a binary file) on the PC 
which can be executed directly or can be de-archived by PKXARC. 
(When you execute foreign programs on your PC, you are putting a 
great deal of faith in the writer and distributor.  In this day 
of Trojan Horse and Virus programs, a word to the wise should be 
issued.)

Copies of the programs MSKERMIT, UUDECODE and PKXARC should be 
available in your computing center or from sources such as Public 
Brand Software and the like.  I will send copies of these 
programs to anyone who sends me 2 360K PC disks or 1 1.2meg 
AT disk (preformatted, no system) along with return postage.

Professor L. P. Levine
Department of EE & CS
University of Wisconsin-Milwaukee
PO Box 785
Milwaukee, WI 53201