Page 1 of 1

Character set conversion in DataStage job

Posted: Tue Nov 22, 2011 3:18 am
by LD
Hi,

My job is reading data from Oracle DB in Western European character set and writes it to a flat file.

Now in another job I want to read this file and write the data to another file through a transformer in between, but in UTF8 character set this time. I tried changing the NLS map to UTF8 in the target sequential file but didn't work. The characters in o/p file are not same as i/p file, mainly special characters.

Please let me know if this is possible to convert character set of data on the fly in a DS job.

Thanks,
Shashank

Posted: Tue Nov 22, 2011 4:11 am
by ray.wurlod
In general, no. The only yes is where the character sets are compatible and, even then, you may need Oconv(string,NLSmapname) type conversions for non-numeric data. What character set are you using on the DataStage input?

Do you have any locale-related specificities, such as date formats, currency, decimal representations, casing conventions, etc? All these can also be handled by setting the NLS locale, if not for the job then at least for the Transformer stage.

Posted: Sun Nov 27, 2011 11:03 am
by paultechm
Use stringtoUstring(colunname,'UTF-8') with column datatype as nvarchar

Regards,
Paul Joseph

Posted: Sun Nov 27, 2011 11:56 am
by chulett
In a Server job?