Posted: Thu Jul 09, 2009 9:52 pm Post subject: getting Msg ID of MQMessage using command in ascii
Newbie
Joined: 26 Jun 2009 Posts: 9
Hi,
We are working on hp-ux. Our requirement is to see the message Identifier of the message in MQMD. We have MO03 tool installed in our m/c. when i use amqsbcg to browse the message i am getting the msg id, but in hex format. Is there any command to get the msg ID in ascii format. Can you please help me out in this regard.
Most of the ASCII characters that are converted from the message id do not have a printable representation. How will you be able to pass this ASCII value to your program? Your safest bet is to get based on hex value.
You can also try the ma01 support pac or rfhutil to get based on message id
Posted: Thu Jul 09, 2009 11:17 pm Post subject: Re: getting Msg ID of MQMessage using command in ascii
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
urspradeep330 wrote:
when i use amqsbcg to browse the message i am getting the msg id, but in hex format.
This is because the MsgId is a byte array 24 bytes long, not a string. It can't be represented in ASCII unless you're not using the system generated value but setting it deliberately to an ASCII string.
In which case it's still a byte array holding the string as hex values! There are numerous discussions on the forum of:
a) Why treating msg or correl ids as strings is at best foolhardy and at worse dangerous
b) Why not using system generated values is at best dangerous and at worst lethal.
The search function is your friend. _________________ Honesty is the best policy.
Insanity is the best defence.
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