ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Not getting Inserted in Database : Special Character

Post new topic  Reply to topic Goto page 1, 2  Next
 Data Not getting Inserted in Database : Special Character « View previous topic :: View next topic » 
Author Message
hellobond070
PostPosted: Fri Nov 27, 2009 3:42 am    Post subject: Data Not getting Inserted in Database : Special Character Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

I am facing a weird issue. The incoming data with special character comes to the broker flow and it tries to update the database table throwing an exception.
When I try manually to update the table this data with special character gets uploaded in the table.

Details :
- The Special character is à
- Broker and DB2 database on AIX platform
- SQL error : [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

Kindly guide me.
Thanks
Back to top
View user's profile Send private message
AkankshA
PostPosted: Fri Nov 27, 2009 3:50 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

what is the CCSID of your broker...

is it compatible ??

which driver are you using ??
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
hellobond070
PostPosted: Fri Nov 27, 2009 4:07 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

Is there any way i can find it..the ccsid of the broker

What I understand from the issue is the problem doesn't lie in the database part, because manually the same data is getting uploaded.

The problem has to be with the WBIMB. May be we need to cast the data with a ccsid and try updating the table.

Any suggestions.
Back to top
View user's profile Send private message
harish_td
PostPosted: Fri Nov 27, 2009 10:47 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

hellobond070 wrote:
Is there any way i can find it..the ccsid of the broker


mqsiservice <Broker-Name>
Back to top
View user's profile Send private message Yahoo Messenger
hellobond070
PostPosted: Sat Nov 28, 2009 7:12 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

819 is the broker ccsid

I tired using the PASSTHRU statement, but in vain. This did not help.
M still getting driver error.

Any solutions would be highly appreciated.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sat Nov 28, 2009 9:20 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi hellobond070,
hellobond070 wrote:

- The Special character is à
- Broker and DB2 database on AIX platform
- SQL error : [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001
Are you sure this is a CCSID issue ? I would assume data right truncation to be an issue with the data length being greater than the accepted column size...I could be wrong

Usually even if the characters are unrecognizable, they do get inserted as junk into tables.

Regards.
Back to top
View user's profile Send private message Send e-mail
sirsi
PostPosted: Sat Nov 28, 2009 5:58 pm    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

as asked, whats DB2 driver version, codepage supported by your DB2
Back to top
View user's profile Send private message
sirsi
PostPosted: Sat Nov 28, 2009 6:08 pm    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

From pdf "Message Reference":-
"CLI0109E String data right truncation. Explanation: The data specified through SQLSetParam or SQLBindParameter is larger than the maximum size allowed for the corresponding use of a parameter marker. User Response: Respecify the parameter using SQLSetParam or SQLBindParameter."

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.odbc/db2z_fnbindparameter.htm

look into the "Handling encoding schemes" in the above link
Back to top
View user's profile Send private message
hellobond070
PostPosted: Sun Nov 29, 2009 12:09 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

hi all,

Operating System: AIX
DBMS Name : DB2/6000
DBMS Version : 08.02.0009
Driver name : DB2CLI.dll
Driver Version : 08.02.0004

Could you please let me know the way to find out CCSID used by DB2

The data character length has already been checked. I could insert the same data with special character directly into the table from command prompt. But the same job cud not be done by the broker.

Please help.

Thanks
Back to top
View user's profile Send private message
hellobond070
PostPosted: Sun Nov 29, 2009 12:38 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

hi Sirsi,


Quote:
"CLI0109E String data right truncation. Explanation: The data specified through SQLSetParam or SQLBindParameter is larger than the maximum size allowed for the corresponding use of a parameter marker. User Response: Respecify the parameter using SQLSetParam or SQLBindParameter."

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.odbc/db2z_fnbindparameter.htm

look into the "Handling encoding schemes" in the above link

The link you have provided is for ZOS. We r using AIX.

Also its a character issue, so will Encoding help ?? or CCSID should suffice ??
Back to top
View user's profile Send private message
rekarm01
PostPosted: Mon Nov 30, 2009 1:39 pm    Post subject: Re: Data Not getting Inserted in Database : Special Characte Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

hellobond070 wrote:
Details :
- The Special character is à
- Broker and DB2 database on AIX platform
- SQL error : [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001

DB2 string functions count bytes, not characters. Be sure to calculate string lengths and column widths accordingly, particularly for strings that contain multi-byte characters.

Consult the documentation for more details.
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Mon Nov 30, 2009 1:40 pm    Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

R U using dynamic Query?
Back to top
View user's profile Send private message Yahoo Messenger
hellobond070
PostPosted: Tue Dec 01, 2009 3:12 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

Quote:
agrawalamit166 Posted: Mon Nov 30, 2009 1:40 pm Post subject:

R U using dynamic Query?


- Yes its a dynamic query. The flow reads the data from incoming file and updates the database if not already present.


Quote:
DB2 string functions count bytes, not characters. Be sure to calculate string lengths and column widths accordingly, particularly for strings that contain multi-byte characters.

Consult the documentation for more details.


- I went through the documentation and it gives good information. One of them being
DB2 string functions use byte indexing and not character indexing. This means that for Unicode data, the meaning of certain functions differs from the WebSphere Message Broker functions, even though they can be ‘interpreted’.

So the special character in my data is being interpreted at Message broker as well as db2 end. But I guess, the way it is represented at both ends differs.

But this documentation doesn't give me the solution.

The DB2 uses 819 ccsid which is the same as Broker ccsid in my case.

Please advise !!!!
Thanks
Back to top
View user's profile Send private message
sirsi
PostPosted: Tue Dec 01, 2009 8:17 am    Post subject: Reply with quote

Disciple

Joined: 11 Mar 2005
Posts: 177

kindly tell us the flow logic, i mean input file is modelled in MRM? how are u accessing the field which you are inserting into db...etc
Back to top
View user's profile Send private message
hellobond070
PostPosted: Tue Dec 01, 2009 8:36 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

Hello Sirsi,

We have a flat file coming in which is parsed by a message set in MRM domain. The whole file needs to be updated in the database.

The error occurs exactly at the point of insertion by the sql quesry written in the esql file into the database.

As previously said, if I try to enter the special character into the database table directly it does get inserted without issues. The message broker is able to read the character correctly since I dont see issues if I get it printed using the trace node.

Any suggestions guys or anything that I can try to see if I can get this working. Looks challenging.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Data Not getting Inserted in Database : Special Character
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.