11-29-2017 10:22 AM
Hello, I have a dataset with variable part
input part $16.;
The output I want is the follows:
when I use proc sort, I did not get what I want? Could anyone help me? Thanks!
11-29-2017 10:46 AM
I can't see a logical way of sorting that data, my advice would be to create either a numeric order variable, or create a format (some people like formats for this type of thing, me I avoid catalogs as much as possible). So either:
data test; set test; select (part); when ("MD-III_3BQ") seq=...; when... end; run;
proc format; value $prt "MD-III_3BQ"=... "MD-II_3BQ"=... ... ; run; data test; set test; ord=input(part,$prt.); run;
Need further help from the community? Please ask a new question.