Networking
1753734 Members
4690 Online
108799 Solutions
New Discussion юеВ

Re: cannot transfer CSV Files from linux to windows correctly

 
SOLVED
Go to solution
Jon Finley
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly

You are going to have to convert from EBCDIC to ASCII.

MS
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q216/3/99.ASP&NoWebContent=1

Linux
Look at the man page for dd On Solaris, you can use the conv switch to have dd translate ebcdic to ascii.
http://www.uwsg.iu.edu/usail/man/solaris/dd.1.html

Jon
"Do or do not. There is no try!" - Yoda
Victor BERRIDGE
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly


Since to file is ok on your linux I believe ther is no problem from IBM side (have you tried conv=unblock?).
I noticed some time ascii files get corrupted when big amounts in MS...
Try to download a winzip(compatible like zip) on your linux and compress and transfer in binary

What does that give you?

All the best
Victor
'chris'
Super Advisor

Re: cannot transfer CSV Files from linux to windows correctly

conv=unblock doesn't help.

transfer of zip files doesn't help in my case.
I must transfer ascii these files, otherwise cannot be processed on the remote site.
Jon Finley
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly

hmmm... on the linux side, in FTP, try setting type to EBCDIC.

Jon
"Do or do not. There is no try!" - Yoda
'chris'
Super Advisor

Re: cannot transfer CSV Files from linux to windows correctly

and how can I convert the file to EBCDIC ?
Victor BERRIDGE
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly

Hi chris I dont believe it has something to do with ebcdic but if you want to try for fun its dd conv=ebcdic...
There is one thing we havent tried yet, its the option tenex with ftp:
230 User vbe logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> tenex
200 Type set to L (byte size 8).
ftp>

What does this give you?

All the best
Victor
Antoniov.
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly

Chris,
reading your post about file before (on IBM) and after (on Windows) I guess you have not problem from EBCDIC and ISO, because first line is the same.
I guess different character is ISO_LATIN1 (on unix/linux box) and PC* on Windows.
For best solution, you could prepare on IBM a simple file with one line and with only letters, number and no any other (no accented letters, so symbols, etc).
Then you could post the 2 files (before and after): if I see right there are no difference.
Then you can make another file with a symbol (for example accented vowel) and repeat the compare.
Also, when you import into Excel, you must choice ANSI source format instead windows format.

Antonio Vigliotti
Antonio Maria Vigliotti
Victor BERRIDGE
Honored Contributor

Re: cannot transfer CSV Files from linux to windows correctly

Chirs,
Since when you have fiddled your linux and it worked then after reboot it messed up again I wonder if the solution is not in your env: try setting the choice of a charset in hpux I would do:
export LC_ALL=C.iso88591

Here is some info from reflection ftp client:
The FTP Client can translate between the client and the server character sets, so using characters that exist in both sets preserves the most characters. There are two basic issues for deciding if the FTP Client should translate between the server and client character set:

├В┬╖ The source of the characters.

├В┬╖ The destination for the characters.

The need to translate characters is dictated by differences between the character set used by the source and the character set used at the destination. In most situations, no translation is necessary:

├В┬╖ If both client and server use the DOS character set, no translation is necessary.

├В┬╖ If the client uses the Windows character set and the server uses the ISO-Latin-1 character set, no translation is necessary.

(c) 1998-2004 WRQ, Inc.

This may answer to your question "what does xftp do more"... (checks for char-set compatibilies ?...)

I believe the locale I gave you is ISO-Latin-1 equivalent but Im no specialist

Kind regards