Operating System - HP-UX
1822496 Members
2697 Online
109642 Solutions
New Discussion юеВ

Ftp file formats supported

 
SOLVED
Go to solution
Alan Casey
Trusted Contributor

Ftp file formats supported

Hi,

I would like to know what text file formats ftp supports.
I use ftp to appent text files on a mainframe host. Does this editing (I guess it uses vi/ex) support any ASCII? and is there full or limited capability for UTF-8?
Thanks
5 REPLIES 5
Peter Godron
Honored Contributor
Solution

Re: Ftp file formats supported

Alan,
ftp transfer modes are ascii or bin.
If you are editing files on different platforms I would always use the ux2dos facility to translate UNIX files to DOS formatting.

If you are asking due to Oracle:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1043327
Yogeeraj_1
Honored Contributor

Re: Ftp file formats supported

hi alan,

ftp supports the ASCII, binary, and tenex File Transfer Protocol types. ASCII is the default FTP type. (It should be noted though that, whenever ftp establishes a connection between two similar systems, it switches automatically to the more efficient binary type.)

Also, by specifying "cr", this toggles carriage return stripping during ascii type file retrieval. Records are denoted by a carriage-return/line-feed sequence during ascii type file transfer. When cr is on (the default), carriage returns are stripped from this sequence to conform with the UNIX single line-feed record delimiter. Records on non-UNIX remote systems may contain single line-feeds; when an ascii type transfer is made, these line-feeds can be distinguished from a record delimiter only when cr is off.

(these are from man ftp)

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Bill Hassell
Honored Contributor

Re: Ftp file formats supported

ftp 'supports' all file types in binary but will not translate anything except ASCII. Here's how it works:

When you specify ASCII as the transfer method, each end of the ftp transfer knows it's own special format for handling an ASCII file. When a record is read from host1, just the data is placed into the stream along with information about the length of the record. Then host2 sees this record and writes it to the destination file using local libraries to properly format the file at the destination. In esscence, all special codes (fixed length, variable length, blocked, etc) are removed during the transfer.

As far as character sets, there is nothing in ftp to process or translate characters. When BINARY is selected, the result is the same pattern of data stored on the destination.

vi/ex has no relationship to ftp.


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: Ftp file formats supported

Shalom Alan,

Bill's explanation I understand.

I avoid thinking about this by using openssh sftp whenever possible. It gets the file translation right every time.

Both sftp and ftp on the client and server side are general purpose tools that can transfer anything that is actually a file.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
BUPA IS
Respected Contributor

Re: Ftp file formats supported

Alan,
If the mainframe is IBM, the ftpserver handles the text translation for ASCII to EBCIDIC for ascii mode files and back again, as well as stripping off (or adding) CR and or LF as required by the target platform. If you need another translation table this can be enabled from a stanadard list. It uses the C language translate function. It does not use vi since this a unix land utility . Whilst you are connected try the command quote stat this will list every setting for the session including a line like this listing the codepages in use
211-SBDataconn codeset names: IBM-285,IBM-850
accdoring to the ibm manual utf-8 is supported with some restrictions the UTF-8 setting can be overidden by the client .
look on this site (its starts a java applet)
http://publibz.boulder.ibm.com/bookmgr_OS390/libraryserver/zosv1r7/
navigate to Communications Server on the left then open that
and then choose
z/OS V1R7.0 Comm Svr: IP User's Guide and Commands
chapter 4 part 5 lists data coversions options you want SBCS

chapter 5 lists all the ftp commands and options for mainframe land and unix land .
I hope this helps
Mike

Help is out there always!!!!!