| Author | 
		  Message
		 | 
		
		  | sasad | 
		  
		    
			  
				 Posted: Mon May 26, 2014 6:31 am    Post subject: Unable to see ESQL file in ESQL Imports tab on Custom ESQL | 
				     | 
			   
			 
		   | 
		
		
		   Acolyte
 
 Joined: 30 Apr 2014 Posts: 67
  
  | 
		  
		    
			  
				Hi all,
 
 
I am creating mapping using Mapping node. I tried using Custom ESQL transform for one mapping, but I am not able to see any ESQL file when I click on Add button in ESQL Imports tab. I created an new ESQL file containing below code, but still no file appears.
 
 
CREATE PROCEDURE swapParms ( IN parm1 CHARACTER, OUT parm2  CHARACTER, INOUT parm3 CHARACTER )
 
	BEGIN
 
   		SET parm2 = parm3;
 
   		SET parm3 = parm1;
 
 	END;
 
 
I don't understand what I am missing here. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Simbu | 
		  
		    
			  
				 Posted: Mon May 26, 2014 6:25 pm    Post subject: Re: Unable to see ESQL file in ESQL Imports tab on Custom ES | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India 
  | 
		  
		    
			  
				
   
	| sasad wrote: | 
   
  
	Hi all,
 
 
I am creating mapping using Mapping node. I tried using Custom ESQL transform for one mapping, but I am not able to see any ESQL file when I click on Add button in ESQL Imports tab. I created an new ESQL file containing below code, but still no file appears.
 
 
CREATE PROCEDURE swapParms ( IN parm1 CHARACTER, OUT parm2  CHARACTER, INOUT parm3 CHARACTER )
 
	BEGIN
 
   		SET parm2 = parm3;
 
   		SET parm3 = parm1;
 
 	END;
 
 
I don't understand what I am missing here. | 
   
 
 
 
Hi, Please read the Requirements for ESQL modules called from a graphical data map in Infocenter and ensure that your procedure follows those requirements. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | vickas | 
		  
		    
			  
				 Posted: Thu Jun 19, 2014 6:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 18 Aug 2013 Posts: 126
  
  | 
		  
		    
			  
				Hi Sasad,
 
 
I'm also facing same problem. Were you able to identify the problem. Please provide me the details.
 
 
 
Thanks and regards,
 
Vikas | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Carlous | 
		  
		    
			  
				 Posted: Thu Dec 04, 2014 12:58 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 04 Dec 2014 Posts: 4
  
  | 
		  
		    
			  
				Hello,
 
 
could anyone paste example of right ESQL code - that it can be used in 'Custom ESQL' function in mapping.
 
 
 
Regards | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Dec 04, 2014 1:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| Carlous wrote: | 
   
  
	| could anyone paste example of right ESQL code - that it can be used in 'Custom ESQL' function in mapping. | 
   
 
 
 
Did you read the link suggested earlier in this thread?
 
 
That highlights 2 things which are wrong with the example originally posted, and which I would imagine are also wrong with yours (I'm guessing that you don't want example code for the sheer joy of owning ESQL, but are trying & failing to get this to work) _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | anuj324 | 
		  
		    
			  
				 Posted: Thu Dec 04, 2014 9:14 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 04 Dec 2014 Posts: 1
  
  | 
		  
		    
			  
				| There is no return statement in your esql .Also only In parameters are allowed . | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Carlous | 
		  
		    
			  
				 Posted: Fri Dec 05, 2014 2:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 04 Dec 2014 Posts: 4
  
  | 
		  
		    
			  
				Hello,
 
 
I prepared two codes:
 
 
First:
 
   
	| Code: | 
   
  
	
 
CREATE PROCEDURE swapParms ( IN parm1 CHARACTER, IN parm2 CHARACTER) 
 
BEGIN 
 
SET parm1 = parm2; 
 
RETURN TRUE;
 
END; 
 
 | 
   
 
 
 
Second:
 
   
	| Code: | 
   
  
	
 
CREATE COMPUTE MODULE CSV2XML_Compute2
 
   CREATE FUNCTION Main( IN P1 INTEGER, IN P2 INTEGER ) RETURNS BOOLEAN
 
   BEGIN
 
      -- CALL CopyMessageHeaders();
 
      -- CALL CopyEntireMessage();
 
      SET P1 = P2;
 
      
 
      RETURN TRUE;
 
   END;
 
 
 
END MODULE;
 
 | 
   
 
 
 
What is wrong in these examples? I do not see any ESQL file in "Select ESQL file for Custom ESQL transform" window.
 
 
EDIT:
 
 
Problem resolved, exemplary code that  "Select ESQL file for Custom ESQL transform" window can see:
 
   
	| Code: | 
   
  
	
 
CREATE PROCEDURE swapParms ( IN parm1 CHARACTER, IN parm2 CHARACTER) Returns Character  
 
BEGIN 
 
SET parm1 = parm2; 
 
END; 
 
 | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |