IBM Support

IT23987: Update JavaDoc for MQMessage.writeString(String) to describe thebehaviour when characterSet is the default value

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • The JavaDoc for the IBM MQ classes for Java method
    MQMessage.writeString(String), which can be found here:
    
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm
    .mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQMessage.html#writeSt
    ring-java.lang.String-
    
    contains the following information:
    
    "Writes a String into the message buffer at the current
    position, converting it to the codeset identified by
    characterSet."
    
    The default value of the characterSet property is MQCCSI_Q_MGR.
    The JavaDoc for this property, which can be found at the
    following URI:
    
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm
    .mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQC.html#MQCCSI_Q_MGR
    
    states:
    
    "Character data in the message is in the queue manager's
    character set."
    
    However, when an IBM MQ classes for Java application:
    
    - Runs on a distributed platform
    - And calls the method MQMessage.writeString(String)
    
    where the MQMessage object has the characterSet property set to
    the default value, the String is always encoded in coded
    character set identifier (CCSID) 819 and not the CCSID of the
    queue manager that the application is connected to.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the IBM MQ classes for Java who have
    applications that:
    
    - Create an MQMessage object and do not set the characterSet
    field on that object.
    - And then call the method <i>MQMessage.writeString(String</i>)
    to write some String data into the message.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    The JavaDoc for the MQMessage.writeString(String) method, which
    can be found here:
    
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm
    .mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQMessage.html#writeSt
    ring-java.lang.String-
    
    contained the following information:
    
    "Writes a String into the message buffer at the current
    position, converting it to the codeset identified by
    characterSet."
    
    If an application had not explicitly set the characterSet field
    on an MQMessage object, then it would have the default value of
    MQCCSI_Q_MGR. The JavaDoc for MQCCSI_Q_MGR, which can be found
    at the following URI:
    
    https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm
    .mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQC.html#MQCCSI_Q_MGR
    
    said this:
    
    "Character data in the message is in the queue manager's
    character set."
    
    This implied that if the MQMessage.writeString(String) method
    was called on an MQMessage object that has the characterSet
    field set to MQCCSI_Q_MGR, then the IBM MQ classes for Java
    would encode the String using the coded charactet set identifier
    (CCSID) of the queue manager that the application had connected
    to.
    
    However, this was not the case. If the
    MQMessage.writeString(String) was called on an MQMessage object
    that had the characterSet field set to MQCCSI_Q_MGR, then the
    IBM MQ classes for Java would check the platform that they were
    running on to determine the CCSID to use when encoding the
    String into a byte sequence:
    
    - If the IBM MQ classes for Java were running on z/OS, then the
    String would be encoded using CCSID 500.
    - For all other platforms, the IBM MQ classes for Java would
    encode the String using CCSID 819.
    

Problem conclusion

  • The JavaDoc for the MQMessage.writeString(String) method has
    been updated to say the following:
    
    ****************************************************************
    ********
    Writes a String into the message buffer at the current position,
    encoding it using the coded character set identified by
    characterSet.
    
    If characterSet is set to the default value of MQCCSI_Q_MGR,
    then the coded character set used to encode the String depends
    on
    the platform that the application is running on:
    
    - If the application is running on z/OS, then the String will be
       encoded using coded character set identifier 500.
    - For all other platforms, the String will be encoded using
    coded
       character set identifier 819.
    ****************************************************************
    ********
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.0 LTS   9.0.0.4
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT23987

  • Reported component name

    IBM MQ BASE M/P

  • Reported component ID

    5724H7261

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-02-07

  • Closed date

    2018-03-28

  • Last modified date

    2018-03-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM MQ BASE M/P

  • Fixed component ID

    5724H7261

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
28 March 2018