<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Finding WMQ constants / bit-flags</title>
	<atom:link href="http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/feed/" rel="self" type="application/rss+xml" />
	<link>http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/</link>
	<description>A place to talk with people who work on WebSphere MQ</description>
	<pubDate>Wed, 20 Aug 2008 04:00:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Tim Halbur</title>
		<link>http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/#comment-3571</link>
		<dc:creator>Tim Halbur</dc:creator>
		<pubDate>Tue, 11 Dec 2007 19:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/#comment-3571</guid>
		<description>This is a good little tool, something to put into my "toolbelt" to help debug issues.  Wonder if you've considered extending it further.  Frequently I have an mqmd or mqgmo in a trace written out in hex.  I then have to get out my trusty Application Programming Reference and figure out the MQMD structure, then count up my number of bytes, and do reverse mapping  (02 00 00 00  actually = 00000002) in my head for each field, and figure out that B8 04 00 00 = 1208 which is in the encoding field and so it means Decimal normal.  This tool helps, but, I need to know that the constant starts mqenc  to figure out what 1208 means.  If I just put in the B8 04 00 00  with no constants there are just too many options.

So the extension would be, if I passed in a hex MQMD, could you translate the whole thing?

4D 44 20 20  02 00 00 00  00 00 00 00  08 00 00 00
FF FF FF FF  00 00 00 00  22 02 00 00  B8 04 00 00 
4D 51 48 52  46 32 20 20  04 00 00 00  01 00 00 00  
41 4D 51 20  44 49 47 50  41 51 4D 31  20 20 20 20
46 F1 82 CD  20 03 35 02  00 00 00 00  00 00 00 00     
00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00
00 00 00 00  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  44 49 47 50  41 51 4D 31  20 20 20 20
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  6D 71 6D 20  20 20 20 20  20 20 20 20
03 31 30 36  00 00 00 00  00 00 00 00  00 00 00 00 
00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 06
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20
1C 00 00 00  57 65 62 73  70 68 65 72  65 20 4D 51
20 43 6C 69  65 6E 74 20  66 6F 72 20  4A 61 76 61
32 30 30 37  31 30 30 38  31 36 35 39  31 39 37 32
20 20 20 20  00 00 00 00  00 00 00 00  00 00 00 00
00 00 00 00  00 00 00 00  00 00 00 00  01 00 00 00  
00 00 00 00  00 00 00 00  FF FF FF FF             

If I use M071 to browse a queue with a message on it, it basically gives me this:


StrucId      :'MD  '
Version      :2
Report       :0
Message Type :8
Expiry       :-1
Feedback     :0
MQEncoding   :0x'222'
CCSID        :437
Format       :'MQHRF2  '
Priority     :4
Persistence  :1 (Persistent)
Message Id   :414D51204449494E464F425131202020AA03E84646713E21
Correl. Id   :414D51580000000000000000000000000000000000000000
Backout Cnt. :0
ReplyToQ     :'                                                '
ReplyToQMgr  :'DIINFOBQ1                                       '
UserId       :'mqm         '
AccountingTkn:0000000000000000000000000000000000000000000000000000000000000000
ApplIndentity:'                                '
PutApplType  :26
PutApplName  :'DIINFOBR1                   '
Put Date     :'20071128'
Put Time     :'21251484'
ApplOriginDat:'    '
Group Id     :414D51204449494E464F425131202020AA03E84606873E21
Msg Seq No.  :1
Offset       :0
MsgFlags     :24
Original Len.:-1



but if I only have the message in a trace, could I get this basic information from feeding in the hex and have it spit the formated MQMD out?


No matter what, again, this is a good thing to work with.  Just looking to see if it goes to the next step.</description>
		<content:encoded><![CDATA[<p>This is a good little tool, something to put into my &#8220;toolbelt&#8221; to help debug issues.  Wonder if you&#8217;ve considered extending it further.  Frequently I have an mqmd or mqgmo in a trace written out in hex.  I then have to get out my trusty Application Programming Reference and figure out the MQMD structure, then count up my number of bytes, and do reverse mapping  (02 00 00 00  actually = 00000002) in my head for each field, and figure out that B8 04 00 00 = 1208 which is in the encoding field and so it means Decimal normal.  This tool helps, but, I need to know that the constant starts mqenc  to figure out what 1208 means.  If I just put in the B8 04 00 00  with no constants there are just too many options.</p>
<p>So the extension would be, if I passed in a hex MQMD, could you translate the whole thing?</p>
<p>4D 44 20 20  02 00 00 00  00 00 00 00  08 00 00 00<br />
FF FF FF FF  00 00 00 00  22 02 00 00  B8 04 00 00<br />
4D 51 48 52  46 32 20 20  04 00 00 00  01 00 00 00<br />
41 4D 51 20  44 49 47 50  41 51 4D 31  20 20 20 20<br />
46 F1 82 CD  20 03 35 02  00 00 00 00  00 00 00 00<br />
00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00<br />
00 00 00 00  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  44 49 47 50  41 51 4D 31  20 20 20 20<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  6D 71 6D 20  20 20 20 20  20 20 20 20<br />
03 31 30 36  00 00 00 00  00 00 00 00  00 00 00 00<br />
00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 06<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
20 20 20 20  20 20 20 20  20 20 20 20  20 20 20 20<br />
1C 00 00 00  57 65 62 73  70 68 65 72  65 20 4D 51<br />
20 43 6C 69  65 6E 74 20  66 6F 72 20  4A 61 76 61<br />
32 30 30 37  31 30 30 38  31 36 35 39  31 39 37 32<br />
20 20 20 20  00 00 00 00  00 00 00 00  00 00 00 00<br />
00 00 00 00  00 00 00 00  00 00 00 00  01 00 00 00<br />
00 00 00 00  00 00 00 00  FF FF FF FF             </p>
<p>If I use M071 to browse a queue with a message on it, it basically gives me this:</p>
<p>StrucId      :&#8217;MD  &#8216;<br />
Version      :2<br />
Report       :0<br />
Message Type :8<br />
Expiry       :-1<br />
Feedback     :0<br />
MQEncoding   :0x&#8217;222&#8242;<br />
CCSID        :437<br />
Format       :&#8217;MQHRF2  &#8216;<br />
Priority     :4<br />
Persistence  :1 (Persistent)<br />
Message Id   :414D51204449494E464F425131202020AA03E84646713E21<br />
Correl. Id   :414D51580000000000000000000000000000000000000000<br />
Backout Cnt. :0<br />
ReplyToQ     :&#8217;                                                &#8216;<br />
ReplyToQMgr  :&#8217;DIINFOBQ1                                       &#8216;<br />
UserId       :&#8217;mqm         &#8216;<br />
AccountingTkn:0000000000000000000000000000000000000000000000000000000000000000<br />
ApplIndentity:&#8217;                                &#8216;<br />
PutApplType  :26<br />
PutApplName  :&#8217;DIINFOBR1                   &#8216;<br />
Put Date     :&#8217;20071128&#8242;<br />
Put Time     :&#8217;21251484&#8242;<br />
ApplOriginDat:&#8217;    &#8216;<br />
Group Id     :414D51204449494E464F425131202020AA03E84606873E21<br />
Msg Seq No.  :1<br />
Offset       :0<br />
MsgFlags     :24<br />
Original Len.:-1</p>
<p>but if I only have the message in a trace, could I get this basic information from feeding in the hex and have it spit the formated MQMD out?</p>
<p>No matter what, again, this is a good thing to work with.  Just looking to see if it goes to the next step.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
