MQ

 View Only
  • 1.  Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)

    Posted Tue May 07, 2024 10:42 AM

    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
    ------------------------------


  • 2.  RE: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)

    IBM Champion
    Posted Wed May 08, 2024 05:36 AM
    Edited by Francois Brandelik Wed May 08, 2024 05:36 AM

    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
    ------------------------------



  • 3.  RE: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)

    Posted Wed May 08, 2024 10:22 AM

    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
    ------------------------------



  • 4.  RE: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)

    Posted Wed May 08, 2024 10:28 AM

    Additionally, the qmgr CCSID is configured to 1208.



    ------------------------------
    JUN SHAO
    ------------------------------



  • 5.  RE: Spring Boot 3.1 JMS application - 'CodedCharSetId' not setting to 5026 in IBM MQ v9.3 (Linux)

    IBM Champion
    Posted Thu May 09, 2024 08:58 AM
    Edited by Francois Brandelik Thu May 09, 2024 08:59 AM

    Looks like 930 and 5026 CCSIDs have the same label.

    5026 is an EBCDIC CCSID, this means that you might only get 930  as close enough on a distributed system...

    Either let the MF handle the translation with a get with convert... or you can try out the following trick:

    1. Set the Destination CCSID to 5026
    2. Verify that there is a translation table from 1208 to 5026
    3. Post the message with the default CCSID of 1208
    4. Let MQ take care of the translation...

    Hope it helps



    ------------------------------
    Francois Brandelik
    ------------------------------