QLOAD version 9.0.3 – Reading messages from the log

MQGem Software is pleased to announce that a new version of QLOAD, our queue load/unload tool for IBM MQ, is now available.

This release was created for one specific customer requested feature, retrieving messages from your queue manager log.

IBM MQ comes with a utility, dmpmqlog, which can format your queue manager transactional log and dump out the contents of messages in a hex format (example below snipped for brevity).

LOG RECORD - LSN            

HLG Header: lrecsize 720, version 1, rmid 0, eyecatcher HLRH

LogRecdType . . : AQM Put Message (257)
Eyecatcher  . . : ALRH                 Version . . . . : 1
LogRecdLen  . . : 700                  LogRecdOwnr . . : 256    (AQM)
XTranid . . . . : TranType: NULL
QueueName . . . : HELLO.WORLD.Q                               

Data  . . . . . : 
00000:  41 51 52 48 04 00 00 00 FF FF FF FF FF FF FF FF    AQRH....ÿÿÿÿÿÿÿÿ
00160:  4D 44 20 20 01 00 00 00 00 00 00 00 08 00 00 00    MD  ............
00176:  00 00 00 00 22 02 00 00 52 03 00 00 4D 51 53 54    ...."...R...MQST
00192:  52 20 20 20 00 00 00 00 01 00 00 00 20 20 20 20    R   ........    
00368:  20 20 20 20 20 20 20 20 0B 00 00 00 43 3A 5C 6D            ....C:\m
00384:  71 6D 38 30 30 34 5C 62 69 6E 36 34 5C 61 6D 71    qm8004\bin64\amq
00400:  73 70 75 74 2E 65 78 65 32 30 31 38 30 34 32 33    sput.exe20180423
00416:  30 34 33 34 33 34 35 36 20 20 20 20 00 00 00 00    04343456    ....
00432:  00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00    ............ÿÿ..
00448:  48 65 6C 6C 6F 20 57 6F 72 6C 64 21                Hello World!

Log To QueueThis format is a little tricky to extract the data from to reinstate your message. As you can see above, you get the MQMD and the message data all in one block. It gets even more tricky when your message is broken up into several log records!

This version of QLOAD hopes to make the process of recreating message from your transactional log files much simpler to do. It can only work when the messages you want are in the log file though. There’s no magic!

Running QLOAD against the queue manager log

With the following invocation, QLOAD will run the dmpmqlog utility and parse through the output looking for the queue you requested, in this example HELLO.WORLD.Q, and write any messages it finds to the HELLO.WORLD.RCOV queue on queue manager MQG2.

qload -m MQG1 -j* -i HELLO.WORLD.Q -m MQG2 -o HELLO.WORLD.RCOV

Since you are reading the log files using dmpmqlog, the queue manager, MQG1, cannot be running when this command is issued and so the messages cannot be put onto a queue on that queue manager as part of the command. In this example I’ve chosen to put them onto a side queue on another queue manager but equally I could write them into a QLOAD file and then later put them onto the queue manager once it has started up again, as follows:-

qload -m MQG1 -j* -i HELLO.WORLD.Q -f HELLO_WORLD.qld
strmqm MQG1

Running QLOAD against output from dmpmqlog

If you have already run dmpmqlog, perhaps to determine whether the messages you wish to retrieve can be found in the log, then you may have already spent a few minutes waiting for the utility to complete. You can use the output files you generated from the utility as input into QLOAD.

dmpmqlog -m MQG1 -b > dmpmqlog.txt
qload -j dmpmqlog.txt -i HELLO.WORLD.Q -m MQG1 -o HELLO.WORLD.RCOV

Running QLOAD against copied off queue manager logs

A third alternative is to run QLOAD against queue manager log files that have been copied off. In this case you provide QLOAD with a directory containing these files.

qload -m MQG1 -j c:\mqmarch\log\MQG1 -i HELLO.WORLD.Q -m MQG1 -o HELLO.WORLD.RCOV

This command drives dmpmqlog with the -f parameter, and so the criteria for this directory must follow what is described in Knowledge Center for running dmpmqlog in that way. In addition, you must use the -m parameter to specific the queue manager name that these log files came from so that queue names can be found, and that queue manager cannot be running at the time.

The specified directory must contain the log header file (amqhlctl.lfh) and a subdirectory called active. The active subdirectory must contain the log files. By default, log files are assumed to be in the directories specified in the IBM MQ configuration information. If you use this option, queue names associated with queue identifiers are shown in the dump only if you use the -m option to name a queue manager name that has the object catalog file in its directory path.

QLOAD filtering

Whichever of the above methods you choose to use, you can add many of the QLOAD filtering options to your command.

For example, you can find all the messages containing a particular search string.

