DB2 Bulk stage - NLS settings

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dineshdurai2
Participant
Posts: 5
Joined: Thu Sep 24, 2015 11:01 am

DB2 Bulk stage - NLS settings

Post 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
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: DB2 Bulk stage - NLS settings

Post 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.
regards

Michael
dineshdurai2
Participant
Posts: 5
Joined: Thu Sep 24, 2015 11:01 am

Post 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.
dineshdurai2
Participant
Posts: 5
Joined: Thu Sep 24, 2015 11:01 am

Post 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.
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post 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?
regards

Michael
dineshdurai2
Participant
Posts: 5
Joined: Thu Sep 24, 2015 11:01 am

Post by dineshdurai2 »

ac
Last edited by dineshdurai2 on Fri Sep 25, 2015 8:09 am, edited 1 time in total.
dineshdurai2
Participant
Posts: 5
Joined: Thu Sep 24, 2015 11:01 am

Post 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.
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post by MT »

Hi,

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

Michael
Post Reply