Check out the IBM %SCANRPL function. Just replace the double space with a single space. You may have to loop through the process a few times if you are trying to remove more that just a double space. Withe that or code for each variety and test largest to smallest.
Example. Scan for 5 spaces, then scan for 4 spaces, then 3 and lastly 2 spaces.