Article View: comp.sys.mac
Article #26848Re: Help with ftp
From: Rick Adams
Date: Tue, 29 Mar 1988 23:35
Date: Tue, 29 Mar 1988 23:35
103 lines
5379 bytes
5379 bytes
Wrong answers provided by people guessing about what the problem might
be are worse than no answers at all. If you aren't familiar with simtel20
you shouldn't be responding.
simtel20 is a DEC-20 machine wiht 36 bit words. 8 bit bytes don't
fix evenly in 36 bytes, so they are packed. If you transfer
a "binary" fine in either "ascii" mode OR "binary" mode you will get
the wrong answer (unless you are on another DEC-20 or DEC-10!). You need
to do the transfer in "tenex" mode.
Following are the actual instructions from the simtel20 people.
They explain exactly what is happening and how to avoid it.
--rick
FILE TYPES
Files are stored in two formats: Text files such as those with
names that end with DOC, HEX, INF and ASM are sometimes stored as
ASCII files, but usually these files are stored in binary squeezed
form. Binary storage is also used for executable (COM) and library
files. Squeezed and library files are described below. All binary
data are stored as four 8-bit bytes per 36-bit SIMTEL20 word, with the
low-order four bits of each word filled with zeros. If such a file is
interpreted as a contiguous string, as will happen if a straight
binary transfer is made to a 16 or 32-bit UNIX machine, the four zero
filler-bits per 36-bit group will cause rather bizarre and frustrating
results. The methods for dealing with this situation, which differ
from machine to machine, are explained in a following paragraph.
Squeezed files have been compressed using programs available in
directory <CPM.SQUSQ> to obtain an approximate 35-percent size
reduction. These files can be identified by the letter Q in the
extension field. For example, the file PD:<CPM.ASMUTL>RMACPAT.AQM is
a squeezed file. It must be transferred as a binary file, and then
unsqueezed. The unsqueezing can be done on a CP/M system using
USQ-xx.COM (where "xx" is the current version) from directory
<CPM.SQUSQ>, or there are several host-based unsqueezers in the <CPM>
and <UNIX> archives (see for example, directories <MISC.TOPS-20> and
<UNIX.SQ-USQ>).
CP/M library files (those with names ending in LBR) combine
several regular CP/M files into a single BINARY file which contains an
internal directory of its contents. They are created using the CP/M
library utility LUxxx.COM (where "xxx" is the current version) or some
other compatible utility. The complete packages for LUxxx and a newer
compatible program called NULUxx (where "xx" is the version) can be
found in directory PD:<CPM.CPMLIB>. C-language source code for a
compatible UNIX utility called LAR (library archiver) is in directory
PD:<UNIX.CPM>.
All files with names ending in ".1" are stored in binary format, and
those with names ending in ".2" are stored in ASCII. This
relationship will continue to apply for files in the <SIGM>, <CPMUG>
and <PC-BLUE> archives until further notice.
...
FILE TRANSFER VIA FTP
FTP stands for File Transfer Protocol, a formalized procedure for
moving files among machines on the Defense Data Network (DDN) and
other networks that connect with the DDN. The protocol is implemented
by a program often called FTP. The different mainframe operating
systems implement FTP with variations in command syntax. Some systems
have the remote-file-name precede the local-file-name in the command.
Others reverse this order. Some versions have the whole command on a
single input line, while others use multiple lines. Read the
documentation for your local system, or consult a friendly system
wizard for the details of your local FTP command syntax.
Users of TOPS-10, TENEX, TOPS-20 or ITS systems can use "image"
or "paged" mode for ALL transfers. UNIX users must use "ascii" mode
for ASCII files, and "tenex" or "type L 8" mode for binary files.
MULTICS users can use "ascii" mode for ASCII files, but binary files
require special treatment that is best described by the following
example provided by Paul Schauble <Schauble@mit-multics.arpa>:
!ftp simtel20
220 SIMTEL20.ARPA FTP Server Process 5Z(14)-7 at Mon 10-Sep-84 00:27-MDT
user_ftp: !login anonymous
331 ANONYMOUS user ok, send real ident as password.
Password: !guest
user_ftp: !quote "type l 8" <--(NOTE: That's lowercase "L" 8.)
200 Type L bytesize 8 ok.
user_ftp: !get micro:<cpm.zcpr3>alias.hlp alias.hlp
150 Retrieve of MICRO:<CPM.ZCPR3>ALIAS.HLP.1 started.
226 Transfer completed.
Total elapsed time: 35.7 seconds.
4348 bytes transferred in 18.5 seconds (1850 bits/sec).
user_ftp: !quit
221 QUIT command received. Goodbye.
Lines beginning with "!" are typed by the terminal user. The received
files are stored on MULTICS with one 8-bit byte per 9-bit word, and
can be trans- ferred to a microcomputer with Kermit (described in a
Technical Details
Message-ID:
<44280@beno.seismo.CSS.GOV>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rickReferences:
<2678@altura.srcsip.UUCP> <10134@steinmetz.steinmetz.ge.com> <307@hudson.acc.virginia.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!rick From: rick@seismo.CSS.GOV (Rick Adams) Newsgroups: comp.sys.mac Subject: Re: Help with ftp Message-ID: <44280@beno.seismo.CSS.GOV> Date: 29 Mar 88 23:35:35 GMT References: <2678@altura.srcsip.UUCP> <10134@steinmetz.steinmetz.ge.com> <307@hudson.acc.virginia.edu> Distribution: na Organization: Center for Seismic Studies, Arlington, VA Lines: 103 Summary: If you don't know what you are talking about DONT SAY ANYTHING