bobguy 发表于 2012-9-14 10:42 
First, you can use the substr function to find out what is its value for that space-like character ...
I found a sample code at
http://support.sas.com/kb/24/716.html
data sample;
string='Your'||'05'x||'data'||'0D'x||'goes'||'0C'x||'here.'||'0A'x;
run;
data _null_;
set sample;
put string=;
/* Verify each byte in string until no more non-printables are found */
do until(test=0);
/* For SAS 9.0 and above, NOTPRINT */
test=notprint(string);
/* prior to SAS 9.0, use VERIFY */
*test=verify(upcase(string),' ABCDEFGHIJKLMNOPQRSTUVWXYZ,.1234567890');
/* If a non-printable is found...replace it with a space */
if test>0 then do;
substr(string,test,1)=' ';
end;
end;
put string=;
run;