ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Set correlId in message

Post new topic  Reply to topic
 Set correlId in message « View previous topic :: View next topic » 
Author Message
rita
PostPosted: Tue Jun 25, 2002 9:54 pm    Post subject: Set correlId in message Reply with quote

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
View user's profile Send private message
andystone
PostPosted: Wed Jun 26, 2002 1:47 am    Post subject: Reply with quote

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
View user's profile Send private message
rita
PostPosted: Wed Jun 26, 2002 1:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Wed Jun 26, 2002 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rita
PostPosted: Wed Jun 26, 2002 2:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Wed Jun 26, 2002 3:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rita
PostPosted: Wed Jun 26, 2002 7:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
ASanjar
PostPosted: Fri Jun 28, 2002 10:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Set correlId in message
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.