Page 1 of 2

UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 12:22 pm
by raghav08
Hello,

The UNIX based application sending a flat file to mainframe using FTP. The file contains some currency symbols like Pound, Euro etc.

But if I open the FTP received dataset in mainframe, those currency symbols appears with additional characters even though file sent in EBCDIC format.

Please let me know how to address this issue.

Thanks

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 2:56 pm
by Robert Sample
Please let me know how to address this issue.
Since you did not provide any examples of what you meant by "additional characters", we cannot tell you how to address the issue. Without something to look at, what do you expect us to do?

Further, standard EBCDIC on a mainframe is code page 037. This code page does not contain the Euro symbol, which is found on code page 1140 (among others). If your file on the mainframe is using code page 037, you will NEVER, under any circumstances, see a Euro currency symbol. Your best bet, considering code pages can be a very complicated subject and at least partly determined by how the site is configured, would be to talk to your site support group and get their assistance in making sure your file is using the right code page.

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 4:59 pm
by raghav08
Thanks for your reply.

I don't know much about code page numbers, but I edited a test dataset and inserted x'B1' and x'B2' and saved.I can see the Pound & Yen symbols, but not Euro (x'20'). x'20' diplayed as '.' (dot)

Thanks.

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 5:59 pm
by Robert Sample
Code page 1140 shows the euro symbol as X'9F', not X'20'. X'20' in EBCDIC is down in the communications control characters and almost certainly is NOT the euro symbol on any code page since it has been assigned a different value for probably 40+ years.

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 6:19 pm
by raghav08
In practice,is there any chance like currency symbols (Pound,Euro,Yen etc) are represented using two byte format & rest of characters are in single byte in one record.

Please advice

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 6:23 pm
by Robert Sample
Theoretically, DBCS could do this. Shift-in (X'0F') and Shift-out (X'0E') are used for DBCS but I've never had to deal with DBCS and that's about the extent of my knowledge.

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 6:38 pm
by raghav08
I had glance about UTF concepts,but still confusion on UTF-8 & UTF-16. Suppose a character string represented by UTF-16, does it mean that each charater field takes 2 bytes mandatory or it may take 1 or 2 byte based on character type.

I'm just trying to correlate is there any chance like those currency symbols are in UTF-16 and rest are all uses one byte.

This issue is real nightmare, please help

Re: UNIX-Mainframe FTP

PostPosted: Wed Jun 29, 2011 8:05 pm
by BillyBoyo
If you are getting all your currency symbols on the Unix side (which I assume you are) then there will be some way to do it.

Firstly, there is (I expect, maybe Robert can confirm) the possibility of having your own specific code-page. I had a similar problem a few years ago, with a Tandem machine using UK ASCII, COMMS gear using European ASCII and Mainframe using American EBCDIC(!).

We had two and theree character alpha codes for currencies, but no-one (before I worked there :-) ) gave any thought to currency symbols in stock names, which were scrambled daily.

Once everything was in line, everything worked. This was DOS/VSE, but I imagine the same priciple.

So, if you can get your own code page (and remember about going back, just so you're ready for files in the other direction) your problems will be over.

So, first step is some research, then a polite request to your systems' guys.

If you can't get anywhere that way, then there will be other ways.

When you do checking of solutions, use a single record file with values from 00 to 7F or FF (depending on the ASCII) so that you can see what will happen to every byte. By all means set up the file and try it with UTF-16.

Re: UNIX-Mainframe FTP

PostPosted: Thu Jun 30, 2011 11:34 am
by raghav08
Thanks for your reply, let me find the code page details for normal characters & special currency symbols from both UNIX & Mainframe systems.

I will update you the status.

Re: UNIX-Mainframe FTP

PostPosted: Thu Jun 30, 2011 3:27 pm
by Robert Sample
Firstly, there is (I expect, maybe Robert can confirm) the possibility of having your own specific code-page.
An FTP transfer can use its own translation table, and that translation table is built from the sending and receiving code pages. The details are in the Communications Server bookshelf, IP User's Guide manual I believe. Search the manual for TCPXLBIN -- and plan on getting your site support group to help you, as code page translation tables can be complex.