Two CALL routines, CALL SORTN and CALL SORTC, can sort the values of their arguments. They are frequently used with SAS arrays to place all the values of the array elements in ascending order.
These two CALL routines were included in SAS 9.1.3 but were still considered experimental. With SAS 9.2, they are considered fully supported routines.
This author remembers writing a SAS program, many years ago, that used a bubble sort to perform the actions of the CALL SORTN routine. With the introduction of the ORDINAL function, this process became much easier. Finally, with these CALL routines, sorting ...