| Author | 
		  Message
		 | 
		
		  | rsashi | 
		  
		    
			  
				 Posted: Tue Sep 18, 2007 9:22 pm    Post subject: User defined Functions | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jan 2004 Posts: 35
  
  | 
		  
		    
			  
				I like to pass a whole InputRoot into a user defined function and return a Integer value. Can some on help me in providing the syntax for the above req.... and also can we set OutPutRoot values inside a user defined function too?
 
thanks for your help | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Tue Sep 18, 2007 10:31 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				This has been discussed multiple times in the forum. Please search for your answer.
 
You can also look at the online manual for help on function syntax. _________________ Shalabh
 
IBM Cert. WMB V6.0
 
IBM Cert. MQ V5.3 App. Prog.
 
IBM Cert. DB2 9 DB Associate | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | rsashi | 
		  
		    
			  
				 Posted: Wed Sep 19, 2007 8:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jan 2004 Posts: 35
  
  | 
		  
		    
			  
				I am getting below error when i deploy a flow which is calling the procedure ,
 
 
An expression which evaluates to a scalar variable or a field is required here. 
 
 
The expression supplying the parameter must evaluate to a value of a suitable type. The given expression cannot possibly do so. 
 
 
My procedure is defined as ,
 
 
[b]CREATE PROCEDURE Prod1(IN inputRef REFERENCE,INOUT outputref REFERENCE)[/b] 
 
 
and i am calling procedure from the flow like
 
DECLARE inputRef REFERENCE TO InputRoot; 
 
DECLARE outputref REFERENCE TO OutputRoot;
 
[b]CALL Prod1(inputRef,outputref);[/b]
 
 
Thanks your help. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Sep 19, 2007 9:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | rsashi | 
		  
		    
			  
				 Posted: Wed Sep 19, 2007 9:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Apprentice
 
 Joined: 29 Jan 2004 Posts: 35
  
  | 
		  
		    
			  
				Thanks for your link.I am still getting the same error
 
 
An expression which evaluates to a scalar variable or a field is required here. 
 
 
 The expression supplying the parameter must evaluate to a value of a suitable type. The given expression cannot possibly do so. 
 
 
 
CALL Prod1( InputRoot , OutputRoot); 
 
 
CREATE PROCEDURE Prod1(IN InputRoot REFERENCE, IN OutputRoot REFERENCE) | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Sep 19, 2007 10:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi rsashi,
 
 
Is this a deployment error you are talking of ? What is the line number indicated ?
 
 
Please paste the entire code.
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |