Ryan,
Okay, so even though you didn't tell me which column you are having
issues with I am going to assume it is the ABALKY column that has the
problem. I *BELIEVE* the issue is the code page of 65535. Really
that should probably be code page 37 (US English) like the other
fields, but someone may have accidently? made the wrong code page
value. Code page 65535 from what I can tell means that it should be
treated as binary data. Here is a snippet that leads me to believe
that:
*HEX: The CCSID 66535 is used, which indicates that the character data
in the fields is treated as bit data and is not converted.
This is from this page:
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/cl/crtsrcpf.htm
So as I see it you have two options.
1. Change the code page for that column to 37 like the other CHAR
columns (this would require potentially a lot of work, any RPG program
that is bound to that table or CHAIN to it would have to be recompiled
I assume, but I'm not an RPG master but this is one of those things I
despise the AS400 for).
2. Add a flag to your connection string to tell it how to convert
binary data. This is probably the simplest option. adding
TRANSLATE=1; to your connection string should fix the issue. (see the
third link below for why).
See here for more information:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzaii/rzaiiodbc53.htm
http://www.ibm.com/developerworks/data/library/techarticle/dm-0506chong/index.html
and finally the good part:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaik/rzaikconnstrkeywordstranprop.htm
Isn't the AS400 FUN!!!! (I'm being very sarcastic here).
On Aug 19, 12:39 pm, rhartzog <
rhart...@gmail.com> wrote:
> Thank you MattO, here is the information you have requested:
>
> Key column:
> Column: ABAN8
> Data Type: Zoned
> Field Length: 8 0 (yes a space is between those two numbers)
> Code Character Set: null
>
> No problems displaying information:
> Column: ABALPH
> Data Type: CHAR
> Field Length: 40
> Code Character Set: 37
>
> Problems displaying information:
> Column: ABALKY
> Data Type: CHAR
> Field Length: 20
> Code Character Set: 65535
>
> 2) I took a screenshot of my hibernate.cfg file:
http://lh5.ggpht.com/_HHLbJSECQBs/TG1nAn5p8FI/AAAAAAAAATY/dqugRhiflhA...
>
> 3) -- Generate SQL
> -- Version: V5R4M0 060210
> -- Generated on: 08/19/10 12:04:01
> -- Relational Database: DWHOMES
> -- Standards Option: DB2 UDB iSeries
> CREATE TABLE TESTDATA.F0101 (
> -- SQL150B 10 REUSEDLT(*NO) in table F0101 in TESTDATA ignored.
> ABAN8 NUMERIC(8, 0) NOT NULL DEFAULT 0 ,
> -- SQL150D 10 EDTCDE in column ABAN8 ignored.
> ABALKY CHAR(20) CCSID 65535 NOT NULL DEFAULT '' ,
> ABALPH CHAR(40) CCSID 37 NOT NULL DEFAULT '' , ...
>
> 4) Looks like V5R4 from item #3 above. I am using version 12.0.0.0 of
> the IBM.Data.DB2.iSeries.dll
>
> 5) A screenshot of the mapping file. I have tried various definitions
> with the problematic column.
http://lh5.ggpht.com/_HHLbJSECQBs/TG1r1AGDT2I/AAAAAAAAATk/ceHT9vWi3_I...
> > > greatly appreciated.- Hide quoted text -
>
> - Show quoted text -