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 » Calling esql procedure of module from another module?

Post new topic  Reply to topic
 Calling esql procedure of module from another module? « View previous topic :: View next topic » 
Author Message
ram_svnit
PostPosted: Tue Apr 26, 2011 9:30 pm    Post subject: Calling esql procedure of module from another module? Reply with quote

Novice

Joined: 28 Aug 2009
Posts: 20
Location: India

Hi, Is there any way to call a procedure of one compute node from another compute node?
_________________
Stay Hungry. Stay Foolish.
Back to top
View user's profile Send private message Yahoo Messenger
flahunter
PostPosted: Tue Apr 26, 2011 9:37 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

As far as I know, you can just call it if they are in the same message flow project. Please correct me if I'm wrong.
Back to top
View user's profile Send private message
ram_svnit
PostPosted: Tue Apr 26, 2011 9:40 pm    Post subject: Reply with quote

Novice

Joined: 28 Aug 2009
Posts: 20
Location: India

Yes, in the same Message flow...how do you import a procedure of another module? Like we have import feature in java, do we have anything similar in ESQL?
_________________
Stay Hungry. Stay Foolish.
Back to top
View user's profile Send private message Yahoo Messenger
flahunter
PostPosted: Tue Apr 26, 2011 10:27 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

No need. Just call it, when compiling, it will automatically find the procedure in other module if they are in the same message flow project.
Back to top
View user's profile Send private message
ram_svnit
PostPosted: Tue Apr 26, 2011 11:15 pm    Post subject: Reply with quote

Novice

Joined: 28 Aug 2009
Posts: 20
Location: India

No it doesn't...it shows compilation error.. Incorrect Function or Procedure name
_________________
Stay Hungry. Stay Foolish.
Back to top
View user's profile Send private message Yahoo Messenger
j.f.sorge
PostPosted: Wed Apr 27, 2011 12:01 am    Post subject: Reply with quote

Master

Joined: 27 Feb 2008
Posts: 218

You have to DECLARE the PROCEDURE outside of the COMPUTE MODULE in order to call it from another ComputeNode.
_________________
IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
flahunter
PostPosted: Wed Apr 27, 2011 12:08 am    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

Sorry, maybe I was confused. What I suggest is to create a new single ESQL file and create your procedure there. Then you can call it in you compute module.
Back to top
View user's profile Send private message
ram_svnit
PostPosted: Wed Apr 27, 2011 12:40 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2009
Posts: 20
Location: India

"You have to DECLARE the PROCEDURE outside of the COMPUTE MODULE" - does it mean the procedure is kind of global which can be called by any module in that esql file? Will be able to access Environment.Variables in the procedure?
_________________
Stay Hungry. Stay Foolish.
Back to top
View user's profile Send private message Yahoo Messenger
khudania
PostPosted: Wed Apr 27, 2011 12:44 am    Post subject: Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 43

Quote:

Sorry, maybe I was confused. What I suggest is to create a new single ESQL file and create your procedure there. Then you can call it in you compute module.


1.Create an esql file in some Flow project.
2.Declare a schema at the top for the esql file.

e.g.

BROKER SCHEMA CommonProcs

3.Refer the Flow project in any other flow project using 'Properties>>Project References'
4.In the esql file where the procedure needs to be called from use the following at the top.

PATH CommonProcs;
Back to top
View user's profile Send private message
j.f.sorge
PostPosted: Wed Apr 27, 2011 2:44 am    Post subject: Reply with quote

Master

Joined: 27 Feb 2008
Posts: 218

ram_svnit wrote:
Will be able to access Environment.Variables in the procedure?

You may use the Environment if you pass a REFERENCE to it when calling the PROCEDURE.
Code:
DECLARE PROCEDURE test(IN refEnvironment REFERENCE)

Code:
CALL test(Environment);

_________________
IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » Calling esql procedure of module from another module?
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.