Page 1 of 1

DB2 Bulk stage - NLS settings

Posted: Thu Sep 24, 2015 12:23 pm
by dineshdurai2
Hello Experts,

Need your help to resolve this issue. My job design is like this

Extract Job:
DB2 table --> transformer ---> Dataset

Load Job:
Dataset --> transformer --> DB2 bulk stage

in one of the source column, the value is like "602 - MBM OKLAHOMA CITY   02" and the same is passed until the transformer in load job. but when it is getting loaded to DB2 table through bulk stage it is getting loaded as "602 - MBM OKLAHOMA CITY   02"

default NLS Map Name is UTF-8 in the target db2 bulk stage.

require your expertise here to resolve this issue. Thanks in advance.

Thanks
Dinesh

Re: DB2 Bulk stage - NLS settings

Posted: Thu Sep 24, 2015 1:15 pm
by MT
Hi Dinesh,

it is always a little hard to say where the stuff gets converted or lost - so it is not enough to look at the db2 stage where you load it.
default NLS Map Name is UTF-8 in the target db2 bulk stage.
Having UTF-8 for the database and as NLS in the DataStage job
you could use the DB2CODEPAGE set to 1208 as etra Parameter in your job. This should do.

Posted: Thu Sep 24, 2015 1:57 pm
by dineshdurai2
Additional Information:

we are migrating datastage jobs from version 7.5 to version 9.1 and we are doing a parallel testing.. to make sure the results generated by v7.5 jobs and v9.1 jobs are same.

the same load job loads it correctly in the table from v7.5 but the issue is only when we load table through v9.1 job.

same target table and source table.

Posted: Thu Sep 24, 2015 2:07 pm
by dineshdurai2
Hi Michale, i replaced the DB2 bulk stage with the sequential file in the load job and ran it. I was able to see the expected value in the sequential File.

it only gets converted when it is processed/loaded to the DB2 table through DB2 bulk stage.

Posted: Thu Sep 24, 2015 11:28 pm
by MT
Hi

ok two more things you could do:
  • - You said that you viewed the file - did you use DataStage View...? If so I stongly recommend to do it natively on the OS because DataStage View will already interpret the data.
    - I would also strongly recommend DB2 Connector stage if you work with DB2
Your database is UTF-8?
It it the same Database you used before migration?

Posted: Fri Sep 25, 2015 8:07 am
by dineshdurai2
ac

Posted: Fri Sep 25, 2015 8:08 am
by dineshdurai2
1) I viewed the data in the OS directly.. it showed me the expected value.
2) Yes the Database is UTF-8
3) Yes, it is the same database.

Sure, I will change the DB2 Bulk to connector stage and see what happens.

Incase, If i have to change the NLS settings.. what is preferred ? to handle this kind of data.

Posted: Fri Sep 25, 2015 8:32 am
by MT
Hi,

as you write that you migrate from 7.5 so I recommend to set
DB2CODEPAGE 1208 as job parameter