Author |
Message
|
LH33 |
Posted: Thu Mar 10, 2005 6:15 am Post subject: Global Unique ID into CorrellId |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
HI!
An application creates a Globally Unique ID and passes it in an XML stream to a message flow. The message flow is attempting to put the ID into the MQMD.CorrellId to use for another application to match up a reply message. At first, it threw a recoverable exception: text = wrong type exception, number = 2328. I then tried to cast the ID as BLOB and it threw a parser exception: text = the length must be correct, number = 6106.
Can someone advise if this can be done and how?
Thanks! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 10, 2005 6:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, first of all, http://www.mqseries.net/phpBB2/viewtopic.php?p=88077#88077
But yes, you can do this. The correlation ID can only be 24 bytes long. So if the GUID is longer than that, you will have to understand how to truncate it so that it is still unique.
I am a little confused about the overall processing you are trying to do, so I can't really suggest a better option. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
LH33 |
Posted: Thu Mar 10, 2005 2:03 pm Post subject: |
|
|
Master
Joined: 21 Nov 2002 Posts: 200
|
IF the ID is truncated to 24 and it is a character type, can that be put in the CorrelID field since the CorrelID field is byte string? |
|
Back to top |
|
 |
JT |
Posted: Thu Mar 10, 2005 2:14 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
You have to 'cast' it as BLOB. Something like this:
Code: |
SET OutputRoot.MQMD.CorrelId = CAST(SUBSTRING(GUID FROM 1 FOR 24) AS BLOB CCSID InputRoot.MQMD.CodedCharSetId); |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 10, 2005 5:22 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
JT wrote: |
You have to 'cast' it as BLOB |
LH33 wrote: |
I then tried to cast the ID as BLOB |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Thu Mar 10, 2005 7:46 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
She may have attempted to cast the GUID as a BLOB, but obviously more than the 24 bytes the CorrelId can accomodate.
Quote: |
I then tried to cast the ID as BLOB and it threw a parser exception: text = the length must be correct |
|
|
Back to top |
|
 |
nathanw |
Posted: Fri Mar 11, 2005 4:39 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
there is also an error that occurs if it is less than 24bit
so if it is less then it will have to be padded to 24 |
|
Back to top |
|
 |
|