Sorts observations in a SAS data set by one or more variables, and then stores the resulting sorted observations in a new SAS data set or replaces the original data set.
Windows specifics: | Sort utilities available; SORTSIZE= and TAGSORT statement options |
See: | SORT Procedure in Base SAS Procedures Guide |
specifies the maximum amount of memory available to the SORT procedure. For further explanation of the SORTSIZE= option, see the following Details section.
stores only the BY variables and the observation number in temporary files. When you specify TAGSORT, the sort is a single-threaded sort. Do not specify TAGSORT if you want SAS to use multiple threads to sort. For details about TAGSORT option, see the following Details section.
dm 'catalog sashelp.host' catalog;Alternatively, you can select the View menu, select the
explorer
item, double-click the Sashelp library, and then double-click the HOST catalog.
In batch mode, you can use the following statements to generate a list of the contents
of the HOST
catalog: proc catalog catalog=sashelp.host; contents; run;Entries of type TRANTAB are the collating sequences.
proc trantab table=table-name;
list;
run;
The contents of the collating sequence are displayed
in the SAS log.options sortpgm=host;
-sortpgm host
options sortpgm=best sortcut=500;
options sortpgm=best sortcutp=40M;
options sortdev="c:\temp\sortsync";
Task
|
SORTANOM Option
|
---|---|
Run in multi-call mode
instead of single-call mode
|
SORTANOM=b
|
Print statistics in
the SAS log about the sorting process
|
SORTANOM=t
|
Print in the SAS log
the commands that have been passed to Syncsort
|
SORTANOM=v
|
options sortdev=btv;
options sortparm="SyncSort-options";
NOTE: This table cannot be mapped one to one.
options no date nostimer ls-78 ps-60; options sortpgm=host msglevel=i; data one; input name $ age; datalines; anne 35 ALBERT 10 JUAN 90 janet 5 bridget 23 BRIAN 45 ; run; data oneview / view=oneview; set one; name1=upcase(name); run; proc sort data=oneview out=final(drop=name1); by name1; run; proc print data=final; run;