qload -m MQG1 -j* -i HELLO.WORLD.Q -s "World" -m MQG2 -o HELLO.WORLD.RCOV

Or perhaps you need to pluck out one specific message using its message id (or correlation id).

qload -m MQG1 -j* -i HELLO.WORLD.Q -gxm414D51204D51473120202020202020202604E15A21D49501 -m MQG2 -o HELLO.WORLD.RCOV

QLOAD also has time based filtering, so if you’re looking for a message from hours, days or weeks ago, you can go directly to that time period. This example is looking for messages that were put onto the queue between 18 and 19 hours ago.

qload -m MQG1 -j* -i HELLO.WORLD.Q -T0:18:00,0:19:00 -m MQG2 -o HELLO.WORLD.RCOV

Note: Filtering by Selection String (the -H parameter) is not available when your input source is a file (either a QLOAD file or an MQ log file) since it uses the Selector feature of MQOPEN.

The new version can be downloaded from the QLOAD Download Page. Any current licensed users of QLOAD can run the new version on their existing licence. If you don’t have a licence and would like to try out QLOAD then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.


MQEdit version 9.0.3 is released

MQGem Software is pleased to announce that a new version of MQEdit, our Live Parsing Editor for IBM MQ messages, is now available.

This version of MQEdit makes it easier to manage a group of users using the editor from a central position. The following items have been added:

  • The concept of a master configuration file
    Users can reference a master configuration file and any new or change locations can be automatically imported into their own configuration.
  • Import from another MQEdit (or MO71) Configuration file
    You can now import locations direct from another configuration file.
  • Splash screens
    An MQ Administration department can now cause users of MQEdit to see centrally controlled information whenever the user starts MQEdit or attempts to connect to a Queue Manager. This could, for example, display maintenance schedule information, Queue Manager ownership or support contact numbers.
  • Licence Command
    You can now configure a command to be automatically run if the current licence is either invalid or nearing its renewal date.
  • MQEdit Program update notification
    You can ask MQEdit to periodically check whether there is a later version of the program available.

The new version can be downloaded from the MQEdit Download Page. Any current licensed users of MQEdit can run the new version on their existing licence. If you don’t have a licence and would like to try out MQEdit then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

Use MQGem tools with IBM MQ on IBM Cloud

You may have seen the recent announcement from IBM about the experimental IBM MQ service running on IBM Cloud.
IBM Cloud

You can learn more with these resources:-

When you read the description of this new service in the Bluemix catalog, you’ll see it says the following:-

Manage MQ your way

Manage your cloud-based queue managers with the tools you know and love – including MQ Explorer, the MQ Console, or via MQ Script Commands (MQSC).

This blog post is here to assure you that the tools you know and love from MQGem Software; MO71, MQSCX, MQEdit and QLOAD can all also be used with IBM MQ running on IBM Cloud.

Once you have created your MQ on IBM Cloud Service and Queue Manager, as shown in the above video, and your queue manager is up and running, you’ll have a view something like this.

IBM Cloud QM List

A list showing my Running queue manager

Click on the three vertical dots on the right of your queue manager to “Download Connection info”, or alternatively view the details of your queue manager and then there is a button there too which allows you to download the “Connection Information”. Either way, you’ll be presented with a pop-up which allows you to download a plain text file which contains the queue manager name, hostname, port number and a couple of channel names, one called an Application Channel and one called an Administration Channel.

IBM Cloud Download Connection info

IBM Cloud Download Connection info

In order to remotely connect to your IBM Cloud queue manager you will also need to be able to log in. As the MQ on IBM Cloud documentation describes here, you need the API key as your password to go with the user id ‘admin’. Follow the instructions on that page to obtain your API key.

Now you have all the pieces of information you need to set up any of the MQGem Software tools to administer your queue manager on IBM Cloud. As a reminder, these are the things you will need.

Item From where
Queue Manager Name You invented it when you created the queue manager. If you’ve forgotten it, it’s also in the text file you downloaded with the connection information.
Channel Name The “Administration channel name” can be found in the text file you downloaded with the connection information.
Connection Name This is built by concatenating the “Hostname” and “Listener port” details (with brackets round the port number) that can be found in the text file you downloaded with the connection information.
User ID This is ‘admin’
Password This is the API Key that you created by following the linked instructions.

On the pages that follow, we cover how to use the above information you have gathered in your table to configure each of our tools to connect to your IBM MQ in IBM Cloud Queue Manager. Go directly to the page for the tool you want to use, or page through each one in turn.

  1. MO71
  2. MQEdit
  3. MQSCX
  4. QLOAD

