Codepageconversion for BINARY fields in DB2 stage - why?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Codepageconversion for BINARY fields in DB2 stage - why?

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply