How to translate CCSID 65535 in SQuirrel from a DB2 on an iseries

Posted by ZS6JCE on Stack Overflow See other posts from Stack Overflow or by ZS6JCE
Published on 2011-11-24T13:21:14Z Indexed on 2011/11/24 17:50 UTC
Read the original article Hit count: 642

Filed under:
|
|
|

I am new to SQuirrel SQL. I need some help to translating CCSID 65535 into ASCII, UNICODE (or anything human readable)

I am using the JDBC driver per the following guide.


According to IBM's website:

What character conversion issues must my program deal with? The IBM i database uses EBCDIC to store text. Java uses Unicode. The JDBC driver handles all conversion between character sets, so your program should not have to worry about it.

but I think they refer to CCSID 37 and not 65535(Hex).


I have got the following info, from my DB2 DB

Doing DSPFD gives me:

Coded character set identifier . . . . . . : CCSID 65535

Doing DSPFFD gives me:

TXT     CHAR            3       3        41        Both     Text      
Field text  . . . . . . . . . . . . . . . :  Text   Coded Character
Set Identifier  . . . . . :  65535

But the SQuirrel query result for the TXT field is:

5c c1 c4 c4 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 c1 40 7e 40 c2 40 4e 40 c3 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40

Which should be translated to something like:

*ADD                      A = B + C

© Stack Overflow or respective owner

Related posts about jdbc

Related posts about db2