All Forums Database
Rafael Longo 4 posts Joined 08/07
31 Aug 2007
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

Jim Chapman 449 posts Joined 09/04
31 Aug 2007

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.

You must sign in to leave a comment.