Author |
Message
|
datspats |
Posted: Wed Aug 29, 2007 2:00 am Post subject: Not getting output MQRFH2 header in specific format. |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
Hi,
I am receiving the messages with MQRFH2 header populated, We need to remove the details from the MQRFH2 header (all from jms,mcd,usr block) and get the details as in the format below.
RFH .......|........ ............<jms> </jms> ....<mcd> </mcd> ...,<usr><filename>ABC123.csv</filename></usr>
For the same i have done the following the code.
SET OutputRoot.Properties.MessageSet = NULL;
SET OutputRoot.Properties.MessageType = NULL;
SET OutputRoot.Properties.MessageFormat = NULL;
SET OutputRoot.MQRFH2.jms = NULL;
SET OutputRoot.MQRFH2.mcd = NULL;
SET OutputRoot.MQRFH2.jms = ' ';
SET OutputRoot.MQRFH2.mcd = ' ';
IF OutputRoot.MQRFH2.mcd.Msd IS NOT NULL OR OutputRoot.MQRFH2.mcd.Msd = ' ' OR OutputRoot.MQRFH2.mcd.Msd = 'none' THEN
DELETE FIELD OutputRoot.MQRFH2.mcd.Msd;
DELETE FIELD OutputRoot.MQRFH2.mcd.Set;
DELETE FIELD OutputRoot.MQRFH2.mcd.Type;
DELETE FIELD OutputRoot.MQRFH2.mcd.Fmt;
SET OutputRoot.MQRFH2.mcd = ' ';
END IF;
And i am getting the output as
RFH .......|........ ............<jms> </jms> ....<mcd> <Msd>none</Msd></mcd> ...,<usr><filename>ABC123.csv</filename></usr>
How do we get rid off the <Msd>none</Msd> ??? Any trick for this??
Please let me know.
Regards, |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 29, 2007 2:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Why not simply remove the RFH2? What's the value of the header with the information you're trying to remove gone? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
datspats |
Posted: Wed Aug 29, 2007 2:20 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
hi,
I need the RFH2 header with only <usr><filename></filename></usr> tag to be passed to other end, we need all others tags to be blank, But I don't want the <Msd> tag inside the <mcd> tag. but that is not getting eliminated.
I need as:
RFH .......|........ ............<jms> </jms> ....<mcd> </mcd> ...,<usr><filename>ABC123.csv</filename></usr>
I am getting as
RFH .......|........ ............<jms> </jms> ....<mcd> <Msd>none</Msd></mcd> ...,<usr><filename>ABC123.csv</filename></usr>
Please help
Regards |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 29, 2007 2:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I think the broker adds that field to indicate that no message domain is present, and I'm unconvinced you can override that behaviour. I'll wait for wiser minds in here to correct me on that.
I'm still unclear what you're trying to do. The 2 common scenarios are where a message is being read by a JMS app or similar, which can parse the header, or a traditional COBOL/C app that wants no part of it.
Can you give a few more details of why you're using this highly stripped down header, and how you arrived at this design? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
datspats |
Posted: Wed Aug 29, 2007 2:47 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
Hi,
Existing application is expecting the message header in this format only, that is why we are stripping down the header and want to get header in that format only.
Regards |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 29, 2007 2:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
datspats wrote: |
Existing application is expecting the message header in this format only |
Fair point, but why? How was this design arrived at? Clearly the existing application is RFH2 aware so can (or could) parse & ignore those parts of the header which are of no interest to it. Why use this stripped down version? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
shalabh1976 |
Posted: Tue Sep 04, 2007 4:18 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
I tried recreating the MQRFH2 header in my compute node with only the usr folder. The mcd.Msd folder is created automatically by the broker.
So it seems that there is no way to avoid this folder in MQRFH2. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
datspats |
Posted: Tue Sep 04, 2007 4:23 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
You are right , post from vitor stands true as broker add the domain property if not set. there is no way we can get rid off of the <mcd><Msd> if we have MQRFH2 folders in the message. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 04, 2007 4:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
datspats wrote: |
You are right , post from vitor stands true as broker add the domain property if not set. there is no way we can get rid off of the <mcd><Msd> if we have MQRFH2 folders in the message. |
Time to have a little word with the receiving application & tell them to change their rather odd design.
Seriously, I doubt it'll have a major impact. It's not like it needs to process the extra fields, just read over them and that's a trivial task.
Or should be. But what do I know about your application?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
datspats |
Posted: Thu Sep 27, 2007 11:13 pm Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
hi,
Trick exist to overcome <Msd>none</Msd>, put the RCD tag just before the MQoutput node. In Basic dialogue keep all properties blank, and check the Reset message domain property.
also for the MQoutput node properties in the validation dialogue box, set the validation property to "none".
This works to give result in the MQRFH2 header as <mcd><Msd> </Msd></mcd>
regards |
|
Back to top |
|
 |
Vitor |
Posted: Thu Sep 27, 2007 11:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
datspats wrote: |
This works to give result in the MQRFH2 header as <mcd><Msd> </Msd></mcd> |
I thought you didn't want an <msd> tag at all?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 28, 2007 3:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
datspats wrote: |
Existing application is expecting the message header in this format only |
Tell them to use JMS/XMS and leave you the hell alone or deal with whatever extra fields are in the MQRFH2 ...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|