Page 1 of 1

Writing the WVARCHAR column into a VARCHAR database column

Posted: Thu Aug 23, 2012 8:53 am
by ujala
Hi all,
I have job that extracts data from DB2 and loads into MySQL using IBM Data Direct ODBC Driver.After successful completion of the job,I got the following error message:
"Writing the WVARCHAR column into a VARCHAR database column can cause data loss or corruption due to character set conversions.".

I strongly feel problem is with the table creation,
I tried using UTF8 but the same problem persists.

So Please let me know any solution for the above issue.

Posted: Thu Aug 23, 2012 9:15 pm
by ray.wurlod
Convert from ustring to string within your DataStage job, using either a Modify stage or a Transformer stage.

warning across all jobs

Posted: Fri Aug 24, 2012 12:20 am
by ujala
This issue persists with respect to environment and persists across all the jobs in different environment,
I tested in local environment it works fine.
But in client environment it throws the above warning

Locally i faced this issue but was solved by appending utf 8 to create table, but the same does not work in client side.

Tried removing that too, but same result

Posted: Fri Aug 24, 2012 1:01 am
by ArndW
Did you follow Ray's suggestion. I haven't been to a site yet where this approach didn't work.

Posted: Fri Aug 24, 2012 1:18 am
by ujala
That will work but my concern is to get it done through table creation such that there will no modification required in all the jobs.

so u mean to say that we will not be able to do through table creation scripts

Posted: Fri Aug 24, 2012 1:22 am
by ArndW
I haven't looked into the database DDL scripts, but if you keep all of your databases in the same character set plus do the same for DataStage then no conversion will be necessary and correspondingly no warnings will be produced.

Posted: Fri Aug 31, 2012 6:51 am
by ujala
Hi all,
I developed a job that extract the data from source and loads into target without any transformation logic.But i used RCP in my job.After successful completion,I got the following warning message
"Writing the WVARCHAR column into a VARCHAR database column can cause data loss or corruption due to character set conversions.".How to solve this warning

Posted: Fri Aug 31, 2012 7:12 am
by ArndW
In this case you ARE converting from WVarChar to VarChar, and since you are doing a generic job using RCP you cannot get rid of the message. But you can deprecate the warning message to an informational one either at a job level or at a project level using the DataStage message handlers.

Posted: Fri Oct 12, 2012 12:43 pm
by haylo75
I ran across the same issue, and tried conversion in a Transformer using UStringToString to no avail. I then realized that column metadata captured in my source data had the column in question declared as VarChar(10) non-Unicode. Adding Unicode to the Extended Properties for the offending column fixed it for me.

Posted: Tue Oct 21, 2014 8:37 am
by battaliou
We had a similar problem recently using ODBC connector against i-series non-journalised tables. The fix here was to set ODBC setting 'Isolation level' to Default.