Specifies the sorting variables.
BY <DESCENDING> variable-1 <...<DESCENDING>
variable-n>;
|
-
variable
-
specifies the variable by which PROC SORT
sorts the observations. PROC SORT first arranges the data set by the values
in ascending order, by default, of the first BY variable. PROC SORT then arranges
any observations that have the same value of the first BY variable by the
values of the second BY variable in ascending order. This sorting continues
for every specified BY variable.
-
DESCENDING
-
reverses the sort order for the variable
that immediately follows in the statement so that observations are sorted
from the largest value to the smallest value. The DESCENDING keyword modifies
the variable that follows it.
Tip: |
In a PROC SORT BY statement, the DESCENDING
keyword modifies the variable that follows it. |
Tip: |
The THREADS SAS system option is the default
as long as the PROC SORT THREADS | NOTHREADS option is unspecified. |
Featured
in: |
Sorting in Descending Order |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.