Character encoding issue when posting a message to a queue that is configured on a mainframe machine
Posted on 2010-11-12
We are facing an issue with character encoding when posting a message to a queue that is configured on a mainframe machine.
Here are the details of the setup:
Sender: JMS using Websphere MQ Client API version 6
Receiver: Mainframe server with CCSID value for queue manager set to 500 (EBCDIC)
When we send the message from sender, and retrieve it using JMS api’s, message is available in the correct format. However, if message is retrieved on the mainframe server, it has additional special characters at the beginning of the message.
If the message is sent using MQ API’s directly (bypassing JMS), and MQMessage.characterSet property is set to 500, the message is retrieved correctly without any special characters on the mainframe server.
We need to know the equivalent message property that needs to be set from JMS API’s that will have the same effect as setting MQMessage.characterSet from MQ API’s directly.
Already tried setting JMS_IBM_Character_Set to 500 on TextMessage instance but this doesn’t work.
Also, please let us know how to remove JMS specific header from the message before it is posted to the queue. We think, this is creating the problem as the message body is correctly converted.