Page 1 of 1

DB2 API Stage - Warnings

Posted: Wed Aug 19, 2009 1:36 am
by ds_search2008
Dear Experts,

I'm using PX Version 8.1 and the following warnings are shown in the Director log against my target DB2 stage.

Code: Select all

DB2_TGT: [IIS-CONN-DAAPI-000253] Writing the WCHAR column CUST_ID into a CHAR database column can cause data loss or corruption due to character set conversions.

Code: Select all

DB2_TGT: [IIS-CONN-DAAPI-000249] The length of WCHAR column CUST_ID cannot be validated because the database column is CHAR and character set conversion is involved. Inadequate column lengths can lead to data truncation or unexpected errors.
Any suggestions please.

Many thanks and kind regards

Posted: Wed Aug 19, 2009 1:48 am
by Klaus Schaefer
What is your question? The message says it all: your source field as VARCHAR may be longer than the target DB2 CHAR field...

You are informed that truncation may occur, i.e. your data may be "corrupted"...

Klaus

Posted: Wed Aug 19, 2009 6:15 am
by ds_search2008
Hello Klaus Schaefer thanks a lot for your valuable suggestion.

Sorry for the confusion. Actually I'm using a DB2 Connector stage Under DB2 UDB category prior to DB2 API. The final stage in my job is a DB2 API stage referring to a different table.

The table details given in DB2 connector stage meta data conforms with the source meta data. However, I'm getting warnings (as mentioned in my previous post) for all Char and Varchar columns. For date columns I'm not getting any warning message.

Can you please help me to suppress these warnings.

Many Thanks & Kind Regards

Posted: Wed Aug 19, 2009 6:21 pm
by ray.wurlod
You appear to have a mix of WCHAR and CHAR data types, and to be transferring data between them. WCHAR may require more than one byte per character for storage; DataStage is alerting you to that fact and the subsequent possibility that data conversion errors might occur. If you are 100% confident that the actual values in your data will be OK, then you can use a message handler to demote this alert message to informational.

Posted: Thu Aug 20, 2009 3:08 am
by ds_search2008
Hello Ray,

Thank you very much for your time and solution. I have suppressed my warnings now.

For the benefit of anybody who is facing similar issue:

Steps to change Warnings to Info:(These steps are recommended only if the warnings are informational. Not for real warnings! :wink:)

Step:1 - Goto Director Client
Step:1a - Select the warning message right click
Step:2 - Select "Add rule to message handler..." option
Step:3 - By default "Add rule to local runtime handler for job <<jobname>>. Rule takes effect next time the job is run" radio button is selected
Step:4 Select "Action-->Demote to Informational" option
Step:5 Click "Add Rule" button

Click "Next" button at the bottom and repeat the steps mentioned above if there are multiple warnings.

Refresh Director window. Run the job again. Now we can see that all the warnings are converted to Info.

Amazing!!!!

Thanks a ton and Kind regards