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 IndexWebSphere Message Broker SupportCallinga Function in ESQL which is stored in a CHARACTER

Post new topicReply to topic
Callinga Function in ESQL which is stored in a CHARACTER View previous topic :: View next topic
Author Message
IOnIce
PostPosted: Sat Mar 04, 2017 12:49 am Post subject: Callinga Function in ESQL which is stored in a CHARACTER Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat Mar 04, 2017 3:22 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19100
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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sat Mar 04, 2017 9:39 am Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6070
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
View user's profile Send private message
adubya
PostPosted: Sun Mar 05, 2017 1:31 am Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 365
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
View user's profile Send private message Send e-mail
akil
PostPosted: Sun Mar 05, 2017 12:47 pm Post subject: Reply with quote

Partisan

Joined: 27 May 2014
Posts: 337
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
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportCallinga Function in ESQL which is stored in a CHARACTER
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.