Sorting Orders for Numeric Variables
Numeric variables are sorted from the smallest-to-largest comparison and the sequence is as below.
- SAS System missing values (shown as a period or special missing value)
- negative numeric values
- positive numeric values.
Sorting Orders for Character Variables
PROC SORT uses either the EBCDIC or the ASCII collating sequence when it compares character values, depending on the environment under which the procedure is running.
In EBCDIC sequence, lowercase characters are sorted first followed by upper characters and then the digits. Note that some special characters interrupt the alphabetic sequences. The blank is the smallest displayable character.