This post was kindly contributed by SAS Analysis - go there to comment and to read the full post. |
data icd;
infile 'http://within.dhfs.state.wi.us/helpfiles/dlookupbrowse.html' truncover;
input star code $5. description $100.;
if anyalpha(substr(code, 5, 1))=1 then addon=substr(code, 5, 1);
run;
data icd1;
set icd nobs=nobs;
code=compress(code, addon);
description=trim(left(addon)) || trim(left(description));
description=propcase(description);
drop addon star;
if _n_=nobs or _n_= (nobs-1) then delete;
run;
This post was kindly contributed by SAS Analysis - go there to comment and to read the full post. |