Functions and CALL Routines |
Sorts the values of character arguments.
CALL SORTC(variable-1<, ...,
variable-n>)
|
- variable
-
specifies a character variable.
The values of variable are sorted in ascending
order by the CALL SORTC routine.
The CALL SORTC routine is used with character variables,
and the CALL SORTN routine is used with numeric variables.
The following example sorts the character variables in the array in
ascending order.
data _null_;
array x(8) $10
('tweedledum' 'tweedledee' 'baboon' 'baby'
'humpty' 'dumpty' 'banana' 'babylon');
call sortc(of x(*));
put +3 x(*);
run;
SAS writes the following output to the log:
baboon baby babylon banana dumpty humpty tweedledee tweedledum
|
Functions and CALL routines:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.