JMS application puts a message which is not converted when the getting application does MQGET with convert.
You write a WebSphere MQ JMS application used for pubsub. Your application sends messages which contain MQMD + MQRFH + MQRFH2 + User Data. You have a C application which gets the message using the convert option. If you send the message to a Windows queue manager this works as expected. If you send the message to an AIX queue manager the messages are not converted, however they do not produce any error message or FDC.
MQ data conversion begins by comparing the encoding and CCSID specified in the MQMD to the encoding and CCSID specified in the MQGET call. The conversion procedure is called only if they are different. If the format specified in the MQMD indicates that the message data contains an MQRFH then the CCSID and encoding in the MQRFH is checked. If, at this stage, the CCSID and encoding are the same as the requested ones, MQ exits the conversion procedure immediately and does not continue to perform checks on any subsequent chained headers in the rest of the message. This is an optimization to prevent unnecessary and expensive calculations when performing data conversion.
Your program uses the default MQMD.CodedCharSetId and MQMD.Encoding values when getting the message off the queue. These values are set to point to the queue manager's CCSID and encoding.
On AIX, your queue manager's CCSID is set to 819, and the native encoding is 273. The message MQMD has CCSID 819 and encoding 273 for the first MQRFH header (so no conversion is performed for the first MQRFH header). MQ then looks into the first MQRFH header in the message data, which also has a CCSID of 819 and encoding 273 for the MQRFH2 header, and therefore no conversion is needed. MQ exits the conversion procedure immediately without looking further into the next header to determine the CCSID and encoding for the rest of the message.
On Windows, the same applies. However, the actual encoding and CCSID in the message are not all the same as the queue manager. Your queue manager has native encoding of 546 and the CCSID is set to 1252. The message MQMD also has encoding 546 and CCSID of 1252. MQ then looks into the first MQRFH header in the message data and finds encoding of 273 and CCSID of 819. Since this is different, the conversion routines are called.
Resolving the problem
In order for conversion to take place you must set the CCSID or encoding of the MQMD or MQRFH such that one of them is different from that of the queue manager. We suggest that you alter the CCSID in the first MQRFH (for MQRFH2) to 1208, since this is a different CCSID than either of the queue managers (AIX or Windows). For alpha-numeric data in the MQRFH or MQRFH2 headers, the conversion from 819 or 1252 to 1208 should not affect the data.
In order to change the CCSID in the message headers a JMS application must use client connections. The current design does not allow a JMS application in bindings mode to change the CCSID.
62565 B665 C706
More support for:
Software version: 5.3, 6.0, 7.0, 7.0.1, 7.5
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1212795
Modified date: 21 May 2013