| Author | 
		  Message
		 | 
		
		  | sachinramesh | 
		  
		    
			  
				 Posted: Thu May 22, 2008 6:15 am    Post subject: Can i set Environment Variable to null | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 20 Feb 2007 Posts: 170
  
  | 
		  
		    
			  
				hi
 
 
can we set environment variable to null value
 
 
In my flow i had a compute node in which i am setting an environment variable
 
environment.variable.area[i]=null;
 
 
bcos i dont want the previous environment variables to be continued when i am processing the next record. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Thu May 22, 2008 6:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				im sure you could .... have you tried (and failed??)   
 
 
or u could just DELETE FIELD!!
 
 
--madi _________________ IBM Certified Solutions Developer - WMB 6.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sachinramesh | 
		  
		    
			  
				 Posted: Thu May 22, 2008 6:35 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 20 Feb 2007 Posts: 170
  
  | 
		  
		    
			  
				
   
	| madi wrote: | 
   
  
	im sure you could .... have you tried (and failed??)   
 
 
or u could just DELETE FIELD!!
 
 
--madi | 
   
 
 
 
i had tried but did not work 
 
 
the statement is executing but  the values are not asigned to null | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Gemz | 
		  
		    
			  
				 Posted: Thu May 22, 2008 7:03 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 14 Jan 2008 Posts: 124
  
  | 
		  
		    
			  
				Hi,
 
 
   
	| Quote: | 
   
  
	| environment.variable.area[i]=null; | 
   
 
 
Try this
 
 
environment.variable.area[i]=''; | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Thu May 22, 2008 7:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				can u post the esql?
 
 
DELETE FIELD did not work??   
 
 
---madi _________________ IBM Certified Solutions Developer - WMB 6.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sachinramesh | 
		  
		    
			  
				 Posted: Thu May 22, 2008 7:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 20 Feb 2007 Posts: 170
  
  | 
		  
		    
			  
				
   
	| madi wrote: | 
   
  
	can u post the esql?
 
 
DELETE FIELD did not work??   
 
 
---madi | 
   
 
 
 
It goes like this
 
 
While 
 
          count the records
 
             while
 
           set environement
 
          end while
 
     insert
 
 
SET Environment.Variables.AREA_LIST[IN_I]=null;
 
count = count + 1;
 
end while | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Thu May 22, 2008 8:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				there nothing in the eSQL except 
 
 
   
	| Quote: | 
   
  
	| SET Environment.Variables.AREA_LIST[IN_I]=null;  | 
   
 
 
 
can we see what ur setting ........ its fine if you dont want to share ur code 
 
 
that statement however is working fine for me
 
 
so i would guess there is more to ur code than jsut that statement thats causing the issue
 
 
--madi _________________ IBM Certified Solutions Developer - WMB 6.0 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sachinramesh | 
		  
		    
			  
				 Posted: Thu May 22, 2008 8:32 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Disciple
 
 Joined: 20 Feb 2007 Posts: 170
  
  | 
		  
		    
			  
				| I could not send u the code it says service unavailable | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mgk | 
		  
		    
			  
				 Posted: Thu May 22, 2008 9:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 31 Jul 2003 Posts: 1647
  
  | 
		  
		    
			  
				If you read the docs for the SET statement you would find this syntax:
 
 
SET Environment.Variables.AREA_LIST[IN_I] VALUE =null;  
 
 
which will not delete the element (which is what happens without the VALUE clause). _________________ MGK
 
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | AkankshA | 
		  
		    
			  
				 Posted: Thu May 22, 2008 8:27 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand Master
 
 Joined: 12 Jan 2006 Posts: 1494 Location: Singapore 
  | 
		  
		    
			  
				
   
	| sachinramesh wrote: | 
   
  
	| I could not send u the code it says service unavailable | 
   
 
 
 
Remove (semicolon) ; and u shall be able to post then   _________________ Cheers | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |