APAR status
Closed as program error.
Error description
XMS .NET Core applications return an invalid payload to the application if the application receives a message with CCSID 37 & Encoding set as 785. When the same message was read with the MQ .NET coreAPI (not XMS), it produced the following error: Error: System.NotSupportedException: 'No data is available for encoding 37. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.' Stack: at System.Text.Encoding.GetEncoding(Int32 codepage) at IBM.WMQ.ManagedCommonServices.GetEncoding(Int32 ccsid) at IBM.WMQ.ManagedCommonServices.ConvertString(String objectId, Int32 fromCCSID, Int32 toCCSID, Byte[] inString, Int32 inLength, Byte[]& outString, Int32& outLength, Int32 options, UInt32& bytesConverted) at IBM.WMQ.CommonServices.ConvertString(String objectId, Int32 fromCCSID, Int32 toCCSID, Byte[] inString, Int32 inLength, Byte[]& outString, Int32& outLength, Int32 options, UInt32& bytesConverted) at IBM.WMQ.CommonServices.ConvertString(Int32 fromCCSID, Int32 toCCSID, Byte[] inString, Int32 inLength, Byte[]& outString, Int32& outLength, Int32 options, UInt32& bytesConverted) at IBM.WMQ.MQMessage.ReadString(Int32 length) at IBM.MQ.DOTNETCORE.WITH.TLS.Program.Main(String[] args) in C:\git\messagingcoremqxmsstd\test\Benchmarkings\IBM.MQ.DOTNETCOR E.WITH.TLS\Program.cs:line 124 When MQGMO_CONVERT is added the same stack now reports error : Error: System.NotSupportedException: 'No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.'
Local fix
A workaround is to add the System.Text.Encoding.CodePages nuget package and the following line of code to the program: Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
Problem summary
**************************************************************** USERS AFFECTED: XMS .NET Core applications receiving a message which is sent by a mainframe application. Platforms affected: Linux on x86-64, Windows **************************************************************** PROBLEM DESCRIPTION: XMS .NET core application was unable to read a JSON formatted message sent by a mainframe application.The libraries were returning an invalid message payload to the application instead of throwing an exception.
Problem conclusion
XMS .NET libraries have been modified to throw an exception if the libraries fail to convert a message with an encoding that is not part of the default encoding list provided by .NET. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v9.2 LTS 9.2.0.25 v9.3 LTS 9.3.0.10 v9.x CD 9.3.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
IT42821
Reported component name
MQ BASE V9.2
Reported component ID
5724H7281
Reported release
920
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2023-01-03
Closed date
2023-08-08
Last modified date
2023-10-05
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
MQ BASE V9.2
Fixed component ID
5724H7281
Applicable component levels
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
05 October 2023