DB2 API Stage - Warnings

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
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

DB2 API Stage - Warnings

Post 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
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

Post 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
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_search2008
Participant
Posts: 75
Joined: Thu Nov 27, 2008 10:12 am

Post 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
Post Reply