Previous Page | Next Page

Functions and CALL Routines

CALL SORTN Routine



Sorts the values of numeric arguments.
Category: Sort

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

CALL SORTN(variable-1<, ..., variable-n>)


Arguments

variable

specifies a numeric variable.


Details

The values of variable are sorted in ascending order by the CALL SORTN routine.


Comparisons

The CALL SORTN routine is used with numeric variables, and the CALL SORTC routine is used with character variables.


Examples

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


See Also

Functions and CALL routines:

CALL SORTC Routine

Previous Page | Next Page | Top of Page