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 Index » WebSphere Message Broker (ACE) Support » How to call a function defined other compute node

Post new topic  Reply to topic
 How to call a function defined other compute node « View previous topic :: View next topic » 
Author Message
Harshalw
PostPosted: Mon Aug 04, 2008 6:12 am    Post subject: How to call a function defined other compute node Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

Hi,

I have 2 compute node Compute1 and Compute 2.

I have defined a fucntion FUNC2 in Compute 2. I wanted to call this function from Compute1. Pls reply on how to call FUNC2 from Compute1.

Thanks,
Harshalw
Back to top
View user's profile Send private message
billybong
PostPosted: Mon Aug 04, 2008 7:02 am    Post subject: Reply with quote

Disciple

Joined: 22 Jul 2005
Posts: 150
Location: Stockholm, Sweden

Short answer:
You need to create the function on schema level, that is outside the module.
Then you can simply call it by either

1) Having both modules in the same schema
2) Specify a PATH in comp1 module esql file "importing" the schema used by comp2 module
3) Call the function with the full schema name used by comp2 included in the comp2 call (eg CALL com.ibm.common.myFunction('helloworld!'))

Long answer:
Find it in the ESQL programming guide.
_________________
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower
Back to top
View user's profile Send private message Visit poster's website
AkankshA
PostPosted: Mon Aug 04, 2008 8:08 pm    Post subject: Re: How to call a function defined other compute node Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Harshalw wrote:
Hi,

I have 2 compute node Compute1 and Compute 2.

I have defined a fucntion FUNC2 in Compute 2. I wanted to call this function from Compute1. Pls reply on how to call FUNC2 from Compute1.

Thanks,
Harshalw


Define FUNC2 outside the module of Compute1 and make a call of Func1 in both compute1 and compute2

You can even define it in a separate eSQL file and ensure that PATH and schema clauses are taken care of..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
wangchengsi
PostPosted: Thu Aug 07, 2008 7:33 pm    Post subject: Reply with quote

Newbie

Joined: 05 Jun 2008
Posts: 5

functions in a module is "private",only accessable for other functions in the same module
you can define your "global" function outside module (in schema 1), then other functions in other module of different schema (in schema 2) can use that "global" function by adding "path" in schema 2
Back to top
View user's profile Send private message
sandeep9678
PostPosted: Thu Aug 07, 2008 8:47 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 41
Location: India

It is always good to have seperate esql file which contais the common functions and then utilize them as beans.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to call a function defined other compute node
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.