*(Q) I have consecutive spaces between words contained within a string variable How can I reduce these to single spaces? *(A) By Raynald Levesque rlevesque@videotron.ca 2002/06/3. * http://pages.infinit.net/rlevesqu/index.htm * Create a sample file for illustration purposes. DATA LIST FIXED /str 1-25 (A). BEGIN DATA jiuhy huji juh kk kk jj jj jjj jj k k l kkk lok kk ii u h kkkk kkkkkk This is my text jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj END DATA. LIST. *////////////////. DEFINE !deldbl(vname=!TOKENS(1) /vlength=!TOKENS(1)) !LET !lookfor=!QUOTE(!BLANK(2)) STRING #tmp !CONCAT('(A',!vlength,')'). COMPUTE #tmp=LTRIM(!vname). LOOP IF RANGE(INDEX(#tmp," "),1,LENGTH(RTRIM(#tmp))). COMPUTE #tmp=CONCAT(SUBSTR(#tmp,1,INDEX(#tmp,!lookfor)), SUBSTR(#tmp,INDEX(#tmp,!lookfor) + 2)). END LOOP. COMPUTE !vname=#tmp. !ENDDEFINE. *////////////////. SET MPRINT=yes. !deldbl vname=str vlength=25. SET MPRINT=no. EXECUTE.