Hi,
I am sorting a dataset with id's
Have:
| BR01-999-1001-002 |
| BR01-999-1045-004 |
when i sort them, in the output the ids look like,
| BR01-999-1001002 |
| BR01-999-1045004 |
Any way the sort the data while keeping Ids as such in the input dataset??
Thanks,
this was an issue due to source dataset. thanks for the help though
Check the format and the format length (how many digits) has the ID variable.
Post your code.
data have;
input key $17.;
cards;
BR01-999-1001-002
BR01-999-1045-004
;
run;
proc print noobs;
run;
proc sort
data=have
out=want
;
by key;
run;
proc print noobs;
run;
gives this result
key
BR01-999-1001-002
BR01-999-1045-004
key
BR01-999-1001-002
BR01-999-1045-004
this was an issue due to source dataset. thanks for the help though
@ari please mark the question solved.
Check data in the input data set. It might have read incorrectly while reading from source
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.