Running MQGem GUIs under WINE

MQGem with WINEWe spent the festive season partaking of a little wine which resulted in our recent announcement of the capability to run both the MQGem Software GUI applications, MO71 and MQEdit, on Intel Linux. This is achieved by running them under WINE. WINE is a fabulous piece of free software that comes from the WINE project. This software allows a huge range of Windows applications to run, virtually unchanged, on an Intel Linux machine. The software is not an emulator but rather translates Windows API calls to POSIX calls on the fly which means that it is fast and efficient. For most users, wine may even be already installed on your Linux system, for others, it will be as simple as issuing the command:-

yum install wine.i686

N.B. The MQGem GUIs are 32-bit Windows applications which is why you must install the wine.i686 package rather than letting the system decide which wine package you need based on the bitness of your O/S.

However, everybody’s Linux is just that little bit different. If you find when using the above command that it responds with:-

No package wine available.

then this means that the yum source repositories you currently use do not contain the WINE packages. The WINE packages are in the EPEL (Extra Packages for Enterprise Linux) repository which can be added to your yum as described in How can I install the packages from the EPEL software repository?

If the EPEL repository still refuses to play ball, there are a plethora of StackOverflow questions (with answers) to solve Cannot retrieve metalink for repository: epel.
Once you get WINE installed, there is one other piece of the puzzle. If you tried to run the mqmonntp.exe under WINE as-is, the GUI would run, but when you try to connect to MQ using it the following error would be shown.

Error connecting to 'MQG1' RC(2012) Environment error.

So before you do, you should download a new package from MQGem Software, an MQ WINE mapping layer. This is a shared object that maps from the MQI calls made that the Windows application expects to find in mqm.dll or mqic32.dll, and instead calls the locally installed entry points in the libmqm_r.so and libmqic_r.so libraries. These mapping packages are called mqm.dll.so and mqic32.dll.so.

So download the zipped tar file mq_wine.tgz, and untar the file using a command such as

tar -xvzf mq_wine.tgz

You need to put these libraries where WINE will find them. Your two choices are:

  • Put them in /usr/lib/wine
  • Put them where ever you like but ensure that the path is added to WINEDLLPATH environment variable.

Now download the latest version of MO71 or MQEdit and unzip it on your Linux system. We have made one or two minor changes to the programs to fix things we have discovered in our testing of them under WINE, so it is best if you start off with all the fixes to things we’ve found. If you already run MO71 with a Diamond or Enterprise licence then you can also copy your licence file across onto your Linux machine (assuming you’re on the same site for your Diamond licence). If you use an Emerald licence, then you’ll need one for this machine. If you’d like to try it out on Linux before you make your mind up to buy another Emerald, then please email support@mqgem.com to request a trial licence.

To run the program, use this command:-

wine mqmonntp [ MO71 parameters ]

Once you are comfortable that MO71 starts and runs correctly you may want to set up an icon on your desktop to issue this command and possibly run it in the background.

Cheers!

User Formats with String Messages

How many of you saw our post about the addition of User Formats to the message editor, MQEdit, and thought, “That doesn’t apply to me, all my messages are string messages (MQSTR)”?

Well, I have news for you. Not only does it apply to you, but it might be very useful!

Using string messages is a very common practice with MQ Applications. After all it keeps things nice and simple, MQ does all the work for you when messages need to be data converted from one platform to the other, and you don’t need to build data conversion exits that need to know the shape of your message formats.

However, it is rare that such a string message is completely free-form. There will be some kind of structure to the message. Sometimes this structure will be XML or EDIFACT (which are also supported by MQEdit) and sometimes this structure will be a set of fixed fields.

There are many advantages of using user formats when viewing or editing even your string messages.

  • You can see each field displayed with a label to indicate what it is.
  • It is easier to edit one field in the message without inadvertently changing another.
  • In the list of messages, you can choose which field(s) are shown rather than simply seeing the first n bytes of the string message. (This is done with the summary option)
  • You can have different detailed views of your message, by indicating that certain fields are for low, medium and high detail views. This can be very handy if there are a lot of fields in the message that you don’t often need to look at, and you want to de-clutter your view when looking at the message.
  • It is easier to see when messages are badly formed (see below).

Example of viewing a malformed message

As an example, imagine your application expects that the first 20 characters are the customer name; next there will be three 30 character chunks with the address lines 1, 2 and 3; and so on.

You can define such a fixed string message format to MQEdit as well, just like this:

struct CUSTADDR; Customer Address
{
  char Name[20];
  char Address1[30];
  char Address2[30];
  char Address3[30];
}

Now since your format is MQSTR, and probably all your MQSTR messages are different shapes, you can’t use the MQMD.Format field to tell MQEdit the shape of your messages, so instead, you tie the user format structure you just created, to your message, by tying it to the queue name like this:

queue APP1.CUSTOMER.ADDRESS
{
  struct CUSTADDR;
}

Then, instead of you having to remember what all the offsets inside the message are, when you are looking at what the receiving application contends is a badly formed message, you can instead have MQEdit display it to you making it easy to see the problem. Compare the two screen shots from MQEdit below. Which do you think is easier to use to spot what’s wrong with the message?

MQEdit String Message Unformatted

MQEdit showing a String Message Unformatted

MQEdit String Message Formatted

MQEdit showing a String Message Formatted

This view makes it really easy to see that the message is badly formed because there is a missing space and so the first address line is not starting at the correct offset.


If this feature interests you and you’d like to try it out for yourself, you can download MQEdit from the MQGem website and if you don’t currently have a licence, you may email support@mqgem.com to request a trial licence. Let us know what you think once you’ve had play with it.

User Formats in MQEDIT

EXTENDED FREE TRIALIn August we announced MQEdit, a Live-Parsing editor for IBM MQ, which was to run as an open beta, free for all to use, until the end of January.

This month a new driver is available for the MQEdit beta which provides function for user defined messages. MQEdit knows the format of the standard MQ messages such as MQXQH, MQDLH, MQPCF as well as XML and EDIFACT messages. However, in this release we have also added the ability to edit user defined formats. This facility allows all manner of message formats to be defined using a simple definition language. For example, the following simple definition might define a customer record message.

struct CUST; Customer Record
{
  int    Version;
  char   Name[50];
  int    CustNo;
  time32 JoinDate;
  float  Rating;
  hex    DBId[12];
  char   Address1[100];
  char   Address2[100];
  char   Address3[100];
  char   Address4[100];
}

format CUSTOMER
{
  struct CUST;
}

You can see that the syntax is very similar to a host of programming languages and, as such, is fairly intuitive to most. These definitions state that if MQEdit sees a message with a format value of ‘CUSTOMER’ it should display the message in the format of the CUST structure. Alternatively you can tie a structure definition to a queue name if you don’t use your own format values.

MQEdit showing a Formatted Customer Record

This definition is placed in a file which is then loaded into MQEdit through the User Formats tab in the Preferences dialog. If you make changes to the underlying file you can just click on Reload User Formats, there is no need to restart the editor.

MQEdit User Format file

MQEdit User Format file is loaded through the Preferences dialog

Many other data types are available and more complicated messages can be defined, if necessary. For example you can have variable length strings, variable length arrays or embedded structures. Why not give it a try and see whether your own messages can be displayed.

The product, which is in Beta phase, is free for you to download and try out until at least January 2017. You don’t even need to register any details to play with it. The product is free to download from our website.

All we ask in return is that in a week or two when you’ve played with it you send us an email telling us what you liked and what you didn’t like about the editor and perhaps what features you’d like to see in the future.

We look forward to hearing your comments. Please send them to support@mqgem.com.

MQEDIT Prize Draw at MQTCv2.0.1.6

At the recent MQTC Conference, MQGem ran a Prize Draw where one lucky entrant would win an Enterprise licence to use MQEdit for free for a year. An Enterprise licence allows your whole company to use the product worldwide.

The draw was made at lunchtime on the final day of the conference and the lucky winner was Gary Schmincke from CareFirst BlueCross BlueShield.

The prize draw winner

Gary Schmincke, The prize draw winner, with Morag Hughson (MQGem)

Gary will receive his licence file sometime before the end of January 2017 when the free beta period expires. Currently, EVERYONE can use it for free. Just go to the website and download a copy to try, no sign-up, no obligation to buy.

Announcing the MQGem Software message editor!

Have you ever needed to make a quick change to an MQ message? Or perhaps create some test messages for an application? Or perhaps the message has gone to the wrong place and you want a quick way to copy or move them to where they should be? We have a new product for you to try.

MQGem Software is pleased to announce a new product, MQEdit, a Live-Parsing editor for IBM MQ. Watch the changes happen to the message as you type. The editor has a host of features…

  • Editing of either message body or message descriptor
  • Editing either in formatted or hex mode
  • Move or Copy messages simple by drag&drop, even between Queue Managers!
  • Display different levels of message detail
  • Editing supporting in a wide range of ASCII and EBCDIC codepages
  • Direct editing of big-endian and little-endian messages
  • Automatically maintains structure integrity as you edit
  • Direct editing of PCF structures, let MQEDIT do all the hard work
  • Add and Remove message parts, such as headers and PCF structures, effortlessly
  • Display hex bytes, such as Correl Id , in predictive text
  • Find and Replace capability
  • Full Undo/Redo support
  • Full Copy/Paste support
  • Fully configurable colours and fonts
  • Bookmark store and restore position
  • Message list auto-refresh and export
  • And more…
MQEdit

Screenshot of MQEdit showing QMgr and Q filtering; ISPF colour scheme; PCF formatting; and toolbar of controls.

MQEdit runs on Windows but can connect, via the MQ Client, and edit messages, on all versions of MQ on all platforms. This includes z/OS where messages can be edited directly in EBCDIC.

The product, which is in Beta phase, is free for you to download and try out until at least January 2017. You don’t even need to register any details to play with it. The product is free to download from our website.

All we ask in return is that in a week or two when you’ve played with it you send us an email telling us what you liked and what you didn’t like about the editor and perhaps what features you’d like to see in the future.

We look forward to hearing your comments. Please send them to support@mqgem.com.