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 » How to put parts of a message into multiple queues

Post new topic  Reply to topic
 How to put parts of a message into multiple queues « View previous topic :: View next topic » 
Author Message
kumar.shanj
PostPosted: Thu Dec 02, 2010 10:42 am    Post subject: How to put parts of a message into multiple queues Reply with quote

Apprentice

Joined: 18 Nov 2010
Posts: 49

I am retrieving multiple rows from the Database and based on the value of a value in each row,i want to put that message row data into various different queues.

Ex : I am retrieving 5 row of data from database and in each row of data, a column called country as "UK" or "Poland" will be there.
Based on country data i need to put that entire row data into different queue.

Please help in this regard.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 02, 2010 10:50 am    Post subject: Re: How to put parts of a message into multiple queues Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kumar.shanj wrote:
Please help in this regard.


I'd use the mechanism you finally got to work here if I were you. Putting the PROPAGATE back in of course.

Calculating which queue relates to which column value is a simple piece of code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kumar.shanj
PostPosted: Fri Dec 03, 2010 4:41 am    Post subject: Reply with quote

Apprentice

Joined: 18 Nov 2010
Posts: 49

Below pasted is my code

CREATE COMPUTE MODULE IntrastatFlowControl
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
--CALL CopyMessageHeaders();
--CALL CopyEntireMessage();


DECLARE count INTEGER;
DECLARE i INTEGER;
DECLARE RIRID INTEGER;

--Through SQL

SET Environment.Variables.Data.RIRREPORTS[] =
(SELECT * FROM
Database.dbo.RunWebsphereReport AS Rwr);

SET count = CARDINALITY(Environment.Variables.Data.RIRREPORTS[]);
SET i = 1;


--SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'TAX.INTRASTAT.UK.INP';
--SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueManagerName = 'UK_CSERV_DW02';


WHILE (i<=count) do
--CALL CopyMessageHeaders();
SET OutputRoot.XMLNSC.Data.RunReport=Environment.Variables.Data.RIRREPORTS[i];
CASE OutputRoot.XMLNSC.Data.RunReport[i].ReportType
WHEN 1 THEN
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'TAX.INTRASTAT.UK.INP';
WHEN 2 THEN
SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'TAX.INTRASTAT.POL.INP';

END CASE;

-- Set header values
PROPAGATE;
--PROPAGATE;
SET i = i+1;
END WHILE;

RETURN TRUE;
END;

And i am getting a exception message like

(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbComputeNode.cpp'
(0x03000000):Line = 464
(0x03000000):Function = 'ImbComputeNode::evaluate'
(0x03000000):Type = 'ComIbmComputeNode'
(0x03000000):Name = 'com/pwc/intrastat/flow/control/IntrastatFlowControl#FCMComposite_1_8.com/pwc/aim/commonerrorhandler/CommonErrorHandler#FCMComposite_1_3'
(0x03000000):Label = 'com.pwc.intrastat.flow.control.IntrastatFlowControl.CommonErrorHandler.Format Exception Message'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Caught exception and rethrowing'
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp'
(0x03000000):Line = 589
(0x03000000):Function = 'SqlStatementGroup::execute'
(0x03000000):Type = 'ComIbmComputeNode'
(0x03000000):Name = 'com/pwc/intrastat/flow/control/IntrastatFlowControl#FCMComposite_1_8.com/pwc/aim/commonerrorhandler/CommonErrorHandler#FCMComposite_1_3'
(0x03000000):Label = 'com.pwc.intrastat.flow.control.IntrastatFlowControl.CommonErrorHandler.Format Exception Message'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2488
(0x03000000):Text = 'Error detected, rethrowing'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'com.pwc.aim.commonerrorhandler.FormatExceptionMessage.Main'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '94.3'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'PROPAGATE TO TERMINAL 'out1' FINALIZE DEFAULT DELETE DEFAULT;'
)
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp'
(0x03000000):Line = 782
(0x03000000):Function = 'ImbMqOutputNode::evaluate'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'com/pwc/intrastat/flow/control/IntrastatFlowControl#FCMComposite_1_8.com/pwc/aim/commonerrorhandler/CommonErrorHandler#FCMComposite_1_25'
(0x03000000):Label = 'com.pwc.intrastat.flow.control.IntrastatFlowControl.CommonErrorHandler.Failure Queue'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Caught exception and rethrowing'
(0x01000000):MessageException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp'
(0x03000000):Line = 1955
(0x03000000):Function = 'ImbMqOutputNode::putMessage'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'com/pwc/intrastat/flow/control/IntrastatFlowControl#FCMComposite_1_8.com/pwc/aim/commonerrorhandler/CommonErrorHandler#FCMComposite_1_25'
(0x03000000):Label = 'com.pwc.intrastat.flow.control.IntrastatFlowControl.CommonErrorHandler.Failure Queue'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2666
(0x03000000):Text = 'Failed to open queue'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '-1'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'MQW101'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '2085'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
)
)
)
)
)

Please help me in this regard
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Dec 03, 2010 5:27 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

Your exception does not come from the code you posted as the PROPAGATE statements are very different.

Please also read up on the PROPAGATE statement to make sure you understand how it works and what values should be used for what you are trying to do.

I would also bet you are going to have one more message than you expect generated by this ESQL.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Dec 03, 2010 5:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

And please use code tags when posting code!!!!!!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rbicheno
PostPosted: Fri Dec 03, 2010 5:49 am    Post subject: Reply with quote

Apprentice

Joined: 07 Jul 2009
Posts: 43

As per reply above check the propagate doc, its pretty clear, a number of product samples also act as good references for your task, largemessage sample uses propagate and message routing will show you how to set the output dynamically too.
Your actual error suggests the queue for the output node is unknown which is likely to be one of:
-your q names are wrong
- you are not setting the compute mode properly to send the local env you setup
- you may not have the mode set to destination list on the mqoutput node
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 » How to put parts of a message into multiple queues
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.