You need to write a routine that will loop through each character in the input field and output to a new field.
You can use %SUBST
IF %SUBST(yourfield : ipos : 1) <> ‘ ‘ AND
: pos : 1) <> ‘-’
: opos : 1) = %SUBST(yourfield : ipos : 1)
opos = opos +
You increment ipos with your loop
(DO or FOR) depending on the release you are on.