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 API Support » Message ID

Post new topic  Reply to topic
 Message ID « View previous topic :: View next topic » 
Author Message
nik_iway
PostPosted: Sun Apr 16, 2006 10:15 pm    Post subject: Message ID Reply with quote

Centurion

Joined: 21 Jul 2005
Posts: 115

Hi,
I have a Requirement where i need to pick up the message from the Queue based on the Message ID stored in the Database. Can i copy the Message ID Stored in the Database to MQMD MsgId and in MQGET , specifying MQMO_MATCH_MSG_ID...

Thanking you
Regards
Nik
Back to top
View user's profile Send private message
zpat
PostPosted: Sun Apr 16, 2006 10:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Yes.

On Z/OS you can also index the queue by MSGID for a performance gain.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Apr 20, 2006 12:12 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

But remember, the msg id is a bit stream and not in human readable format.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
Leigh Kendall
PostPosted: Mon Apr 24, 2006 11:20 am    Post subject: Reply with quote

Acolyte

Joined: 10 Apr 2003
Posts: 66
Location: Hartford, CT

Nik -

See thread my post in:
http://www.mqseries.net/phpBB2/viewtopic.php?t=16367

All you need is the BitConverter.ToString class/method.

HTH,
_________________
Leigh Kendall
Back to top
View user's profile Send private message
nik_iway
PostPosted: Mon Apr 24, 2006 10:56 pm    Post subject: Reply with quote

Centurion

Joined: 21 Jul 2005
Posts: 115

Hi,
I have an ILE RPG PROGRAM that reads the Message (Basicaaly the MEssage ID ) and Store it in the Data base, Another ILE program will pick up the data (Message ID) and look for the MEssahe in the Queue for the Specific Message Id.

Wat r the steps needed to be done.

In Windows When i am browsing Message using MQExplorer the following is shown as the MEssage ID

AMQ QA.TEST.D{¶LD

414D512051412E534B414E4449412E447BB64C4420000F01

which one is the MessageID
Back to top
View user's profile Send private message
fschofer
PostPosted: Mon Apr 24, 2006 11:20 pm    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,

both, the first one is the MessageID translated to readable ASCII characters (some at least).

The second one is the original hex string which is stored within the MQMD.

Quote:
AMQ QA.TEST.D{¶LD

414D512051412E534B414E4449412E447BB64C4420000F01


41 => A
4D => M

for more look here
http://en.wikipedia.org/wiki/Ascii#ASCII_printable_characters

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
nik_iway
PostPosted: Mon Apr 24, 2006 11:33 pm    Post subject: Reply with quote

Centurion

Joined: 21 Jul 2005
Posts: 115

Hi fschofer

thanks you for the reply. I can use

414D512051412E534B414E4449412E447BB64C4420000F01

Message id to store in the database and using this value can i retrive the MEssage from the Queue with the Same Message id


Regards
Nik
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 25, 2006 3:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

nik_iway wrote:
Hi fschofer

thanks you for the reply. I can use

414D512051412E534B414E4449412E447BB64C4420000F01

Message id to store in the database and using this value can i retrive the MEssage from the Queue with the Same Message id


Regards
Nik

No. Before you retrieve the message you need to transform this String into a byte array with the values as specified by the hex string:
1st byte value 0x41
.....
3rd last byte value 0x00 (c string terminator)...
2nd last byte value 0x0F
last byte value 0x01

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
maneshgurav
PostPosted: Mon May 01, 2006 2:14 pm    Post subject: Reply with quote

Novice

Joined: 20 Apr 2006
Posts: 12

nik_iway, I have a similar requirement. Are you getting the MessageId in HexString using the method suggested by Leigh Kendall? How are you converting the HexString back to Byte array while retrieving the response?

Thank you,
Manesh
Back to top
View user's profile Send private message
maneshgurav
PostPosted: Fri May 05, 2006 9:04 am    Post subject: Reply with quote

Novice

Joined: 20 Apr 2006
Posts: 12

Got it working...

Please refer http://www.mqseries.net/phpBB2/viewtopic.php?t=16367

Thank you,
Manesh
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 API Support » Message ID
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.