setting environment variable from a sequence

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
ayan
Participant
Posts: 64
Joined: Fri Oct 23, 2009 4:09 am

setting environment variable from a sequence

Post by ayan »

Hi,

I have a job that loads chinese data in oracle 10g db.For the loading to happen correctly I need to set the NLS_LANG value in datastage box to AMERICAN_AMERICA.AL32UTF8.I know that it can be done in a script i.e I set NLS_LANG for that session and call the job using DSJOB.But is there a way to do it within a sequence ? If I set NLS_LANG in a command stage and then run the job (within a sequence),will it work?Will the session be same for both command stage and job activity stage?


Regards,
Ayan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No. Create NLS_LANG as a user-defined Environment Variable in the Project and set it to $ENV. Then add it to your job and override the default value there to whatever you need it to be.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does AMERICAN_AMERICA.AL32UTF8 really handle Chinese characters?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ayan
Participant
Posts: 64
Joined: Fri Oct 23, 2009 4:09 am

Post by ayan »

Ok,will set it in Administrator. Ray,it works.I was able to load it in oracle db(10G).Only problem I faced is that ,while querying toad I wsa not able to see the chinese data.But after using sql developer/isqlplus,data was getting correctly displayed.Don't know whether it's a toad problem or any extra configuration is needed.
Ayan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

My guess is that it's a limitation of TOAD.

Which, to be fair, was never originally written with the intention of displaying anything but ASCII characters. Hence the existence of derivatives.
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