MQEdit version 9.3.1 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.

The main features of the release are as follows:-

  • Have MQEdit prompt you for your KDB password
    This feature was initially added in MO71 and we have now also added the same to MQEdit. All the details can be found at the aforementioned link.
  • More flexible Message Context Settings
    The are many different actions you may take on an MQ message using MQEdit; moving, copying, small corrections, big edits, and creating brand new messages from scratch.

    Each of these different actions may well want to use a different message context. For example, when moving a message, you likely want to use “Pass All Context” whereas when creating a new message from scratch “Default Context” might be most appropriate. If making a small correction to an existing message you might need to use “Set All Context” depending on what you need to correct.

    Earlier versions of MQEdit had a menu option to allow you to choose which message context setting you wanted to use but the default was built into MQEdit.

    This release adds a number of improvements.

    1. You can now set your own default value for message context in the preferences dialog. In fact two defaults, one for when you are adding a new message, where MQEdit starts with the value set to “Default Context” but you can change it. The other is for operations when you are updating a message, e.g. editing it on the same queue or moving it to another queue. In this case MQEdit starts with the value set to “Pass All Context” but you can change it.
    2. Having the ability to set your own defaults may mean you rarely, if ever, need to change the message context in use, but if you do, you can choose whether MQEdit keeps the setting you choose in the menu for all future messages, or whether it is a one-off change just for this message, and after you’re done with the message, the option reverts to your default that you set in the preferences dialog.
    3. Finally, the menu option that existed in prior versions of MQEdit is enhanced to have a different sub-menu for Add actions and Update actions. This submenu also shows you what the current value is, especially useful if you have the previous feature in use.

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.

Advertisement

Key Database File Passwords

When you use TLS on your client connection from MO71 or MQEdit to your queue manager, there are now (as of IBM MQ V9.3.0) a few different ways you can provide the password for your Key Database (KDB) file, and the latest versions of MO71 and MQEdit take advantage of one of these.

Stash File

The original way of doing so was to create the KDB using the -stashed parameter, and then you would end up with both a KDB file and an STH file with the same name (excluding stem) and you would tell the MQ Client that name. From that name it could create the name of the KDB file (by adding .kdb) and it could create the name of the stash file (by adding .sth). MO71 and MQEdit could either be given the name in the client connection dialog, or it could be set up outside of the application, using the mqclient.ini file (or environment variables). See later section.

Encrypted Password

In IBM MQ V9.3.0, the possibility to provide the KDB password to the MQ client instead of using a stash file was introduced. One way to do this was to store the password in the mqclient.ini file (or in an environment variable) alongside the name of the KDB. Of course, storing the password in the clear in such a location would not be recommended! So, IBM MQ supplies a mechanism to encrypt the password when storing it in such a way.

To encrypt your password, run the runmqicred program and type in the password when prompted:-

5724-H72 (C) Copyright IBM Corp. 1994, 2022.
Credentials are encrypted using the default encryption key. For more secure
protection of stored credentials, use a custom, strong encryption key.
Enter password:
********

This will output to you the encrypted version of your password (using the default encryption key – more in a moment).

<MQI>!2!Zjee9OXAYF5y0aCGHTa9RrgOCvaTZtKHcqqDITh+5i0=!/rj2UVz154AT5J53KIg9Rw==

Add this to your mqclient.ini file along with the name of the KDB (with or with the .kdb extension – also new in V9.3.0).

SSL:
   SSLKeyRepository=c:\MQGem\MQGemClient
   SSLKeyRepositoryPassword=<MQI>!2!Zjee9OXAYF5y0aCGHTa9RrgOCvaTZtKHcqqDITh+5i0=!/rj2UVz154AT5J53KIg9Rw==

mqclient.ini

Make sure the MQCLNTCF environment variable is set to point to your mqclient.ini (or that the MQ client can find it another way) and run MO71 or MQEdit. You can either configure the channel through the client connection dialog (while omitting to specify the KDB) or you can use a CCDT.

Encrypted Password using your own Encryption Key

If you wish to use your own custom, strong encryption key as mentioned in the output of the runmqicred program, you can write that key into a small file (with no new line on the end), e.g.:

moragskey

h:\mykey.txt

To encrypt your password with this key, run the runmqicred program as follows:-

runmqicred -sf h:\mykey.txt

and type in the password when prompted:-

5724-H72 (C) Copyright IBM Corp. 1994, 2022.
Enter password:
********

And then add the location of that file and your newly generated encrypted password into your mqclient.ini as follows:-

SSL:
   SSLKeyRepository=c:\MQGem\MQGemClient.kdb
   SSLKeyRepositoryPassword=!2!Na8OZhRnItl3SAfr6nPOslKFjbQZnpS04zbUEv1VziQ=!bAwI99xisUIqq7nxis2D4A==
Security:
   MQIInitialKeyFile=h:\mykey.txt

mqclient.ini

This may seem like it has exactly the same problem as the stash file, that is, if someone can steal the KDB file, they can also steal the stash file; but in this case, the key file can live in a completely different location to the KDB file, changing the pattern somewhat.

What has been shown here using the mqclient.ini can also be done using environment variables.

mqclient.ini Environment Variable
SSLKeyRepository MQSSLKEYR
SSLKeyRepositoryPassword MQKEYRPWD
MQIInitialKeyFile MQS_MQI_KEYFILE

MO71 and MQEdit Prompt for Password

If your preference is not to store the password to your KDB anywhere (other than in your head or that post-it note stuck to the side of your monitor) then a third option is available where MO71 and MQEdit can prompt you for the password when they need it. To configure this, open your client connection dialog, from the Location dialog, ensure your KDB file name (with or without the KDB extension) is referenced in the “SSL/TLS Key Repository” field, and select “Prompt for Password” in the “SSL/TLS Key Repos Auth Method” field. The other option in this combo-box is “IBM MQ Configured” which you should select if you prefer the MQ Client to get the password from one of the above mentioned places that are configured in MQ (environment variable, mqclient.ini file or Stash File).

Tell MO71/MQEdit that you will supply the password when it is needed

MO71 and MQEdit will only prompt you for the password once per run of the application. The password is remembered in memory and used for all locations specifying the same KDB.

MO71/MQEdit will prompt for the password of the KDB file when it is needed

If you change the password of the KDB and don’t want to cycle the application, you can use the “Forget KDB Password” button found on the Security tab of the Location dialog.

Use the Forget KDB Password to cause MO71/MQEdit to ask again next time it needs the password

Since there are a number of ways to supply the password for the KDB, you’ll be wondering how they interact with one another. What happens if I have two or more of the above in place? What is the precedence? The password will be used from the sources in the following precedence order.

  • MQCONNX MQSCO fields
    this is where the prompted for password in MO71/MQEdit is put.
  • MQKEYRPWD environment variable
  • mqclient.ini file field SSLKeyRepositoryPassword
  • Stash File

So now you have plenty of options to provide the password. Hopefully one of these will meet your needs.


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

Is there a way to clear an MQ queue of all messages?

We were recently asked how to clear a queue of all messages within one of our tools.

In this post we cover how to do this using MQGem tools as several of them offer this capability. Open up the twisty for each tool to read how to do this.

Using MO71

There are two options for clearing a queue of all messages when using MO71. One directly interacts with the messages in a Message List dialog, and the other uses the Clear Queue command via the command server. The latter can fail if someone else has the queue open.

MO71: Using the Message List dialog

In MO71 you can browse a list of messages on a queue, then in the context menu of that dialog choose Message Selection → Apply to all Messages. Then press the Delete All button, or select Delete All from the right-mouse button context menu and all the messages will be deleted.

Delete all messages using MO71

