Author |
Message
|
dipankar |
Posted: Fri Dec 08, 2006 7:10 am Post subject: Unable to set Msd in mcd of MQRFH2 for BLOB msg |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi,
I have BLOB message as input. I want to dynamically set message set, msg domain, msg type and msg format with help of MQRFH2 header. However I am unable to do that. I know this can be done by CREATE STATEMENT. However I am playing with MQRFH2 header. All properties is getting set except Msd. It is getting blank. Is this a bug?
My environment is WBI MB6.0, FIxpack -2. Should I apply Fixpack 3?
I have also gone through the following post
http://www.mqseries.net/phpBB2/viewtopic.php?t=31866&highlight=mcd+msd
Please guide me. _________________ Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 08, 2006 7:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The Msd only applies when a message is received by the MQInput node.
Adding one inside a flow won't do anything other than set it for the output message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dipankar |
Posted: Fri Dec 08, 2006 8:19 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Jeff,
Please see what I am trying
MF1:
MQInput Node --->Compute Node1 ---->MQOutput (Q1)
MF2
MQInput(Q1) ---Compute Node2 --> MQOutput
Here in MF1, MQInput gets a blob message. Compute Node1 will just dynamically set the MQRFH2 header and send that to queue (Q1).
in MF2, I have set the domain 'blob in MQInput node. As I have Ãncorporated MQRFH2 header into the message before, this MQInput should automatically parse the message as per MQRFH2 header. Is this correct? Please clarify me.
However, I am unable to set Msd as 'mrm' in the mcd folder in MF1. It is getting blank after the first compute node although in the debug mode, it is showing set. All other properties like mcd.Set, mcd.Fmt are populated. _________________ Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 08, 2006 8:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you explicitly set MQInput Default to BLOB DOMAIN, it will always parse as BLOB.
Set MF2 to use MRM as domain. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vk |
Posted: Fri Dec 08, 2006 9:40 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
You can try the following code in the compute node 1 in MF1
Quote: |
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageSet = 'Your Message Set ID';
SET OutputRoot.Properties.MessageType = 'Your Message name';
SET OutputRoot.Properties.MessageFormat = 'Your Wire Format';
SET OutputRoot.MQMD.Format = 'MQHRF2 ';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM' PARSE(InputRoot.BLOB.BLOB SET 'Your Message Set ID' TYPE 'Your Message Name' FORMAT 'Your Wire Format'); |
Regards,
VK. |
|
Back to top |
|
 |
