In this post we cover how to view your message data formatted out using MQGem tools as several of them offer this capability. Open up the twisty for each tool to read how to do this.
If you want to learn how to view your message data in hex, please read this post.
Using MO71
In MO71 you can browse a list of messages on a queue, then you can double click on a message from the list, to view the whole message individually. To view the message data formatted, either:
- Select the “Formatted Message” button on the toolbar
- From the right-mouse-click context menu choose Display Format → Formatted Message
MO71 will recognise and format out all the built-in MQ formats as well as providing some additional formatting options for XML. Check out all the options in the Display Format menu mentioned above. Some message formats will benefit further from the High/Medium/Low display options. The above screenshot is showing a PCF event message using Low detail.
Using the Q program
In the Q program, you can request that your message data be shown formatted using the -df flag. High/Medium/Low detail can also be chosen by adding 3,2, or 1 respectively onto the end of the flag. For example:
q -m MQG1 -iMY.EVENTS -df1
Which will display your message data as follows:
Connecting ...connected to 'MQG1'. =============================================================================== [ 244 bytes] Message Content Command :44 (QMgr Event) Reason :2035 (Not authorized) Parameter Id :2015 (Queue Manager Name) Value :'MQG1 ' Parameter Id :1020 (Reason Qualifier) Value :1 [0x'1'] MQRQ_CONN_NOT_AUTHORIZED Parameter Id :3025 (User Identifier) Value :'mqgusr1 ' Parameter Id :3206 (CSP User Identifier) Value :'mqgusr1' Parameter Id :1 (Application Type) Value :11 [0x'B'] MQAT_WINDOWS_NT Parameter Id :3024 (Application Name) Value :'d:\nttools\q.exe ' ------------------------------------------------------ Command (QMgr Event) --
The Q program will recognise and format out all the built-in MQ formats as well as CSV, FIX, JSON, XML and EDIFACT. Some message formats will benefit further from the High/Medium/Low display options. The above output is showing a PCF event message using Low detail.
Using MQEdit
In MQEdit you can browse a list of messages on a queue, then you can double click on a message from the list, to view the whole message individually. To view the message data in hex, either:
- Select the “Formatted Message” button on the toolbar
- From the right-mouse-click context menu choose Display Format → Formatted Message
MQEdit will recognise and format out all the built-in MQ formats as well as CSV, FIX, JSON, XML and EDIFACT. In addition it can format out your own messages formats as well. For more on that read User Formats in MQEdit. Some message formats will benefit further from the High/Medium/Low display options. The above output is showing a PCF event message using Low detail.
If you don’t have any of these tools, but would like to try any or all of them out, please contact support@mqgem.com and a 1-month trial licence will be sent to you with no obligation to buy. You can download the tools from our website.