WebSphere MQ Data Conversion
RichardHamilton 060001RC0R Visits (10459)
Are you having problems with "Data Conversion"? Are "Data Conversion" problems driving you mad? These problems can be difficult to diagnose, so let's talk about how conversion works, and then consider ways to avoid the problems.
In most cases message data is converted by the receiving application, and this is the method that I recommend. Your message data is converted when you specify the MQGMO_CONVERT option on your MQGET call. Message data can also be converted when CONVERT(YES) is specified on your sending channel. There are situations where you need to use one conversion method, rather than the other, but you should NEVER use both.
The most common problem is an incorrect specification in the Format field of the MQMD structure. The application that does the MQPUT must use an MQMD Format that is valid on the machine where the MQGET is performed. Most messages contain string data (non numeric data), and should use the built-in format (MQFMT_STRING). However, if your messages contain non-string data, then you must define your own format, and write your own data conversion program.
There are many built-in formats that are supplied by WebSphere MQ. MQ converts all of the message data for you when you use the built-in formats, however the built-in formats are not available on all platforms. For example, the CICS format MQFMT_CICS, and the IMS format MQFMT_IMS are not available on most platforms. Messages that use these built-in formats must be routed to remote systems that support the format, or converted on the sending system using the CONVERT(YES) option on your sending channel.
I was speaking with some WebSphere MQ L2 Support folks this week, and they mentioned that they are getting a lot of problem records (PMRs) relating to data conversion problems. We made some revisions to the MustGather technotes (see link below), and came up with a fairly comprehensive list that will help you gather the documentation that will help the L2 Support Team diagnose and resolve your problems.
An example of the documentation required for a data conversion problem on z/OS is shown below in Figure 1:
Figure 1 (click to enlarge)
You can navigate to all WebSphere MQ MustGather technotes from here: MustGather: Read first for WebSphere MQ