Previous Page | Next Page

Functions and CALL Routines

CALL SORTC Routine



Sorts the values of character arguments.
Category: Sort
Interaction: When invoked by the %SYSCALL macro statement, CALL SORTC removes the quotation marks from its arguments. For more information, see Using CALL Routines and the %SYSCALL Macro Statement.

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

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


Arguments

variable

specifies a character variable.


Details

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


Comparisons

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


Examples

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


See Also

Functions and CALL routines:

CALL SORTN Routine

Previous Page | Next Page | Top of Page