|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RETURN statement in ESQL |
« View previous topic :: View next topic » |
Author |
Message
|
shubha_s |
Posted: Mon Jan 18, 2010 5:12 am Post subject: RETURN statement in ESQL |
|
|
Acolyte
Joined: 10 Mar 2009 Posts: 57
|
Hi,
In each of the module in the ESQL we make a RETURN statement either RETURN TRUE or RETURN FALSE. What is the purpose of this RETURN statement?
To whom does it indicate that a RETURN is being done from the module?
Can anyone please help me out?
Thanks |
|
Back to top |
|
 |
mgk |
Posted: Mon Jan 18, 2010 5:37 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Think of it as returning a value to the node itself. If the value is TRUE then in a Compute node the message is propagated to the Out terminal (in the default case). If you return FALSE then the node does not propagate the message to any of the downstream terminals on the node.
I hope this helps, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
shubha_s |
Posted: Mon Jan 18, 2010 8:52 am Post subject: RETURN Statement in ESQL |
|
|
Acolyte
Joined: 10 Mar 2009 Posts: 57
|
Hi,
Thanks a lot..If RETURN is false does the control go back to Input node and again try tp propagate from there..
Thanks |
|
Back to top |
|
 |
mgk |
Posted: Tue Jan 19, 2010 2:05 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
If RETURN is false does the control go back to Input node and again try tp propagate from there |
Well the way to view this is that it is not an error to return FALSE. Returning FALSE is just like the message reaching the "end" of the flow. Control is returned to the previous node to the current one, and then to the previous one to that one and so on until the original input node is reached. However, if there was (for example) a FlowOrder node before the compute node that returned FALSE and the Compute node was wired to the "First" terminal, then control will pass to the FlowOrder "Second" terminal as you would expect. Eventually the fow will unwind until control reaches the Input node, but the Input node will NOT try to propagate the same message again. As far as the Input node is concerned the Flow finshed normally, without error.
Kind Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
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
|
|
|
|