If you don’t have a licence and would like to try out any of our tools then send an email, noting which tool you’d like to try, to support@mqgem.com and a 1-month trial licence will be sent to you.

IBM MQ Maintenance level checking with MO71

The newest version of MO71 is able to check what the latest available maintenance level of IBM MQ and inform you if you are back level.

MO71 File Menu

MO71 File Menu with options for checking versions

In its simplest form this comes as a file menu option which you can manually select at any time. However there is also an option to have MO71 check for new versions automatically to save you having to remember to do it, and to pop up a reminder to you if there is a new maintenance level.

MO71 MQ Maintenance Levels

MO71 MQ Maintenance Levels

In addition, if you run a HealthCheck on your queue managers, one of the problems that can be checked for is whether your queue manager is running at the latest maintenance.

MO71 Problem checking Fixpack

MO71’s Problem checking can indicate if you are behind on maintenance

And finally if you look at a multi-queue manager list of queue manager attributes, there is a new column that can be added to this display which shows the latest maintenance applicable to the version each queue manager is using. If a queue manager is up-to-date on maintenance then this field is blank. Therefore, a simple filter showing only those rows with something in that field can immediately show you which queue managers need maintenance applied, or you can make a simple filter to highlight the queue managers that have a newer MQ maintenance level available, by changing their background colour, as shown below.

MO71 QMList filtered by Maintenance

MO71 QMList filtered by Maintenance

The new version can be downloaded from the MO71 Download Page. Any current licensed users of MO71 can run the new version on their existing licence. If you don’t have a licence and would like to try out MO71 then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

MO71 version 9.0.6 is released

MQGem Software is pleased to announce that a new version of MO71, our GUI Administrative tool for IBM MQ, is now available.

The main features of the release are as follows:-

Improvements to Column Filters

Following on from version 9.0.5, when column filters were first introduced, this version improves them for integer values which are now shown as a selectable list of values in use.

MO71 Integer Column Filters

For fields with integer values, view how many of each value are present and filter by them

Splash Screens

You can configure MO71 to display a panel of information either when MO71 initially starts or when a user connects to a Queue Manager. This allows a central MQ Administration department to disseminate information to MO71 users. For example, tell them about Queue Manager ownership, status or maintenance schedules.

IBM MQ Fix Pack check

MO71 can now check for the latest available MQ fix pack levels and help to inform you that a later fix pack is available for a particular Queue Manager. Read more in IBM MQ Maintenance level checking with MO71

MO71 Version Check

The MO71 Version Check dialog

MO71 Update notification

MO71 can now check and notify you if there is a later version of MO71 available for you.

Import from another MO71 Configuration File

You can now import location definitions from another, central, MO71 configuration file. Not only that but you can ask MO71 to merge any definitions from this file into the local configuration each time it starts.

Licence Command

Another feature which makes central administration a little easier. You can configure MO71 to run a command if the licence file is either not present or due to expire soon. This enables you to automatically copy or FTP a new licence file from a central location without the end user needing to do anything.

The new version can be downloaded from the MO71 Download Page. Any current licensed users of MO71 can run the new version on their existing licence. If you don’t have a licence and would like to try out MO71 then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.

How to activity trace the MO71 application

MO71 utilises the MQCNO_ACTIVITY_TRACE_DISABLED option so that while using it to view activity trace records, you are not also generating even more! This is of course, only honoured if the queue manager allows it which is controlled by the queue manager attribute ACTVCONO. So in addition, the MO71 Activity trace viewer also has some quick check boxes to hide from view all its records should they be generated.

Inspect MO71What if you want to see the activity trace for MO71 though? For example if you want to trace the API Exerciser?

There are two ways to over-ride the use of MQCNO_ACTIVITY_TRACE_DISABLED. One is to use the following command (which applies the over-ride to all applications that have specified it).


The other is to add a stanza like the following to your queue manager’s mqat.ini file. Remember if MO71 is already connected, you can make an alteration to the queue manager object to get it to pick up the new mqat.ini file or just disconnect and reconnect to the queue manager to pick it up.

# Turn on tracing for MO71

Now looking at the Activity Trace window, on the “Settings” tab, uncheck “Exclude this process” so you can see records from this process ID, and also “Exclude MO71 processes” which just causes the filtering for the “Output” tab to hide any records that come from any “mqmonntp.exe”. Remember to press Apply Settings once you’ve made these and any other filtering changes.

Activity Trace Settings Exclude Checkboxes

Activity Trace Settings Page – Check boxes to exclude MO71 trace records

Note: With these two check boxes, you could run one instance of MO71 to view the Activity Trace records, and a second instance of MO71 doing the activity you want to trace, for example using the API Exerciser, then you could leave “Exclude this process” checked and only uncheck “Exclude MO71 processes”.

It may also be wise to turn off any automatic operations that are being done by MO71, such as exporting objects on a scheduled time interval, which would generate a lot of activity from MO71 in the trace.

Then you’ll be able to see any API calls made by the MO71 application, for example:-

13:38:35   8220( 21) [   85us] C:\MQGem\mqmonntp.exe MQOPEN INPUT.Q 
   Connection Id:414D51434D514731202020202020202027E1F55920005205
   Hobj         :8 QUEUE(MQG1/INPUT.Q)
   Open Options :00000010
                 00000010 MQOO_OUTPUT                    (Output)
   Dynamic Queue:AMQ.*
   CompCode     :0    
   Reason       :0     OK.

Other resources that you may find useful about Activity Tracing.

Configuring List Dialogs in MO71

MO71 is our graphical administration tool for IBM MQ. You can manage all the different object types in MQ using its lists and object dialogs. The lists are fully flexible allowing you to determine which fields are interesting to you and which are not and choosing only to display those columns in the list as a result.

You can make these changes temporarily, just to the instance of the dialog you are currently using. You can make them more permanently, so that every time you bring up that list on that queue manager, you have the same columns. Or finally, you can make these changes across all your queue managers, because the columns you want are the ones you think should be the default set. You can also change the columns in a dynamic manner using filters.

This post will cover these various different mechanisms.

Temporarily alter the list shown

When looking at a list of objects you can change the columns that are displayed by selecting the Options -> Alter List… item from the context menu.

MO71 Alter List Menu

This will bring up a dialog where you can locate the additional columns you want to display. So I’ve got a list of queues, with some cluster queues and I want to see the Cluster Queue Manager that hosts the cluster queues, so I locate the field Cluster Queue Manager Name (CLUSQMGR) in the right hand side of the window in the list of “Remaining Fields”, and move it to the “List Contents” by pressing the  <<  button. Then I can move its position in the columns on the left hand side using the up and down buttons, and press   OK   to complete the change.

MO71 Change Queue List attributes

Now you’ll see that your queue list has the additional column you selected. However, if you close the queue list dialog, and later open another queue list dialog, you’ll see that your alteration to the list of fields shown has been forgotten, it was a temporary change that you made.

Permanently alter the list for one queue manager

Following exactly the same process as above, with one small change, you can make the change permanent for that queue manager. On the dialog which allows you to change the columns shown, instead of just pressing   OK   to make the change, first press Apply All which applies the change to all instances of that particular list dialog for this queue manager, both those currently open, and any future invocations of that list dialog. This change is also remembered across a restart of the MO71 program.

MO71 Change Queue List attributes Apply All

Permanently alter the list for all queue managers

In essence, this mechanism is changing the defaults for list dialogs. If you add a new queue manager to MO71, it will pick up the default columns too.

Using the menu option View -> Set Default Lists -> Queue List… (or whichever list dialog you want to change), you will be presented with a very similar dialog to the one above, except instead of referring to a single queue manager in the window title, it will indicate that it is a “global” list.

MO71 Change global Queue List attributes

Pressing   OK   or  Apply  on the global change list dialog will set the new default and all queue managers that have not had their list changed by the above mechanisms will pick up these new defaults. Pressing Apply All on this dialog will set all queue managers to use this list instead of anything that may have previously been altered by the above mechanisms. Because this is a ‘destructive’ setting (i.e. you lose previous set up you might have done), there is a confirmation dialog for this change. This change is also remembered across a restart of the MO71 program.

MO71 Change global Queue List attributes Confirmation

Changing columns in a filter

You can also change the column display from within a filter. This can particularly useful when creating pre-defined dialogs. Especially if you want to have several different ‘default’ sets of columns.

This can be done in two ways. Firstly by adding a ‘#’ character after a keyword or user variable name, to show it as a column on the end of the display. The example below has a filter which creates a user variable called “Fullness” and as a result of the ‘#’ character on the end, also displays that as a column.

MO71 Fullness column

The other way to manipulate columns from within a filter is to use the showcol and hidecol functions. This is very useful in a pre-defined dialog, allowing you to change the default set of columns to exactly what you need for this dialog. You might, for example, have several different queue lists, one for cluster queues, one for transmission queues, and one for dead-letter queues across all your queue managers. You can imagine wanting slightly different columns on display for each one.

The showcol function takes the MQSC spelling of the keyword and the column position, and the hidecol function just takes the keyword.

MO71 showcol hidecol

Heopfully now you can have exactly the columns you want on display in any list you are viewing. If you have any questions please leave a comment below, or get in touch.

If you don’t have a licence and would like to try out MO71 then send an email to support@mqgem.com and a 1-month trial licence will be sent to you.