> >i thought the way it worked was that if you specify 'ascii', then the ftp on
> >your box put your ascii file into a format common to all ftp (telnet format,
> >i think), and the receiving box's job was to convert that to whatever
> >'ascii' means in it's own world. that is what makes ftp so universally
> >used - you don't have to guess who was on the other end of the wire.
The opposite of "ascii" in FTP is "binary" (which basically means send
the file "as is"). "ascii" doesn't mean quite what you think it does.
There is some agreement as to what "ascii" means, largely because FTP
grew up on unix - bare linefeeds represent new lines, etc. If you get
beyond 7 bit ascii, your guess is as good as mine as to how it is handled.
Basically, anybody who uses a "non-standard" (and relize that this is
pretty fuzzy) character set (oh like say EBCDIC) is responsible for
doing any required translation. In the case of MVS, if you are FTPing
in "ascii" mode, then it is your mainframe's FTP daemon (if you are
FTPing into the mainframe) or FTP client (if you are FTPing into unix
from the mainframe) who will translate from EBCDIC to ASCII.
About 5 years ago (at a previous job) I was knee deep in FTPing files
between unix and MVS. I found MVS's EBCDIC to ASCII translation table
to be woefully inadequate. I ended up writing my own and having the
MVS folks install it (they would not make it the standard table, I
had to issue a "quote site" command to pick the translation table that
I wanted). It's been so long ago, I'm not sure I could even dig up
my old translation table. The stock standard one (and maybe IBM has
changed this) assumed the orginal PC ascii (and my suns were using
ISO-Latin-1 ascii) when downloading and 7 bit ascii when uploading.
I could not believe it myself - they used a different translation table
for uploading and downloading, and their tables did not have 1:1
Quote:> >i thought if you use the dd option to convert ascii to ebcdic, then you just
> >did what ftp would have done anyway. (if you use dd to do blocking, etc.,
> >that's another matter).
In theory maybe. If you have very simple text (a-z,A-Z,0-9) then perhaps
it is equivalent. The major difference is where the translation happens:
on the mainframe when it is sending the file or on your unix box when you
process the incoming/outgoing file. If you have very simple text (I missed
the start of this tread), ask yourself where you want to spend the CPU?
I don't know anyone who actually uses dd for very much but very simple
reports. Everyone I know who is seriously moving data between ASCII and
EBCDIC tries to use dd, and after a month or so, they invariably go out
and write their own translation program.
Garry J. Garrett
CSG Systems, Inc. ._o see my homepage for a "mailto:" tag
2525 North 117th Ave. |> to send me e-mail...
Mailstop 2-A 4
Omaha, NE 68164-3679
CSG Systems - http://www.csgsys.com/
CSG Internal - http://intranet/unixops/
My Homepage - http://monarch.papillion.ne.us/~ggarrett
I do not speak in any capacity on behalf of CSG Systems.
I get into enough trouble speaking for myself.