V5R4M0 or higher use Function TRIML, TRIMR or even TRIM.
MOVE FUNCTION TRIM(STREET-ADDRESS," ") TO STREET-ADDRESS-OUT.
Prior to V5R4 you will have to use the basic INSPECT statement.
But note that the ‘Answer’ does not result in trailing spaces being removed from STREET-ADDRESS-OUT unless STREET-ADDRESS-OUT is less than or equal to the length of the trimmed value. The value of FUNCTION TRIM(STREET-ADDRESS,” “) is trimmed. Once that value is MOVEd into a field, blanks will be added at the end to fill the result. — Tom