Reputation: 23
Using IIB 10 and MQ 9. The problem is that when you add the mqrfh2 header, its part appears in the body:
SET OutputRoot.MQMD.CodedCharSetId = InputRoot.Properties.CodedCharSetId;
SET OutputRoot.MQMD.Format = 'MQRFH2';
SET OutputRoot.MQMD.Version = MQMD_VERSION_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQRFH2';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = MQRFH_VERSION_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = InputRoot.Properties.CodedCharSetId;
SET OutputRoot.MQRFH2.usr.errorDescription = FIELDVALUE(Environment.Variables.exceptionMsg);
Upvotes: 0
Views: 836
Reputation: 7476
I think you need to read the documentation for an MQRFH2 message. All folders and the header of an MQRFH2 message are in the MQ message body. If the receiving application cannot handle an MQRFH2 message then treat it as a JMS message or a plain message with named properties.
In case you did not know:
MQRFH2 message == JMS message == plain message with named properties (aka message properties)
Updated:
I just noticed this line:
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQRFH2';
This is probably your problem. You are embedding an MQRFH2 message within an MQRFH2 message. Change to it the following:
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
This says that the message data for the MQRFH2 message is to be considered to be string data (i.e. JMSTextMessage).
Upvotes: 3