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 » Help me please -- problem with THROW statement

Post new topic  Reply to topic
 Help me please -- problem with THROW statement « View previous topic :: View next topic » 
Author Message
sguruprasanna
PostPosted: Thu Apr 07, 2005 11:27 am    Post subject: Help me please -- problem with THROW statement Reply with quote

Apprentice

Joined: 29 Jul 2002
Posts: 37

Hi All,

I am using MQSI V 2.1 CSD 6 on AIX

I am not sure if this is because I use the THROW statement or because I use the generic error handler code provided by IBM....

I got the generic error handler subflow code from the below link:
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0305_ansari/appendix.html#sec10

My flow is like:

MQInputNode----(Out)----->Compute Node------->MQOutputNode
|
|--------(Catch)--------->Error-handler-subflow

The ESQL code in the compute node (of main flow) is
Code:

-- Enter SQL below this line.  SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.MQRFH = NULL;
SET OutputRoot.MQMD.Format = 'MQSTR';


SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.Properties.MessageFormat = '';
SET OutputRoot.Properties.MessageSet   = '';
SET OutputRoot.Properties.MessageType='';


IF (InputBody."MSG"."Data" = 'TestData') THEN
   THROW USER EXCEPTION;
ELSE
   SET OutputRoot.XML.Result.MSG = 'Processed successfully';
END IF;

IF (InputBody."MSG"."Data" = 'NoData') THEN
   THROW USER EXCEPTION;
ELSE
   SET OutputRoot.XML.Result.MSG = 'Processed successfully';
END IF;

IF (InputBody."MSG"."Data" = 'Data') THEN
   THROW USER EXCEPTION;
ELSE
   SET OutputRoot.XML.Result.MSG = 'Processed successfully';
END IF;


My Input message is:
<MSG>
<Data>TestData</Data>
</MSG>

The problem is, whenever i test the mainflow using the above message, it gets into an infinite loop.... I am sure there is nothing much in ESQL of the mainflow's compute node.. When I checked the error handler code (which i got from the above link), a while loop


Code:

While FieldName(Path) <> 'Insert' do
   MOVE Path NextSibling;
End while;


is causing the trouble whenever I use THROW statement... On the other hand, if I use a throw node to raise an exception it works fine. Is there anything wrong with the THROW statement I am using? can you please explain me what is this while loop is doing..? if I comment it out, everything works fine..
I went through the exception list structure, but I am not able to figure out what causes this never-ending while loop..

Please help..

regards
Guru
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Thu Apr 07, 2005 12:05 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Your Throw statement doesn't include any Values, thus there are no Inserts in the exception.
Back to top
View user's profile Send private message
sguruprasanna
PostPosted: Thu Apr 07, 2005 12:51 pm    Post subject: Reply with quote

Apprentice

Joined: 29 Jul 2002
Posts: 37

Thanks a lot.. It worked when I included Values in the Throw statement.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help me please -- problem with THROW statement
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.