I am trying to solve a problem with an application that sends a message to the SWIFT network. The application is a .NET application and uses the IBM assembly amdqmdnet.dllto communicate with the WebSphere MQ server. The WebSphere MQ server runs SWIFT Alliance software.
Messages are sent from the application, but are not included in the SWIFT network. Some research showed the following error message:
MQSeries Queue 'MQSWIFT/SWIFT.SENDER', Nbr 123, Session 4567, Sequence 890, Conversion error (From)
MQ Msg Id : AMQ MQSWIFT <XX><XX><XX>X <X>-<XX>
Message Info : Error in FIN block 1: can not find tag F01 in message
{.1.:.F.0.1. (rest of message removed)
The beginning of the sent message {1:F01, and for me it looks like the message is encoded in UNICODE (UTF-16), but the SWIFT software expects ASCII. SWIFT software sees {.1.:.F.0.1..
My question is: how do I send a message to the WebSphere MQ queue using ASCII encoding?
The compound has properties MQC.TRANSPORT_PROPERTY, MQC.HOST_NAME_PROPERTYand MQC.CHANNEL_PROPERTY.
The queue opens using the MQC.MQOO_OUTPUTand options MQC.MQOO_FAIL_IF_QUIESCING.
The message is created using the MQC.MQFMT_STRINGdefault message format and parameters:
var mqMessage = new MQMessage { Format = MQC.MQFMT_STRING };
mqMessage.WriteString(swiftMessage);
var mqMessageOptions = new MQPutMessageOptions();
queue.Put(mqMessage, mqMessageOptions);
I noticed that the enumeration MQChas a value CODESET_819that probably refers to ASCII, but I have no idea if I need to use it and how.
source
share