Author |
Message
|
vijsam |
Posted: Tue Dec 13, 2011 6:17 am Post subject: MQIIH header is coming after actual data |
|
|
Apprentice
Joined: 01 Jun 2011 Posts: 46
|
I am trying to add the MQIIH . I am able to do that using the SET OutputRoot.MQIIH.
Actually THE MQIIH header should be at the start of the data along with LL,ZZ,Trancode.but the actual data is coming first followed by MQIIH header.Please  |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Dec 13, 2011 6:20 am Post subject: Re: MQIIH header is coming after actual data |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
vijsam wrote: |
I am trying to add the MQIIH . I am able to do that using the SET OutputRoot.MQIIH.
Actually THE MQIIH header should be at the start of the data along with LL,ZZ,Trancode.but the actual data is coming first followed by MQIIH header.Please  |
Well you have to create the MQIIH header before the parser...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 13, 2011 6:21 am Post subject: Re: MQIIH header is coming after actual data |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijsam wrote: |
I am trying to add the MQIIH . I am able to do that using the SET OutputRoot.MQIIH. |
Yes, that adds the header. It adds it to the message tree. At the end. Nothing in WMB knows where a given section should be placed.
vijsam wrote: |
Actually THE MQIIH header should be at the start of the data along with LL,ZZ,Trancode.but the actual data is coming first followed by MQIIH header. |
Quite right. So write ESQL that adds the header in the place it needs to be (either before the data or after the MQMD depending on how you look at it).
(And that's a hint ) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vijsam |
Posted: Tue Dec 13, 2011 6:37 am Post subject: |
|
|
Apprentice
Joined: 01 Jun 2011 Posts: 46
|
Do i need to create a new message defination file for adding MQIIH headers ?
I have added the MQIIH code at starting of the flow.
Do i need to add it in Copy Message headers?
 |
|
Back to top |
|
 |
inMo |
Posted: Tue Dec 13, 2011 6:41 am Post subject: |
|
|
 Master
Joined: 27 Jun 2009 Posts: 216 Location: NY
|
I'm just restating what has already been stated in a slightly different way. It might shed a different light on the hint.
Quote: |
SET OutputRoot.MQIIH |
This adds the MQIIH header to the bottom of the currnt output tree. This action is apparently not what you want at the time you execute that line of code. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 13, 2011 6:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijsam wrote: |
Do i need to create a new message defination file for adding MQIIH headers ? |
No you seem to have one that works, i.e. the IBM supplied one in WMB.
vijsam wrote: |
Do i need to add it in Copy Message headers? |
Do not add code to the IBM supplied procedures!
There's more than one way to add to a message tree; my most worthy associate has a subtle hint in his post which adds to mine. All you need is ESQL which adds the MQIIH header but specifies where in the tree it should be positioned; either before the data or after the MQMD. The SET statement does not provide this facility. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
vijsam |
Posted: Tue Dec 13, 2011 6:59 am Post subject: |
|
|
Apprentice
Joined: 01 Jun 2011 Posts: 46
|
Thank you all for the quick response
Quote: |
All you need is ESQL which adds the MQIIH header but specifies where in the tree it should be positioned; either before the data or after the MQMD |
Can you Please elobarate ...  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 13, 2011 7:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijsam wrote: |
Can you Please elobarate ...  |
Not without writing the code for you.
Oh, why not, it's nearly Xmas. Use a CREATE statement rather than a SET statement. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 13, 2011 7:59 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
vijsam wrote: |
Can you Please elobarate ...  |
Not without writing the code for you.
Oh, why not, it's nearly Xmas. Use a CREATE statement rather than a SET statement. |
Or use a SET statement BEFORE you use a Set statement that address OutputBody or OutputRoot.<parser>. AND only use CopyMessageHeaders and not CopyEntireMessage(). |
|
Back to top |
|
 |
|