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 » IBM MQ Java / JMS » MQBYTE

Post new topic  Reply to topic
 MQBYTE « View previous topic :: View next topic » 
Author Message
pmane
PostPosted: Wed Nov 07, 2001 1:47 am    Post subject: Reply with quote

Acolyte

Joined: 17 Oct 2001
Posts: 50

I am reading a message from a Queue. The message was put by other client( Q Manager ) on running on mainframe . It genarted message id on it own. Now I want to record this message in my database. I want to also put the message id as the primary key in my DB which will store information related to the processing of that message. I must be in position to send him this information in my db if he gives me the messageid .

My problem is MEssageID is MQByte24. If I try to display this it shows garbage data. I am using Java . Dose any one has any clue ?
If I want to store the message in a database
for some reason can message id act as key ?
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Nov 07, 2001 11:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You can attempt to use the message id as a key in your database. Since the field is a byte field and not character data, you can expect to have trouble printing it out. The field may contain unprintable characters. You'll also need to store it in a column that accepts binary data. The field can have embedded 00's which will terminate a string. Hope this helps.

[ This Message was edited by: bower5932 on 2001-11-07 11:01 ]
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
middlewareonline
PostPosted: Wed Nov 07, 2001 12:17 pm    Post subject: Reply with quote

Acolyte

Joined: 09 Jul 2001
Posts: 73

Use a BLOB type to store your key. You may have problem creating it as PK.

MiddlewareOnline.com
Back to top
View user's profile Send private message Visit poster's website
pmane
PostPosted: Wed Nov 07, 2001 5:16 pm    Post subject: Reply with quote

Acolyte

Joined: 17 Oct 2001
Posts: 50

1.Thanks for your infomration. It was very helpful. I tried to store Msgid in database using blob but thing is I can not do a search on blob as = is not supported in select (Please correct me if I am wrong). Any one has any idea about how the MQ msgid can be stored in db and got back again safly as MQByte in Java ? Or am I making a mistake to store MQMD fileds in database ?

Thanks,
Prashant

[ This Message was edited by: pmane on 2001-11-08 00:30 ]
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Nov 08, 2001 6:22 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You could always write a couple of small routines to expand the hex nibbles into characters and then back again. It would make the field 48 characters long instead of 24.

eg. x'12ab78de' to C'12AB78DE' (x'3132414237384445').

Cheers,

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
pmane
PostPosted: Thu Nov 08, 2001 5:35 pm    Post subject: Reply with quote

Acolyte

Joined: 17 Oct 2001
Posts: 50

Thanks , I will do that but I fear that It will create some over head for my processing. I was trying to get some direct way-out since IBM mentions that we can store these MQMD headers and then use them as we need in one of its manuals. I feel that IBM should have given some conversion runtines or lookup tables like in i18.jar package. Or else I am making mistake to store it in them DB. This kind of conversion might look easy in JAVA but it will be very difficult in COBOL (I am not lucky enough to get all the code written in JAVA ).

Thanks again for all your help !

Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Nov 09, 2001 6:52 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

If you want to do it in COBOL, then it would be trivial to write a very small assembler routine to do it. I'm assuming mainframe here. Don't know what's avaialable on other platforms.

In fact, one of the OS/390 Support Pacs includes the routine to convert hex to 'expanded' character.

Cheers,

_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » IBM MQ Java / JMS » MQBYTE
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.