Author |
Message
|
prat31 |
Posted: Wed Sep 18, 2013 6:13 am Post subject: How to set bthe corelation ID. |
|
|
Apprentice
Joined: 01 Feb 2013 Posts: 30
|
Hi All,
How can I assign a Correlation Id of 11 in the output message.
Thanks... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Sep 18, 2013 6:15 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
prat31 wrote: |
Hi All,
How can I assign a Correlation Id of 11 in the output message.
Thanks... |
SET MQMD.CorrelId = 'some Id';
Or- you could look it up in the documentation. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 18, 2013 6:26 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
prat31 wrote: |
Hi All,
How can I assign a Correlation Id of 11 in the output message.
Thanks... |
SET MQMD.CorrelId = 'some Id'; |
No you don't - a CorrelId is not a string and shouldn't be treated as such. You should know better.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 18, 2013 6:28 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
prat31 wrote: |
How can I assign a Correlation Id of 11 in the output message. |
You shouldn't want to. A correlation id is a byte array not a string and you should not be assigning a string to it. Furthermore you should be correlating on a message or other id not an arbitrary value.
Why do you think you need to do this? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Sep 18, 2013 6:29 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Vitor wrote: |
lancelotlinc wrote: |
prat31 wrote: |
Hi All,
How can I assign a Correlation Id of 11 in the output message.
Thanks... |
SET MQMD.CorrelId = 'some Id'; |
No you don't - a CorrelId is not a string and shouldn't be treated as such. You should know better.  |
Hence my prompt to refer to the doc. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 18, 2013 6:35 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
Hence my prompt to refer to the doc. |
And your endorsement of the techique with a code snippit demonstrating a string being assigned was because?
Why would the OP bother to look in the doc when the code snippit clearly showed what they needed and the documentation an alternative (unless "or" means something else to you)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Sep 18, 2013 6:38 am Post subject: Re: How to set bthe corelation ID. |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Vitor wrote: |
lancelotlinc wrote: |
Hence my prompt to refer to the doc. |
And your endorsement of the techique with a code snippit demonstrating a string being assigned was because?
Why would the OP bother to look in the doc when the code snippit clearly showed what they needed and the documentation an alternative (unless "or" means something else to you)? |
Ok, I relent. There is much more to setting the CorrelId than assigning a string. But if the OP wants us to post a code snippet or a Google link, then I think thats not the right action either. The OP should exercise his brain to derive the information. Which is that the CorrelId is a 24 byte blob, not a character string, therefore, some field conversion needs to happen to strings. And the result must be exactly 24 bytes, so some filler may be required. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
|