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 » ESQl Error

Post new topic  Reply to topic
 ESQl Error « View previous topic :: View next topic » 
Author Message
arvind24_s
PostPosted: Tue Sep 18, 2007 3:55 am    Post subject: ESQl Error Reply with quote

Newbie

Joined: 17 Sep 2007
Posts: 9
Location: India

Hi

I am trying to parse a input XML file which contains repeating sections and create multiple output messages which are posted to a MQ queue , each message correpsonding to each of the repeating elements. I am using Websphere MEssage Broker v 6.0.2

The structure of my main xml is as follows

<CSV>
<customer>
<firstname>Bob</firstname>
<lastname>Dyson</lastname>
</customer>
<customer>
<firstname>Alen</firstname>
<lastname>Dwayne</lastname>
</customer>
</CSV>

where each customer section need to be outputted as a MQ message

The following is the ESQL code i am using in a compute node

DECLARE counter INTEGER 1;
DECLARE count INTEGER CARDINALITY(InputRoot.XML.CSV_1.customer[]);

WHILE (counter <= count)DO
CALL CopyMessageHeaders();
SET OutputRoot.XML.CSV_1.customer[counter] = InputRoot.XML.CSV_1.customer[counter];
SET counter = counter+1;
PROPAGATE;
END WHILE;

I get the following exception


(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbComputeNode.cpp'
(0x03000000):Line = 464
(0x03000000):Function = 'ImbComputeNode::evaluate'
(0x03000000):Type = 'ComIbmComputeNode'
(0x03000000):Name = 'CSV2XML#FCMComposite_1_16'
(0x03000000):Label = 'CSV2XML.Compute'
(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 = 'CSV2XML#FCMComposite_1_16'
(0x03000000):Label = 'CSV2XML.Compute'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2488
(0x03000000):Text = 'Error detected, rethrowing'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '.ParseXML.Main'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = '13.1'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'SET OutputRoot.XML.CSV_1.customer[counter] = InputRoot.XML.CSV_1.customer[counter];'
)
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbRdl\ImbRdlFieldRef.cpp'
(0x03000000):Line = 912
(0x03000000):Function = 'SqlPathElement::navigateCursorFirst'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2436
(0x03000000):Text = 'Array subscript error'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '2'
)


Any help on this will be greatly appreciated

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Sep 18, 2007 4:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You don't need counter on OutputRoot.XML.CSV_1.customer.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
arvind24_s
PostPosted: Tue Sep 18, 2007 4:35 am    Post subject: Re Reply with quote

Newbie

Joined: 17 Sep 2007
Posts: 9
Location: India

Thanks for the suggestion
I tried it out and now the exception doesnt occur.

however, given a input file containing the following

Bob,Dyson,1 Desolation Row,Orlando,FL,32802,HYT-457-AX
Jimmy ,Pace,1002 Misty Mountain Drive,New York,NY,10001,ADU-239-BX

only 1 message is added to the output queue

<customer>
<firstname>Jimmy </firstname>
<lastname>Pace</lastname>
</customer>

The xml snippet corresponding to the first record is not outputted to the queue. As part of this message flow, i am transforming a CSV file into an XML files with each record of the CSV being written as a XML message on a output queue

Please advice
Thanks
Back to top
View user's profile Send private message
datspats
PostPosted: Tue Sep 18, 2007 5:02 am    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

can you pleae try

SET OutputRoot.XML.CSV_1.customer[1] = InputRoot.XML.CSV_1.customer[counter]; in the loop
Back to top
View user's profile Send private message Yahoo Messenger
arvind24_s
PostPosted: Tue Sep 18, 2007 8:54 pm    Post subject: Reply with quote

Newbie

Joined: 17 Sep 2007
Posts: 9
Location: India

A small correction to the output in my second post
I now get the following exception

(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp'
(0x03000000):Line = 782
(0x03000000):Function = 'ImbMqOutputNode::evaluate'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'CSV2XML#FCMComposite_1_15'
(0x03000000):Label = 'CSV2XML.CSV2XML.OUT'
(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 = 648
(0x03000000):Function = 'ImbMqOutputNode::evaluate'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'CSV2XML#FCMComposite_1_15'
(0x03000000):Label = 'CSV2XML.CSV2XML.OUT'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2660
(0x03000000):Text = 'Message contains no data'
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '-1'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'MQW001'
)
(0x01000000):Insert = (
(0x03000000):Type = 2
(0x03000000):Text = '0'
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
)

Insipite of this exception, the multiple xml output files are added to the MQ queue as long as the catch terminal is connected for example say to a trace node.

Please advice on how to solve this exception


Last edited by arvind24_s on Tue Sep 18, 2007 9:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Sep 18, 2007 9:15 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi arvind24_s,
arvind24_s wrote:

(0x03000000):Text = 'Message contains no data'
Perhaps you have a RETURN TRUE after the WHILE LOOP ?

Regards.
Back to top
View user's profile Send private message Send e-mail
arvind24_s
PostPosted: Tue Sep 18, 2007 9:44 pm    Post subject: Reply with quote

Newbie

Joined: 17 Sep 2007
Posts: 9
Location: India

Hi Elvis

Here goes my whole method

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

DECLARE counter INTEGER 1;
DECLARE count INTEGER CARDINALITY(InputRoot.XML.CSV_1.customer[]);

WHILE (counter <= count)DO
CALL CopyMessageHeaders();
SET OutputRoot.XML.CSV_1.customer = InputRoot.XML.CSV_1.customer[counter];
SET counter = counter+1;
PROPAGATE;
END WHILE;

RETURN TRUE;
END;

Does the Return True affect/cause the exception?
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Sep 18, 2007 10:28 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Yes, RETURN TRUE causes this problem.
After you have come out of the loop your message tree has been deleted and you have a blank message. RETURN TRUE causes this tree to be sent to the output.
Change this to RETURN FALSE.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
arvind24_s
PostPosted: Tue Sep 18, 2007 10:54 pm    Post subject: Reply with quote

Newbie

Joined: 17 Sep 2007
Posts: 9
Location: India

Thanks a lot
It worked
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 » ESQl Error
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.