I might be over oversimplifying. But if you could look at the data and see if they all start with a disticnt letter that we could be associated with a status we can format it and achieve what you look for. But as I speak this I have no idea of your data. data test ;
input id status $ ;
datalines ;
12 Poor
13 bad
15 Del
16 bd
19 lw
;
run ;
proc sql ;
select id,
case
when upcase(substr(status,1,1)) = 'P' then 'POOR'
when upcase(substr(status,1,1)) = 'B' then 'BAD'
when upcase(substr(status,1,1)) = 'G' then 'GOOD'
when upcase(substr(status,1,1)) = 'D' then 'DELINQUENT'
when upcase(substr(status,1,1)) = 'L' then 'LOW'
else 'OTHER'
end as status1
from test ;
quit ;
... View more