Functions and CALL Routines |
Sorts the values of numeric arguments.
CALL SORTN(variable-1<, ...,
variable-n>)
|
- variable
-
specifies a numeric variable.
The values of variable are sorted in ascending
order by the CALL SORTN routine.
The CALL SORTN routine is used with numeric variables,
and the CALL SORTC routine is used with character variables.
The following example sorts the numeric variables in the array in ascending
order.
data _null_;
array x(10) (0, ., .a, 1e-12, -1e-8, .z, -37, 123456789, 1e20, 42);
call sortn(of x(*));
put +3 x(*);
run;
SAS writes the following output to the log:
. A Z -37 -1E-8 0 1E-12 42 123456789 1E20
|
Functions and CALL routines:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.