RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Remove blanks in a string Print E-mail
User Rating: / 1
PoorBest 
Written by Chamara Withanachchi   
Remove blanks in a string
	C                   eval      refIdx = 1                    
	C                   movea     TmTrnRf       refArray        
	C                   dow       refIdx <= 50                  
	C                   if        refArray(refIdx) <> *Blanks   
	C                   eval      crtTrnRef = %trim(crtTrnRef) +
	C                                         refArray(refIdx)  
	C                   endif 
	C                   eval      refIdx += 1                   
	C                   enddo                                   
	C                   eval      TmTrnRf = crtTrnRef           

User Comments

Comment by CJEx2 on 2012-07-06 03:58:33
Here's a Free ver. 
 
For rIdx = 1 to %Len( %TrimR( TmTrnRf )) 
And %Subst( TmTrnRf : rIdx : 1 ) *Blanks; 
crtTrnRef = %Trim( crtTrnRef )  
+ %Subst( TmTrnRf : rIdx : 1 ); 
EndFor; 
TmTrnRf = crtTrnRef;

Please login or register to add comments

<Previous   Next>