Take care when deleting messages from a production queue manager. Consider that it might be safer to Move the message(s) to a separate holding queue, just in case the message proves to be important after all. MO71 makes it simple to Move messages too. Just fill in the holding queue name, and then press the Move All, rather than Delete All, button.

MO71: Using the Clear Queue command

From a Queue List dialog in MO71, you can choose to clear a queue from the context menu. As a destructive command, this will show a confirmation dialog before it goes ahead.

Delete all messages using the Clear command in MO71

Remember that this command can fail if the queue is open by another application at the time.

Using the Q program

You can use the Q program to quickly destructively get off all the messages on a queue, to ensure it is empty before you begin using it for something else. This can work even when the queue is in use (unless it is exclusively in use of course) and the CLEAR QLOCAL command can’t be used.

Here is an example which destructively gets (-I) from Q1 and uses a zero-length buffer and accepts that the messages will be truncated (-=t0):-

q -m MQG1 -I Q1 -=t0

Take care when deleting messages from a production queue manager. Consider that it might be safer to Move the messages to a separate holding queue, just in case they prove to be important after all. This is simple to achieve using a command like the following:

q -m MQG1 -I Q1 -o HOLDING.Q
Using QLOAD

You can use QLOAD to quickly destructively get off all the messages on a queue, to ensure it is empty before you begin using it for something else. This can work even when the queue is in use (unless it is exclusively in use of course) and the CLEAR QLOCAL command can’t be used.

Here is an example which destructively gets (-I) from Q1 and discards them (-f null), aka sends them to the null file destination:-

qload -m MQG1 -I Q1 -f null

Take care when deleting messages from a production queue manager. We would recommend using QLOAD to actually move the messages to an output file, in case you change your mind about deleting them!

qload -m MQG1 -I Q1 -f c:\temp\Q1deletedmsgs.qld 
Using MQEdit

In MQEdit you can browse a list of messages on a queue, then in the context menu of that dialog choose Message Operations → Apply to all Messages. Then press the Delete All button, or select Delete All from the right-mouse button context menu and all the messages will be deleted.

Delete all messages using MQEdit

Take care when deleting messages from a production queue manager. Consider that it might be safer to Move the message(s) to a separate holding queue, just in case the message proves to be important after all. MQEdit makes it simple to Move messages too. Just fill in the holding queue name, and then press the Move All, rather than Delete All, button, or simply Drag and Drop the messages onto the new queue.

Using MQSCX

You can of course issue the MQSC CLEAR QLOCAL(q-name) command from MQSCX. However, it can go one better than this. The CLEAR QLOCAL command is problematic because it can fail when someone else has the queue open, even if it is not open in a way that stops you getting messages. Instead you can issue the following command in MQSCX:-

=clear qlocal(Q1)

then MQSCX will first attempt the CLEAR QLOCAL command and if that fails with "object in use" then it will switch to getting the messages off the queue instead. You can read more about this in MQSCX: Clearly a better way.


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.

Finding the reason why a message was sent to the Dead Letter Queue (DLQ) in IBM MQ

IBM Support recently released a Support Doc which was titled:-

Summary

Finding the reason why a message was sent to the Dead Letter Queue (DLQ) in IBM MQ

The document described several options, which often required you to look at the message in hex and, when required, byte swap the value to find the reason code. In this post we cover how to do this using MQGem tools as several of them offer this capability, and our tools format out the Dead Letter Header so you don’t need to do any manual byte swapping. Open up the twisty for each tool to read how to do this.

Using MO71

In MO71 you can browse the messages on the Dead Letter queue using a Message List. If you choose to show the “Message Summary” column on your list dialog (see Configuring List Dialogs in MO71 for how to change the columns in a list dialog), you will immediately be able to see the reason code in the Dead-Letter header, as that is one of the useful things that Message Summary displays look for.

A message List dialog will summarise the Dead Letter header of a message for you

Alternatively you can double click on a message to look at the full details of an individual message, and you will see the full Dead-Letter header (MQDLH) is formatted out for you to see.

The full message display shows all of the Dead Letter Header formatted out

Using the Q program

To view your messages on the Dead Letter queue, and have them formatted out, you need to use the -df option which also has three levels of detail. For full detail use -df3. Here’s an example command:-

q -m MQG1 -i MQG1.DEAD.LETTER.QUEUE -df3

Which will format the Dead Letter header like this making it really easy to understand the reason why the message was placed on the DLQ.

[  181 bytes] Message Content
[  181 bytes] Dead Letter Queue Header (MQDLH)
StrucId      :'DLH '
Version      :1
Reason       :2085 (Unknown object name)
Dest. Queue  :'TARGET.QUEUE                                    '
Dest. QMgr   :'MQG1                                            '
MQEncoding   :0x'222' (Reversed)
CCSID        :437 (IBM PC)
Format       :'MQSTR   ' (String)
PutApplType  :11 (Windows NT)
PutApplName  :':\mqm9250\bin64\amqrmppa.exe'
Put Date     :'20220411'
Put Time     :'05021009'
Some text
Using MQEdit

When you look at the messages on a queue using MQEdit, the message list will show you a summary of the message in the “Message” column, which for Dead Letter header messages will show you the reason from the header. This makes it very easy to see the reasons why messages are on your Dead Letter queue.

Selecting a message from the list will display it in the pane below with the Dead Letter header formatted out also showing you the reason why the message ended up on the DLQ.

MQEdit shows a summary of the Dead Letter header in the message list, and the fully formatted message in the lower panel

Using QLOAD (honourable mention)

QLOAD isn’t a message formatting tool, so it will not help you to view the reason code in the Dead Letter header of a message. However, it does get an honourable mention in this list because it can help you to move, or unload messages from your Dead Letter queue that have a specific reason code in the Dead Letter header. This can be very helpful if you want to siphon off some specific errors to handle in a different way.

Use a command like this to copy (-i is browse) all the DLQ messages for MQRC_UNKNOWN_OBJECT_NAME (2085) to a file.

qload -m MQG1 -i MQG1.DEAD.LETTER.QUEUE -Gr:2085 -fUnknownObjs.qld

When you’re using this feature, QLOAD will report the message selection that you have active:-

Message selection active:
  Messages with DLQ Reason 2085 Unknown object name

Read    - Files:   0  Messages:     3  Bytes:      5616
Written - Files:   1  Messages:     1  Bytes:       181

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.

MQEdit Facet Videos

We just uploaded a small selection of short videos about different facets of the MQGem product, MQEdit.

We’ll be sharing one of these each Friday in the coming weeks, using the #FacetFriday tag (Twitter, Facebook, LinkedIn), but if you’d prefer to binge watch them on your own schedule, they can all be found in the MQEdit Playlist of our YouTube Channel.

Here’s the first one you get you started:-


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

Is there a way to delete a single message from an MQ queue?

IBM Support recently released a Support Doc which posed the question:-

Question

Is there a way to delete a single message from an MQ queue (arbitrary position in the queue)?

The document described a couple of options. In this post we cover how to do this using MQGem tools as several of them offer this capability. Open up the twisty for each tool to read how to do this.

Using MO71

In MO71 you can browse a list of messages on a queue, then from that list, select an individual message (or multiple messages if you need to). Then press the Delete button, or select Delete from the right-mouse button context menu and the selected message(s) will be deleted.

MO71 uses the MQ facility, get by message token, so only the exact message(s) that you select from the list will be deleted. While the position of the message on the queue is shown, this is not used for deletion and neither is Message Id, since there is no guarantee that this will be unique either. Each message on a queue is guaranteed to have a unique Message Token.

Alternatively, you can double click on a message from the list, to view the whole message individually. Then from that display, having checked all the details, and made sure it is the message you want to delete, you can press the Delete button, or select Delete from the context menu.

Take care when deleting messages from a production queue manager. Consider that it might be safer to Move the message(s) to a separate holding queue, just in case the message proves to be important after all. MO71 makes it simple to Move messages too. Just fill in the holding queue name, and then press the Move, rather than Delete, button.

Using the Q program

To delete a single message from an MQ queue using the Q program, you should first discover the message ID of the message you wish to delete, to ensure you are addressing the correct message that you intend to delete. Do this by displaying the messages on the queue like this:-

q -m MQG1 -i Q1 -dd

This will browse (-i) the messages on the queue and display the MQMD after the MQGET (-dd) allowing you to see the Message ID of each message on the queue. You will see output like this for each message:-

==============================================================
----- MQMD after MQGET -----
[  324 bytes] Message Descriptor (MQMD)
Report       :00000000
Message Type :8 (Datagram)
Format       :'MQSTR   ' (String)
Priority     :0 (Lowest)
Persistence  :0 (Not Persistent)
Message Id   :414D51204D514731202020202020202099FA4A6020B74B02
              A M Q   M Q G 1                 . ú J `   · K .
ReplyToQ     :'                                                '
ReplyToQMgr  :'MQG1                                            '

Now you can copy that message ID and use it on another invocation of the Q program to delete that specific message from the queue.

q -m MQG1 -IQ1 -gxm:414D51204D514731202020202020202099FA4A6020B74B02

Bear in mind that message IDs are likely to be unique, but this is not guaranteed. It would be safer to move the messages to a separate queue, before deletion. This is simple to achieve using a command like the following:

q -m MQG1 -IQ1 -o HOLDING.Q 
-gxm:414D51204D514731202020202020202099FA4A6020B74B02
Using QLOAD

If you have already browsed the queue contents and output them to a file, you can find the message Id of the specific message you are attempting to address by looking for the Message Descriptor attribute “MSI”. Here is a snippet from a QLOAD file to show an example.

A FMT MQSTR
A PRI 0
A PER 0
A MSI 414D51204D514731202020202020202099FA4A6020B74B02
A COI 000000000000000000000000000000000000000000000000

Now you can copy that message ID and use it on another invocation of the QLOAD program to delete that specific message from the queue. We would recommend using QLOAD to actually move that message to an output file, in case you change your mind about deleting it!

qload -m MQG1 -IQ1 -f c:\temp\deletedmsg.qld 
-gxm414D51204D514731202020202020202099FA4A6020B74B02

Alternatively, you can use the very flexible search and filtering capabilities of QLOAD to narrow down your search of messages on the queue until you find the one you wish to delete, and then offload it to a file, or delete it entirely.

For example, this invocation removes all messages on a queue that are older than one week, and moves them instead to the named file:-

qload -m MQG1 -I Q1 -T7:0:0 -f c:\temp\oldmsgs.qld

Another example, here we remove messages larger than 1MB from a queue:-

qload -m MQG1 -I Q1 -z 1M -f c:\temp\bigmsgs.qld

A third example, here we remove message containing the string “Acme Limited”:-

qload -m MQG1 -I Q1 -s "Acme Limited" -f c:\temp\acmemsgs.qld
Using MQEdit

In MQEdit you can browse a list of messages on a queue, then from that list, select an individual message (or multiple messages if you need to). Then press the Delete button, or select Delete from the right-mouse button context menu.

MQEdit uses the MQ facility, get by message token, so only the exact message that you select from the list will be deleted. While the position of the message on the queue is shown, this is not used for deletion and neither is Message Id, since there is no guarantee that this will be unique either. Each message on a queue is guaranteed to have a unique Message Token.

Alternatively, you can double click on a message from the list, to view the whole message individually in the pane below, and then from that pane, having checked all the details, and made sure it is the message you want to delete, you can select “Delete Message” from the context menu.

Particularly for production queue managers, we would always suggest that it is safer to move message(s) to a holding queue rather than deleting them immediately. In MQEdit it is very simple to move a message between queues, all you need do is drag and drop the required message(s) from one queue to another. You can even copy and move messages between queue managers this way.


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.

MQEdit: COBOL Messages

The V9.2.1 release of MQEdit, our Live Parsing Editor for IBM MQ messages, focused on improving its support for COBOL data types and features.

Watch more in this video, or read on.

The main features of the release are as follows:-

  • Utility to make MQEdit User Format files from COBOL copybooks

    Are your IBM MQ messages built from a COBOL copybook? Would you like an easy way to create an MQEdit User Format file directly from that COBOL copybook? Released at the same time as this new MQEdit release is a free utility called MakeFmt which automates this process. Read this separate blog post covering this new utility. As an example, the following COBOL copybook would translate as shown into an MQEdit User Format file.

  • Support for Packed Decimal Fields

    In order to be able to create MQEdit User Formats for IBM MQ messages that are built from COBOL copybooks, MQEdit now natively supports the packed decimal datatype. See the above diagram for an example of COBOL packed decimal fields translating into an MQEdit User Format packed data type.

  • Support for S/390 format floating point numbers

    If you’re using COBOL, likely as not your messages are originating on an IBM z/OS machine. While in newer versions of z/OS hardware, there is support for IEEE floating point numbers, the S/390 style of floating point numbers are still very much in use. This version of MQEdit is able to display and edit floating point numbers (single and double precision) in both IEEE 754 and HPF formats. MQEdit refers to the Message Descriptor Encoding field (or Encoding field in any chained headers) to determine how any floating point numbers it comes across should be treated:-

    • MQENC_FLOAT_IEEE_NORMAL
    • MQENC_FLOAT_IEEE_REVERSED
    • MQENC_FLOAT_S390

    What if your message does not set the correct value in the Encoding field – see the last item in this list!

  • Allow arrays of strings

    MQEdit previously had the concept of arrays. If you had a string field, it was a character array. For example a 40-character string might look like this in a MQEdit User Format:-

     char     ADDRESS_LINE[40];

    Now, you can also have arrays of strings, for example if you need an array of 4 40-character strings, it would look like this:-

     char     ADDRESS_LINE[40][4];

    For those of you that speak COBOL, this is the equivalent of:-

        10  ADDRESS-LINE    PIC X(40) OCCURS 4 TIMES.
  • Formatting dates in your messages

    If your IBM MQ messages contain fields that contain dates, your MQEdit User Format can describe the format of those fields so that the date can be displayed in a way that everyone viewing the message can understand. For example, imagine you had a character field that contained the following characters:-

    020304

    and you told everyone that it was a date. Which date might it be? 2nd March 2004? 4th March 2002? February 3rd 2004? With an international audience, it may well be very useful to understand the format of such fields when viewing the contents of a message.

    The following MQEdit User Format:-

    enum_int levels
    {
      1, "Gold";
      2, "Silver";
      3, "Bronze";
    }
    struct MEMBER
    {
      char         NAME[40];
      char(YYMMDD) JOIN_DATE[6];
      int          LEVEL(levels);
    }

    would be displayed by MQEdit in the following way.

    [   50 bytes] MEMBER
    NAME        :'Morag Hughson                           '
    JOIN_DATE   :020304           4th March 2002
    LEVEL       :1 (Gold)
    End of structure 'MEMBER' (50 bytes)

    I’m sure you can imagine how handy this might be, and even more so with Julian dates, as I don’t know anyone who can calculate those in their head.

  • Character based enumerations

    Earlier versions of MQEdit had support for enumerations of integral number sets. The above example showed a Gold/Silver/Bronze membership level and how it is formatted.

    This version of MQEdit extends that to allow enumerations for sets of character strings. Here’s a small example:-

    enum relationships
    {
      "S", "SPOUSE";
      "P", "PARTNER";
      "F", "FRIEND";
    }
    struct PERSON
    {
      char   NAME[40];
      char   RELATIONSHIP(relationships);
    }

    which would be displayed by MQEdit in the following way.

    [   41 bytes] PERSON
    NAME        :'Big Ears                                '
    RELATIONSHIP:F (FRIEND)
    End of structure 'PERSON' (41 bytes)

    This type of enum can be used with char, packed, float and double type fields.

  • Show enumeration and field description values in message summary

    In an MQEdit User Format, you can identify particular fields that should be shown in a message summary. In the picture below the Product field and the Website URL field are marked as summary fields. If you look in the message list at the top of the screen you can see that each message shows the contents of these two fields as the summary of the message. However, the Product field is an integer field, and rather than showing the integer value, it shows the enumeration description of that integer value which is much more useful.

    Showing how fields marked as ‘summary’ in an MQEdit User Format are displayed as the Message Summary in the message list

  • Override Message Codepage, Encoding and Format

    In a perfect world, all MQ Message Descriptors would contain the correct code page, encoding and message format to describe the message that followed. Unfortunately, we live in the real world, and it is not always so. An application that knows all the character fields in its message are in EBCDIC doesn’t need to look at the MQMD.CodedCharSetId so it doesn’t matter if it says something else. Tools like MQEdit, however, don’t know what the application can assume.

    So, if you have some messages that are not correctly described when it comes to these fields, you can tell MQEdit what it needs to know to display them correctly. Here’s an example of an override section in an MQEdit User Format file.

    queue PRODUCT.DATA
    {
      format *
      {
        override
        {
          CodedCharSetId = 500;
          Encoding       = 0x311;
        }
        struct MQGEM;
      }
    }

    This tells MQEdit that messages on the queue called PRODUCT.DATA are actually in codepage 500 (EBCDIC) and native z/OS encoding regardless of what it might say in the Message Descriptor. When displaying the contents of the message, MQEdit will use those values, rather than the ones in the Message Descriptor and will display the Message Descriptor as follows to show you that an override is in effect.

    Feedback     :0 (None)
    MQEncoding   :0x'222' (Reversed)        Override(0x'311')
    CCSID        :437 (IBM PC)              Override(500)
    Format       :'MQGEM   '
    Priority     :0 (Lowest)

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.

MQEdit version 9.2.0 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.

The main features of the release are as follows:-

  • Change the value of a field for many locations at once
    This feature was initially added in MO71, and by customer request, we have also added the same to MQEdit.

    If you have lots of queue managers, and you need to change something in the location definition for a number of them, this new dialog can make your life much easier. You can now change values in multiple location definitions at once. For example, if you wanted to change the CCDT URL you use for connectivity details. See Using the CCDT URL for more details on this. To change the CCDT URL by editing individual location definitions one by one would take some time, so now you can easily do it with the “Change Multiple Locations” feature of MQEdit.

    Open the dialog from the MQEdit File menu; select the queue managers to be changed in the left hand list; choose the field to be updated in the right hand list; type in the new value in the entry box and press Set New Value.

    MQEdit – Change Multiple Location dialog, showing CCDT URL
    Please note, the URL shown is for demonstration purposes only. There is no CCDT at the shown URL!

    There are quite a number of fields in the location dialog that you might find it helpful to update many at once. Take a look to see if any of those provided would be helpful to you.

  • Set locations to be members of the same security group
    This feature was initially added in MO71, and by customer request, we have also added the same to MQEdit.

    Do you have queue managers using user IDs and passwords? Are a number of them in the same security domain, for example, you have AD set up; or multiple z/OS queue managers in the same RACF; or you are using LDAP for your authentication? To save you having to make lots of changes each time you set up a new password on one of these domains, MQEdit now has the concept of a security group. You can indicate queue managers are members of the same security group in their location and then when you change the password of one member of the security group, all other members get that update too. This saves you having to provide the new password on every queue manager on password change day.

    This security group is just a name for MQEdit, it doesn’t have to match the domain, or group name or anything defined in a security repository. It is simply a grouping to tell MQEdit that these queue managers all use the same user id and password at connection time.

    MQEdit Location Dialog – Security Group settings and Upper Case of Userid and Password

    The description is optional, but if provided will be used in the password prompt box that is displayed when you connect to a queue manager, or press the Set Password button, as shown in the screenshot above.

    In order to initially set up the security group each queue manager is in, you can also use the “Change Multiple Locations” dialog described above.

  • New options to automatically fold Userid and Password fields to uppercase
    Another customer requested feature. You can select either or both of your Userid and Password fields for a location be folded to uppercase. See the screenshot above which also illustrates this feature. Note that when selected, the dialog where you type in your password will remind you that you have these settings on.

    This can be especially useful for z/OS TSO logins where it can be easy to forget that you have an upper case password because the TSO login panel always folds it to upper case for you.

  • Remember main window search strings
  • The two search fields, for searching Locations and Queues, are now combo-boxes which will be populated with any search strings you use for easy future retrieval.

    Search fields remember previously used search strings


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.

Text Files in Preview Pane

If you’re anything like me, you have a number of text files on your Windows machine that do not use the .txt file extension.

For all of these I have associated Notepad as the application to be used by default when I double click on these file types from the Windows File Explorer. I’m probably a 70:30 command line vs File Explorer user, but it is from time to time handy to be able to double click too.

What I’d never managed to figure out though (until today) was how to get the preview pane in Windows File Explorer to display these text formats with different file extensions. Now that I have found out how to do it, I thought I would share it with all of you too.

Windows File Association Dialog

Windows File Association Dialog

Firstly, it’s important to have the file association in place first, specifically the “Always use this app to open … files” checkbox. This seems to be what adds the file extension into the list you are about to manipulate. So take a moment to make sure all the extensions you want to preview have a default application set.

Now open the registry editor and navigate to Computer > HKEY_CLASSES_ROOT. In here you will see a list of all the file extensions your machine knows about. Locate your file extension that you want to preview (remember you can type into the entry field just below the menu bar). Select the file extension, in this example I am fixing up the .mqx extension; and on the right hand pane right-click and select New > String Value. Give the new key the name “PerceivedType” and then modify it to give it the data value of “text”.

Adding a new String Value in Windows Registry

Adding a new String Value in Windows Registry

Giving new registry key a value of text

Giving new registry key a value of text

Now go back to your File Explorer and you should be able to see your .mqx file in the preview pane.

View .mqx file in Preview Pane

View .mqx file in Windows File Explorer Preview Pane


Many thanks to Scott Williams who wrote about this in a blog post in 2013 which I finally stumbled across in 2020 and it made my day!

MQEdit version 9.1.0 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.

The main reason for the new MQEdit version number, Version 9.1.0, is to remain inline with the current MQ version. However, the following functional changes have also been made:

  • Character Substitution Mode
    As requested by a customer, to make it easier to read certain types of messages, MQEdit now supports a Character Substitution Display Mode. This will display text such as &gt; as the character ‘>’.

    MQEdit Character Substitution Mode

    MQEdit Character Substitution Mode. The top message can be displayed in the manner shown at the bottom with this formatting mode turned on

    The substitutions performed are the following:-

    Sequence Character displayed
    &gt; >
    &lt; <
    &nbsp; (space)
    &amp; &
    &quot; "
    &apos; '
  • QLOAD ‘other’ file processing
    As a result of another customer request, it is now possible to use the QLOAD feature to load a ‘normal’ text file rather than a standard QLOAD file. This text file may contain multiple messages with some sort of delimiter, common with JSON or XML for example. The file can be parsed into these individual messages before being loaded onto the queue.
    MQEdit QLOAD Other File with delimiters

    Loading a file with message delimiters onto a queue

  • Select All
    To make it easier to copy/paste the entire message a new Select All (Ctrl-A) action has been added.

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.