SAS formally introduce these two call routine in SAS v9.2.
Here are examples copied from SAS online help.
84 data _null_;
85 array x(10) (0, ., .a, 1e-12, -1e-8, .z, -37, 123456789, 1e20, 42);
86 call sortn(of x(*));
87 put +3 x(*);
88 run;
. A Z -37 -1E-8 0 1E-12 42 123456789 1E20
NOTE: DATA statement used (Total process time):
real time 0.40 seconds
cpu time 0.04 seconds
89
90
91 data _null_;
92 array x(8) $10
93 ('tweedledum' 'tweedledee' 'baboon' 'baby'
94 'humpty' 'dumpty' 'banana' 'babylon');
95 call sortc(of x(*));
96 put +3 x(*);
97 run;
baboon baby babylon banana dumpty humpty tweedledee tweedledum
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds