IBM Support

IT27986: Using MQRC to convert an MQ error log file to JSON format results in corrupt Japanese characters

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

  • When using the mqrc command to convert an MQ error file into
    JSON format, corrupt message text is output.  This occurs for
    languages other than English.  For example, running the command:
    
      cat AMQERR01.LOG | mqrc -i text -o json -d ja_JP -
    
    results in output similar to the following:
    
    {
      "ibm_messageId" : "AMQ8004I",
      "ibm_arithInsert1" : 0,
      "ibm_arithInsert2" : 0,
      "ibm_commentInsert3" : "QM1",
      "ibm_datetime" : "2019-01-22T19:41:52.415Z",
      "ibm_serverName" : "MY_QMGR",
      "type" : "mq_log",
      "host" : "localhost.localdomain",
      "loglevel" : "INFO",
      "module" : "amqzxma0.c:1947",
      "ibm_sequence" : "1551828271_599749890",
      "ibm_processId" : "16961",
      "ibm_threadId" : "1ƒ¼‚¸ƒ£ƒ¼ 'MY_QMGR' Œµ‚º¾Ÿ ‚"},
      "ibm_userName" : "user1",
      "ibm_installationName" : "Installation1",
      "message" : "AMQ8004I: IBM MQ ‚­ƒ¥ƒ¼ƒ»ƒžƒ
    }
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the mqrc command when using the JSON
    output format in languages other than English.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    JSON data must be encoded in UTF-8 which is not always how the
    IBM MQ message catalogues for different languages are encoded.
     The mqrc command therefore attempted to convert character data
    from the retrieved from message catalogues and written to the
    JSON output, such as for the "message" field.
    
    However, if the system locale was already running in UTF-8 and
    inherited by the mqrc command, then the message catalogue data
    would have already been converted into UTF-8 before being passed
    to the mqrc JSON output processing.  As a result, an incorrect
    attempt at an additional conversion was made.  This additional
    conversion assumed that each character in the data to convert
    was encoded using a single-byte, which resulted in a corruption
    of the already valid UTF-8 bytes.
    

Problem conclusion

  • The mqrc command has been updated to ensure that message
    catalogue data is already converted into UTF-8 before being
    passed to the JSON output processing.  As such, no further
    conversion is required or attempted.
    
    This APAR applies to all platforms except IBM i. Please see APAR
    SE71857 for the corresponding change on IBM i.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 CD    9.1.5
    v9.1 LTS   9.1.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

    IT27986

  • Reported component name

    IBM MQ BASE MP

  • Reported component ID

    5724H7271

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-02-05

  • Closed date

    2019-10-28

  • Last modified date

    2019-10-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 MP

  • Fixed component ID

    5724H7271

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":"910","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 October 2019