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 » Unreadable characters stored in DB2 when issued INSERT ESQL

Post new topic  Reply to topic
 Unreadable characters stored in DB2 when issued INSERT ESQL « View previous topic :: View next topic » 
Author Message
mfbws61
PostPosted: Wed Oct 07, 2009 10:55 pm    Post subject: Unreadable characters stored in DB2 when issued INSERT ESQL Reply with quote

Newbie

Joined: 07 Oct 2009
Posts: 3

I am issuing following ESQL statement from WMB. Database server and WMB are installed on same OS (RHEL 5). Issue is that when i select records from database, i see distorted characters.

ESQL Command:
INSERT INTO Database.MSGSTORE.MQSIUSER.COMPLAIN(MSGID,RECEIVED,MESSAGE) VALUES(Root.MQMD.MsgId, CURRENT_TIMESTAMP, ASBITSTREAM(Root));

Kindly note that CURRENT_TIMESTAMP field is showing right characters.

Would appreciate your help
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 07, 2009 11:01 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You are not using ASBITSTREAM correctly.
Back to top
View user's profile Send private message
mfbws61
PostPosted: Thu Oct 08, 2009 1:09 am    Post subject: Reply with quote

Newbie

Joined: 07 Oct 2009
Posts: 3

mqjeff wrote:
You are not using ASBITSTREAM correctly.


But Root.MQMD.MsgId is distorted as well....
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Oct 08, 2009 1:19 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What are the datatypes of the DB2 table you are trying to insert into

This WILL have a bearing upon the way you do the insert (esql code etc)

I have done this several times and a little experimentation does work wonders.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mfbws61
PostPosted: Thu Oct 08, 2009 1:24 am    Post subject: Reply with quote

Newbie

Joined: 07 Oct 2009
Posts: 3

smdavies99 wrote:
What are the datatypes of the DB2 table you are trying to insert into

This WILL have a bearing upon the way you do the insert (esql code etc)

I have done this several times and a little experimentation does work wonders.


All data types are of CHARACTER type. I tried experimenting a lot but my zero experience of broker is hampering a lot.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Oct 08, 2009 1:33 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

All data types are character eh?

Well for starters, MQMD.MsgId is a BINARY Field. It is not character.

Also, If you plan of retreiving the Message body, I'd store it as a BINARY(BLOB) as well. This way you don't run into character conversion issue. You know the sort of thing we seem to be seeing on this forum on a regular basis.

Obviously this may be impractical in your particular installation but I have to say that using my method has been in daily use for some 2 years without ANY problems.
The Message I'm storing contains an encrypted Binary64 field as well as XML data.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 08, 2009 7:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mfbws61 wrote:
I tried experimenting a lot but my zero experience of broker is hampering a lot.


It will; WMB is not the easiest piece of software to pick up and I urge you to obtain some training. Or you'll find yourself hampered in a number of directions, and development will be a long and painful process for you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Unreadable characters stored in DB2 when issued INSERT ESQL
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.