Thanks for the quick turnaround! Before I dive into the details, I just wanted to add some background information about this question.
We're currently migrating our MQ servers across three platforms (Z/OS, Windows, and Linux). One of the Z/OS servers will be replaced with a new Linux server. However, the existing Windows and Linux servers won't have any changes to their MQ configurations.Before the migration, messages were sent from the Z/OS server to both the Windows and Linux servers. The MQMD (message descriptor) of these messages has a 'CodedCharSetId' of 5026.
To avoid any disruption on the receiving servers, we want to keep the 'CodedCharSetId' at 5026 in the messages sent from the new Linux server. Otherwise, character encoding mismatches might occur during message reception, leading to garbled characters.
It seems the 'CodedCharSetId' of 5026 is always getting overwritten to 930, likely due to a definition in the ccsid.tbl file. As a potential solution, could we add another definition for 5026 in the ccsid_part2.tbl file? Your advice on this approach would be much appreciated.
------------------------------
JUN SHAO
------------------------------
Original Message:
Sent: Wed May 08, 2024 05:35 AM
From: Francois Brandelik
Subject: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)
Did you make sure that the connection factory set the CCSID to 1208?
You are moving from one character 930 set to the other 5026: did you make sure that there was no incompatibility between those sets?
1208 is UTF-8 and should have an equivalence table with almost any ccsid out there.
I would request the messages to be in UTF-8 when being put so that there are no CCSID translation problems.
In the extreme change the qmgr CCSID to 1208 and bounce the qmgr.
------------------------------
Francois Brandelik
Original Message:
Sent: Tue May 07, 2024 01:14 AM
From: JUN SHAO
Subject: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)
I'm trying to set the 'CodedCharSetId' attribute to 5026 within the MQMD header for messages sent from my Spring Boot 3.1 JMS application to an IBM MQ server (v9.3, Linux).
Here's what I've done:
1. MessagePostProcessor Implementation:
I created a JmsMessagePostProcessor class to modify the message properties before sending.
Inside the postProcessMessage method, I'm setting the following properties:
- WMQConstants.JMS_IBM_ENCODING to '785' (assuming this represents the desired encoding)
- WMQConstants.JMS_IBM_CHARACTER_SET to '5026' (the target character set)
2. Sending the Message:
I'm using the convertAndSend method of org.springframework.jms.core.JmsTemplate to send the message to the MQ server.
The Problem:
- I expect the MQMD to show:
Encoding: 785 CodedCharSetId: 5026
- However, the actual MQMD shows:
Encoding: 785 CodedCharSetId: 930 (This value seems to be overridden)
What's Odd:
I can successfully set CodedCharSetId to other values like 932, but specifically for 5026, it always gets overridden to 930.
Request for Advice:
Can you suggest any reasons why this might be happening and how I can ensure the CodedCharSetId is set to 5026 in the MQMD?
Thanks in advance!
------------------------------
JUN SHAO
------------------------------