EddieA |
Posted: Fri Dec 08, 2006 11:27 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Why use an intermediate Q, as this will add overhead, especially if the message is persistent.
Work out which Message to use, and then PARSE the BLOB.
Cheers. _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 08, 2006 11:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
EddieA wrote: |
Why use an intermediate Q, as this will add overhead, especially if the message is persistent. |
Because maybe dipankar is writing a generic routing&identification flow, and doesn't want to put the transformation logic for every different message type into a single flow? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dipankar |
Posted: Mon Dec 11, 2006 12:20 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
VK -- you are correct. I have already mentioned that it can be done by CREATE statement with parse. I am just looking for another alternative solution.
Jeff,
you are correct. I just wanted to route the message to specific transform message flow depending on the target system and message type. Please see the common input message structure -
Header
MsgBody
Header contains some fields which denote the target system and the type of msg (MsgBody). There are so many message type. That's why in MF1, I just wanted the pass the MsgBody as blob with MQRFH2 header. In MF2, it will automatically parse the MsgBody as I have set the mcd folder. I can easily implement with create statement. But I want to check why MQRFH2 is not working.
I don't want to use multipart message as it will create a big message set due to so many message type which might impact the performance.
My question is I am unable to set Msd as 'mrm' in MQRFH2 header while output message domain is BLOB.
Could you give me some light of using mcd folder of MQRFH2 header? Could I set the mcd folder (Msd, Set,Type,Fmt) as per my requirements irrespective of the message domain, set, format of the output message body in compute node?
Your help will be highly appreciated. _________________ Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 11, 2006 4:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should be able to create a properly formatted MQRFH2 header, with any legal values in it, regardless of what Message Domain or etc. that you are using within the flow.
You need to concentrate on the output from flow 1, and worry about the rest of the flows later.
Can you post a Trace Node output of your message before the MQOutput node? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
dipankar |
Posted: Tue Dec 12, 2006 1:04 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi Jeff,
Quote: |
You need to concentrate on the output from flow 1, and worry about the rest of the flows later. |
I just wanted to create output messages from MF1 with proper MQRFH2.
Please see the ESQL:
Code: |
CALL CopyMessageHeaders();
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
--Create MQRFH2 header
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = MQFMT_STRING;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding = InputProperties.Encoding;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId = InputProperties.CodedCharSetId;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Flags = 0;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
--Set mcd folder
SET OutputRoot.MQRFH2.mcd.Msd= 'mrm';
SET OutputRoot.MQRFH2.mcd.Set = 'F793E74002001';
SET OutputRoot.MQRFH2.mcd.Type = InputRoot.MRM.AMI_Header.MsgType;
SET OutputRoot.MQRFH2.mcd.Fmt = InputRoot.MRM.AMI_Header.Format;
--Create MsgBody
CREATE LASTCHILD OF OutputRoot DOMAIN ('BLOB');
SET OutputRoot.BLOB.BLOB = CAST(InputBody.MsgBody AS BLOB CCSID InputProperties.CodedCharSetId); |
Here is the trace
Quote: |
(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'F793E74002001'
(0x03000000):MessageType = 'MSGCWF'
(0x03000000):MessageFormat = 'CWF'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-12-11 14:48:09.460'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'IN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQHRF2'
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b5f514d202020202061fd7c4520001905'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK_QM '
(0x03000000):UserIdentifier = 'dipankarp '
(0x03000000):AccountingToken = X'16010515000000d82e5539cd732c0682df427cee03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'C:\RFHUtil4\rfhutil.exe '
(0x03000000):PutDate = DATE '2006-12-11'
(0x03000000):PutTime = GMTTIME '14:48:09.460'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'none'
)
(0x01000000):Set = (
(0x02000000): = 'F793E74002001'
)
(0x01000000):Type = (
(0x02000000): = 'MSGCWF'
)
(0x01000000):Fmt = (
(0x02000000): = 'CWF' )
)
)
(0x01000000):BLOB = (
(0x03000000):BLOB = X'343531333938446970616e6b6172205061756c202020453633'
)
) |
I have added a break point inside ESQL of Compute node1 and a break point after compute node1.
While debugging, I have seen that Msd is populated with mrm' in OutputRoot tree inside the compute node1. However after compute node1 (2nd break point), it is reset by none.
Quote: |
You should be able to create a properly formatted MQRFH2 header, with any legal values in it, regardless of what Message Domain or etc. that you are using within the flow. |
But I am unable to do that. I noticed that everytime message.properties(Format, Set, Type) is reset by MQRFH2 after compute node (marked as bold in the trace). Here my output message is blob. So I don't want to set OutputRoot.Properties.MessageSet or MessageType etc - just want to set mcd in MQRFH2 and Output properties will remain same as per MsgBody so that MQOutput node is able put the message on the queue.
Please correct me if I am wrong. _________________ Regards |
|
Back to top |
|
 |
dipankar |
Posted: Wed Dec 13, 2006 12:45 am Post subject: |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Anyone from IBM Hursley?
Is this bug? _________________ Regards |
|
Back to top |
|
 |
vk |
Posted: Wed Dec 13, 2006 7:32 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
The mcd folder values in the MQRFH2 header will get reset based on the message body. Since your message body is BLOB, it is correct for the message domain to become 'none' after the compute node.
The Format field in a header should identify the format of the data coming immediately after it. In your case, MQMD.Format should be MQFMT_RF_HEADER_2 and MQRFH2.Format should be MQFMT_NONE, since the message body is BLOB. It is not correct to give the MQRFH2.Format as MQFMT_STRING in this case.
In order to get message set definition values in the mcd folder of the MQRFH2 header, you have to provide an MRM tree from the compute node to the output node. At the output node, before the message is put into the queue, the MRM tree will be converted into a BITSTREAM with all validations done based on the settings in the Properties tree. At this time, the mcd folder in MQRFH2 header will also be populated with required values. Any values already set in previous compute nodes will be reset.
This is my understanding. Hope this helps.
Regards,
VK. |
|
Back to top |
|
 |
visasimbu |
Posted: Mon Jun 14, 2010 7:16 pm Post subject: |
|
|
 Disciple
Joined: 06 Nov 2009 Posts: 171
|
I have exactly same problem what dipankar is explained. Kindly give the solution for the problem.
Thanks in advance.
 |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 15, 2010 5:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
visasimbu wrote: |
I have exactly same problem what dipankar is explained. |
Unlikely. That was 4 years ago and on the software version current then. If you have a similar problem, it's considered polite to open a new thread with a reference rather than reopen a 4 year old one.
visasimbu wrote: |
Kindly give the solution for the problem.
|
The explaination above (which is still valid) didn't help?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|