| Author | 
		  Message
		 | 
		
		  | pvemuri | 
		  
		    
			  
				 Posted: Mon Mar 28, 2005 11:40 am    Post subject: Carriage Return in ESQL | 
				     | 
			   
			 
		   | 
		
		
		    Voyager
 
 Joined: 05 Jan 2004 Posts: 83 Location: CA, USA 
  | 
		  
		    
			  
				Hello,
 
Can any one help me how to append a carriage return at the end of a string using ESQL.
 
Thanks,
 
pvemuri. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | waugh | 
		  
		    
			  
				 Posted: Mon Mar 28, 2005 12:12 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 19 Feb 2004 Posts: 225
  
  | 
		  
		    
			  
				cast it to BLOB, add X'0D & X'0A at the end.
 
 
we had to remove carriage returns, so i did a BLOB conversion and removed those hex characters from message, then used a RCD node to convert it back to XML.
 
 
hope this helps | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | waugh | 
		  
		    
			  
				 Posted: Mon Mar 28, 2005 12:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 19 Feb 2004 Posts: 225
  
  | 
		  
		    
			  
				SET CRSTR = CAST(x'0D' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId) ;
 
SET LFSTR = CAST(x'0A' AS CHAR CCSID InputRoot.MQMD.CodedCharSetId) ;
 
 
SET OutputRoot.MRM.{yourfieldname} = InputRoot.MRM.{yourfieldname} ||  CRSTR || LFSTR;
  Last edited by waugh on Tue Mar 29, 2005 11:43 am; edited 1 time in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Mon Mar 28, 2005 12:31 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| cast it to BLOB, add X'0D & X'0A at the end. | 
   
 
 
Where does he say he want's a Windoze carriage return.     
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pvemuri | 
		  
		    
			  
				 Posted: Wed Mar 30, 2005 7:14 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Voyager
 
 Joined: 05 Jan 2004 Posts: 83 Location: CA, USA 
  | 
		  
		    
			  
				Eddie,
 
How does it differ by OS? we usually send it to Mianframes / AIX or Windows. 
 
 
Thanks for the knowledge,
 
pvemuri. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | EddieA | 
		  
		    
			  
				 Posted: Wed Mar 30, 2005 9:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles 
  | 
		  
		    
			  
				Windows uses CR + LF.
 
 
Unix uses LF.
 
 
Mainframe uses ?????
 
 
Cheers, _________________ Eddie Atherton
 
IBM Certified Solution Developer - WebSphere Message Broker V6.1
 
IBM Certified Solution Developer - WebSphere Message Broker V7.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |