To Lecture Notes
proc sort
The default collating sequence for x/OS (IBM mainframes) is EBCDIC.
The default collating sequence for most other operating systems, for
example Windows, is ASCII.
You can change the collating sequence to EBCDIC like this:
proc sort sortseq=EBCDIC;
Here are some other sortseq options.
Try sorting these names with proc sort:
Zoe anna Jason brandon
Change the sort order to ignore case:
proc sort sortorder=linguistic
(strength=primary);
by name;
Next try sorting these character values:
1A 12B 2R 122P 10Z
Change the sort order to sort in numeric order:
proc sort sortorder=linguistic
(numeric_collation=on);
by name;
See the ProcSort Example.
The nodup option removes duplicate observations from the dataset:
proc sort data=kids out=sortedkids nodup;
by gender;
The nodupkey option removes observations with duplicate by variables:
proc sort data=kids out=sortedkids nodupkey;
by gender;
The threads (nothreads) options allow (prevent) multiple threads to be used when sorting when it makes sense.
For example, multithreaded sorting does not make sense on a machine with only one cpu.
More details are given about proc sort options are discussed in the following reference.
Reference: Base SAS(R) 9.2 Procedures Guide
PROC SORT Statement
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146878.htm