|
View previous topic :: View next topic
|
| Author |
Message |
harikiranr
New User
Joined: 08 Sep 2008 Posts: 4 Location: Chennai
|
|
|
|
Hi,
I have a file which contains Latin characters in it (eg., N with ~ on top etc.,) when i ftp the file to unix box the latin chars alone are substituted with other chars (like ¬).
Do some one has a resolution for this.
Thanks,
Hari |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Hari and welcome to the forums,
| Quote: |
| Do some one has a resolution for this. |
When data is ftp'd from the mainframe to the unix system, it is converted from ebcdic to ascii. Your "latin" characters have a hex value that translates to the unwanted ascii character.
Do you know which hex value on the unix system represents the "Latin N"? Are there many?
You might talk with your network support people to see if there is a code page that provides the conversion you need. Otherwise, you may want to convert the Latin N (etc) to standard characters before downloading.
You could also transmit the file in binary and handle the conversion on the unix system. |
|
| Back to top |
|
 |
harikiranr
New User
Joined: 08 Sep 2008 Posts: 4 Location: Chennai
|
|
|
|
Thanks for that!!!
I ahve transformed the file to UCS-2 and ftp'ed it in binary mode, i am getting the characters right.
Here again there is an issue all the records are coming together. I mean the CR anf LF are not getting ftp'ed (i believe).
I know that this is the nature of binary mode, but is there any way to retaint the CR and LF. So, that i can get the records in the way there are before ftp.
Thanks,
Hari |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
CR/LF are PC concepts that are not applicable to mainframe. Unix, by the way, uses LF but not the CR. Probably the CR and LF aren't getting transferred because they don't exist on the mainframe file.
If your file is fixed record size on the mainframe, it's a fairly trivial process on a PC to chop the file back into records. If the file is variable record size on the mainframe, binary transfers are problematic due to the different way record sizes are determined between platforms.
Suggestion: find the Communications Server User's Guide manual and read about the SBDATACONN option of FTP. This allows you to change the code page while FTP is transferring the data. |
|
| Back to top |
|
 |
|
|