IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTPing EBCDIC with latin chars to unix


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harikiranr

New User


Joined: 08 Sep 2008
Posts: 4
Location: Chennai

PostPosted: Tue Sep 09, 2008 5:49 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 09, 2008 8:10 pm
Reply with quote

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
View user's profile Send private message
harikiranr

New User


Joined: 08 Sep 2008
Posts: 4
Location: Chennai

PostPosted: Wed Sep 10, 2008 2:32 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Sep 10, 2008 4:52 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts EBCDIC and ASCII CICS 7
No new posts XYplorer - EBCDIC to ASCII translatio... All Other Mainframe Topics 0
No new posts EBCDIC to ASCII conversion help All Other Mainframe Topics 1
No new posts EBCDIC (0037) to/from UTF-8 (1208) CLIST & REXX 2
Search our Forums:

Back to Top