|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help me please -- problem with THROW statement |
« View previous topic :: View next topic » |
Author |
Message
|
sguruprasanna |
Posted: Thu Apr 07, 2005 11:27 am Post subject: Help me please -- problem with THROW statement |
|
|
 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 |
|
 |
JT |
Posted: Thu Apr 07, 2005 12:05 pm Post subject: |
|
|
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 |
|
 |
sguruprasanna |
Posted: Thu Apr 07, 2005 12:51 pm Post subject: |
|
|
 Apprentice
Joined: 29 Jul 2002 Posts: 37
|
Thanks a lot.. It worked when I included Values in the Throw statement. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|