Different query output between windows system and MVS system!!

Database

Different query output between windows system and MVS system!!


Hello,

When I issue a select statement on Windows, using Teradata SQL Assistant, I get the following data (hexadecimal dump using char2hexint function):

...65 64 2E 0D D5 0D D5 48 65...

When I issue the same select statement on Mainframe, using BTEQ, I get the following data (hexadecimal dump using TSO/ISPF "HEX ON" command):

...85 84 4B 0D 15 0D 15 C8 85...

The Original data was inserted from Mainframe (It was EBCDIC data).

When issued via SQL Assistant (Windows), the EBCDIC-to-ASCII conversion is fine, except for the EBCDIC-NL character (x'15') that becomes x'D5'. Shouldn't it become a ASCII-LF character (x'0A').

This problem is driving me crazy. I need to get a correct conversion from EBCDIC NL to Ascii LF as it should be expected.

Can anyone provide any thoughts? It would be very appreciated...

Thanks in advance,
Rafael
1 REPLY

Re: Different query output between windows system and MVS system!!

Unfortunately, there is no single accepted standard "newline" encoding in ASCII. Newline interpretation varies by OS, application, toolset, and display device. Some recognize LF as a newline; some expect a CR-LF sequence. The ASCII LF (0x0a) translates to the EBCDIC LF (0x25) and vice-versa. The EBCDIC NL (0x15) has no ASCII equivalent.