Author |
Message
|
rita |
Posted: Tue Jun 25, 2002 9:54 pm Post subject: Set correlId in message |
|
|
Novice
Joined: 31 Dec 2001 Posts: 17
|
hi
I am having trouble with setting correlId is MQSI.
This is case with request-reply .
I have a field in my XML which I need to set as correlId of my message.
I used some help from one of the postings here to convert the character to blob and set OutputRoot.MQMD.CorrelId.
In the mQExplorer window- Identifiers TAB , I see that there are two values.
The value I set appears in the area beside the "CorrelationId".
And a different value appears under it. I dont know the difference between them.
So, I used another messageFlow to check if I am getting the correct value for CorrelId.
The thing is, it is not showing the correlId I set but showing something different value.
I can send you my code, if needed.
how to solve this .. |
|
Back to top |
|
 |
andystone |
Posted: Wed Jun 26, 2002 1:47 am Post subject: |
|
|
Newbie
Joined: 18 Jun 2002 Posts: 8 Location: Surrey, UK
|
If you mean the longer field directly below your correlationId, this is just the HEX ASCII codes for your correlationId (eg. A = 41).
The next field is the Group Id (below which is again the HEX codes for the data).
It would help if you described the 'messageFlow' that retrieves the CorrelationId - what platform is this running on, what options are you specifying on the GET command etc.
regards,
Andy |
|
Back to top |
|
 |
rita |
Posted: Wed Jun 26, 2002 1:54 pm Post subject: |
|
|
Novice
Joined: 31 Dec 2001 Posts: 17
|
Hi
This is the continuation of my previous question:
If the message Id is 414D512057494E3120202020202020202FC1183D02A10300
and if I convert this into BLOB using following logic
--
SET V_I = 1;
WHILE V_I <= 24 DO
IF V_I <= V_LENGTH THEN
SET V_BYTE = '3' || SUBSTRING(V_CORREL_CHAR FROM V_I FOR 1);
ELSE
SET V_BYTE = '00';
END IF;
SET V_CORREL_HEX = V_CORREL_HEX || V_BYTE; 3431343D
SET V_I = V_I + 1;
END WHILE;
And I use CAST -
SET OutputRoot.MQMD.CorrelId = CAST(V_CORREL_HEX AS BLOB);
But CorrelId in the output is: 414=512057494>3120202020
huh ..huh ..  |
|
Back to top |
|
 |
kirani |
Posted: Wed Jun 26, 2002 2:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Rita,
I am bit confused here. Please help me understand your objective.
Your MQMD.MsgId is already in BLOB format, you don't have to CAST it explicitly.
Is your XML field going to have fixed lenght data to be sent as CORRELID? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rita |
Posted: Wed Jun 26, 2002 2:20 pm Post subject: |
|
|
Novice
Joined: 31 Dec 2001 Posts: 17
|
This is my repost and probably would help you in understanding.
DECLARE V_BYTE CHAR;
DECLARE V_LENGTH INTEGER;
DECLARE V_I INTEGER;
SET V_CORREL_CHAR = WareHouse.Data.MessageId; ( this is my xml data which is actually 414D512057494E3120202020202020202FC1183D02A10300 & this is what I am trying to set as the correlId of my outgoing message.)
SET V_LENGTH = LENGTH(V_CORREL_CHAR);
SET V_CORREL_HEX = '';
SET V_I = 1;
WHILE V_I <= 24 DO
IF V_I <= V_LENGTH THEN
SET V_BYTE = '3' || SUBSTRING(V_CORREL_CHAR FROM V_I FOR 1);
ELSE
SET V_BYTE = '00';
END IF;
SET V_CORREL_HEX = V_CORREL_HEX || V_BYTE; 3431343D
SET V_I = V_I + 1;
END WHILE;
And I use CAST -
SET OutputRoot.MQMD.CorrelId = CAST(V_CORREL_HEX AS BLOB);
But CorrelId in the output is: 414=512057494>3120202020 |
|
Back to top |
|
 |
kirani |
Posted: Wed Jun 26, 2002 3:16 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
It is very simple then!!
SET OutputRoot.MQMD.CorrelId = CAST(WareHouse.Data.MessageId AS BLOB);
(Make sure you reference to XML element correctly). _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rita |
Posted: Wed Jun 26, 2002 7:32 pm Post subject: |
|
|
Novice
Joined: 31 Dec 2001 Posts: 17
|
kirani
I tried that first. It wasn't working so I used this whole big thing.
Anyway I could solve it myself. Now its working.
thanks for your time |
|
Back to top |
|
 |
ASanjar |
Posted: Fri Jun 28, 2002 10:07 pm Post subject: |
|
|
Newbie
Joined: 28 Jun 2002 Posts: 5
|
rita, I have a same problem. would you tell me how you fixed it . thanks.. |
|
Back to top |
|
 |
|