Page 1 of 1

Codepageconversion for BINARY fields in DB2 stage - why?

Posted: Thu Jan 31, 2008 2:37 am
by MT
Hi,

I can not understand the DataStage logic in DB2 stage when working with BINARY data, maybe one can help me or maybe it is a bug?

When I select binary data (DB2 datatype: CHAR FOR BIT DATA) in my DB2 stage - having NLS UTF8 - it will result in a NLS Mapping error in the log.
This means that DataStage will do a codepage conversion for BINARY data! It do not think that this is correct.

To double check I tried the same with the DB2 stage set to NLS NONE and it work fine with the expected result for the binary column. But now I do not know if the other input columns are processed as expected...

I my understanding a binary data type should never be converted or influenced by the codepage.
So I would expect that the DB2 stage (set to NLS UTF8) should convert every column but never BINARY fields. - Correct?

Thanks in advance

Michael

Posted: Thu Jan 31, 2008 7:29 am
by ray.wurlod
Welcome aboard.

All the documentation I've read suggests that binary data types are not supported at all in server jobs. So the fact that you're reading them at all is a bonus.

It is possible to set NLS maps on a per-column basis, though it will slow processing marginally. I can only suggest that you experiment with NONE and UTF8 on your non-binary fields as well.

Posted: Thu Jan 31, 2008 11:03 am
by MT
Hi Ray

thanks for the reply. I havn't read this - where can I find it?
I browsed through the DB2 stage documentation and it is clearly stated that the DB2 datatype CHAR FOR BIT DATA maps to the DataStage type SQL_BINARY.
So the question is still why DataStage does not exclude the binary data from codepage conversion routines.....

Thanks in advance
Michael

Posted: Thu Jan 31, 2008 4:13 pm
by ray.wurlod
I haven't played with version 8 yet but, in ODBC.H (in version 7.x and earlier) only the twelve data types that are supported are enumerated. Provision is made for Binary, VarBinary and LongVarBinary, but they are disabled in 7.5.1A (which I'm working with this week). Further it's an Oracle shop, so no DB2.

Have you reported your concern through your support provider?