| Author | Message | 
		
		  | chenna.hari | 
			  
				|  Posted: Wed Jan 19, 2011 8:17 pm    Post subject: access the variable in ESQL in another Schema |   |  | 
		
		  | Centurion
 
 
 Joined: 21 Mar 2009Posts: 103
 
 
 | 
			  
				| I have two ESQL 
 one ESQL is as below
 
 
 
   
	| Quote: |  
	| BROKER SCHEMA A 
 PATH B;
 
 CALL externalprocedure(x, y);
 |  
 another ESQL is as below
 
 
 
   
	| Quote: |  
	| BROKER SCHEMA B 
 CREATE PROCEDURE externalprocedure(x,y) Language Database
 External Name "<schema>.package.procedure";
 |  
 
 I need to pass the <schema> from first ESQL to second ESQL,
 Can any one help in this case how to pass the variables from one ESQL to another ESQL and how can i assign <schema> passed from First ESQL
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Jan 19, 2011 8:55 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| This is very confusing. I doubt very much that the schema in your external procedure has anything at all to do with a broker schema (i.e. PATH xyz;).
 It looks to me to be referring to a database schema. Whether you need to specify the DB schema, or not, depends mainly on the userId the broker is going to use for this procedure call.  This will depend again on the database DSN setup and the internal DB setup for that user. So you might want to talk to your DBAs first.
 
 Have fun
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | chenna.hari | 
			  
				|  Posted: Wed Jan 19, 2011 9:00 pm    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 21 Mar 2009Posts: 103
 
 
 | 
			  
				| i need to provide the schema name in database procedure when i use package.. this is must whether broker have access or not.. 
 here the query is how to access the variable in second ESQL which is declared in first ESQL??
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Jan 19, 2011 9:07 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| chenna.hari wrote: |  
	| i need to provide the schema name in database procedure when i use package.. this is must whether broker have access or not.. 
 here the query is how to access the variable in second ESQL which is declared in first ESQL??
 |  Did you make sure the type of x and y matches what the DB procedure is expecting. Is there a return expected? Did you look at the ROW variable? Did you look for examples??
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | chenna.hari | 
			  
				|  Posted: Wed Jan 19, 2011 9:20 pm    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 21 Mar 2009Posts: 103
 
 
 | 
			  
				| please clarify this query... 
 how to access in second ESQL any variable that is declared in first ESQL
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Jan 19, 2011 9:34 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| chenna.hari wrote: |  
	| please clarify this query... 
 how to access in second ESQL any variable that is declared in first ESQL
 |  By passing it in the call, explicitely and sometimes you need a reference!  Broker 101 -- get training!
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |