Author |
Message
|
Sanjayy |
Posted: Mon Oct 26, 2015 12:43 am Post subject: stop or discard message |
|
|
Novice
Joined: 06 Oct 2015 Posts: 12
|
hi folks,
I want to stop/Discard my message in compute node in procedure statements. Can you please help me.....? |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Oct 26, 2015 12:53 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
almost the same question was asked here about a week ago.
Take a look at some recent posts. You may well find your answer there.
failing that, go ask your resident Broker expert. Who knows they might even have been the one posting that question here?  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
bdaoust |
Posted: Tue Oct 27, 2015 12:59 pm Post subject: |
|
|
Centurion
Joined: 23 Sep 2010 Posts: 130
|
Not knowing anything about your message flow, you can easily control whether or not an message continues or not.
What is the reasoning behind the need to discard a message would be helpful. |
|
Back to top |
|
 |
Sanjayy |
Posted: Wed Oct 28, 2015 8:27 pm Post subject: |
|
|
Novice
Joined: 06 Oct 2015 Posts: 12
|
hi bdaoust, thanks for your reply..
i am using if condition like this in procedure:
if condition then
some statements
else
return false
but return false is working in function only.the thing what I want to do is to stop the flow in procedure. i worked on this in function earlier. but i want to know is there any other function to stop my message flow in procedure?
thanks in advance. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Oct 28, 2015 11:29 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Have you been told to use a Procedure rather than a fyunction for your task?
My rule of thumb (which can be brokern) is that
IF the ESQL is NOT likely to want to return a value
OR want to stop in mid operation
THEN code it as a PROCEDURE
ELSE
CODE it as a function
The majority of times these days, I seem to be using FUNCTIONS rather than PROCEDURES
Yes, you could code a PROCEDURE to almost stop processing but the code is far more messy (lots of nested IF's) when IMHO, a function with a RETURN at the points you want to stop is a gazillion times easier to understand by the people who have to maintain the coade after you.
If you don't care about that and your instructions are so tight (designed by a PHB perhaps?) then go ahead and use a PROCEDURE.
PHB == Pointy Headed Boss - google for it. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|