| Author | 
		  Message
		 | 
		
		  | ram_svnit | 
		  
		    
			  
				 Posted: Tue Apr 26, 2011 9:30 pm    Post subject: Calling esql procedure of module from another module? | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | flahunter | 
		  
		    
			  
				 Posted: Tue Apr 26, 2011 9:37 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ram_svnit | 
		  
		    
			  
				 Posted: Tue Apr 26, 2011 9:40 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | flahunter | 
		  
		    
			  
				 Posted: Tue Apr 26, 2011 10:27 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ram_svnit | 
		  
		    
			  
				 Posted: Tue Apr 26, 2011 11:15 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | j.f.sorge | 
		  
		    
			  
				 Posted: Wed Apr 27, 2011 12:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | flahunter | 
		  
		    
			  
				 Posted: Wed Apr 27, 2011 12:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ram_svnit | 
		  
		    
			  
				 Posted: Wed Apr 27, 2011 12:40 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | khudania | 
		  
		    
			  
				 Posted: Wed Apr 27, 2011 12:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | j.f.sorge | 
		  
		    
			  
				 Posted: Wed Apr 27, 2011 2:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |