|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Callinga Function in ESQL which is stored in a CHARACTER |
« View previous topic :: View next topic » |
Author |
Message
|
IOnIce |
Posted: Sat Mar 04, 2017 12:49 am Post subject: Callinga Function in ESQL which is stored in a CHARACTER |
|
|
Newbie
Joined: 04 Mar 2017 Posts: 1
|
Hi All,
I need help with this code in ESQL.
I have three functions func1(A, B, C), func2(A, B, C) and func3(A, B, C) in my ESQL code.
Now in my ESQL main code I get a value in an environment variable say
Environment.Variable.tobecalled which tells gives me the function name to be called.
It can be either Environment.Variable.tobecalled = func1
So, if I have to call the function specified in environment variable, how do I do it
I wanted something like
CALL Environment.Variable.tobecalled (A, B , C)
Is there any way to do it without using if else? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Mar 04, 2017 3:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You could use a CASE statement, or an EVAL statement. However the EVAL statement has a performance hit...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Mar 04, 2017 9:39 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I thought that this sort of thing went out of fashion years ago.
It smacks of 'Data Driven' Programming at its most extreme. _________________ 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 |
|
 |
adubya |
Posted: Sun Mar 05, 2017 1:31 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
This sounds like a very bad idea. You mentioned avoiding IF THEN ELSE, why can't you use that construct (or a CASE statement) ? _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
akil |
Posted: Sun Mar 05, 2017 12:47 pm Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
You could use RouteToLabel , use the LE to set the label node to propagate the message to the appropriate ComputeNode , basis the value that's coming in your message.. _________________ Regards |
|
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
|
|
|
|