You can sort table rows
by the values of one or more character or numeric columns. For Base
SAS tables and third-party relational database tables, the process
either replaces the original table or creates a new table. You can
perform sorting in two ways:
-
using the SAS SORT procedure
-
setting properties for a SAS sort
template in SAS Data Integration Studio, as shown in the following
figure:
To manage the memory
that is used for the sorting process, you can specify the maximum
amount of memory that is available to the sort. Generally, the sort
size should be less than the physical memory available to the process.
If the sorting requires more memory than you specify, then SAS creates
a temporary utility file on disk. To specify a sort size in SAS Data
Integration Studio, access the
Options tab
in the properties window for the sort template and enter a value in
the
Sortsize field, as shown in the following
figure:
The SPD Engine has implicit
sorting capabilities, which saves time and resources for SAS applications
that process large tables. When the SPD Engine encounters a BY clause,
if the data is not already sorted or indexed on the BY column, then
the SPD Engine automatically sorts the data without affecting the
permanent table or producing a new table. You can change the implicit
sorting options when you define an SPD Engine library in the metadata.
See
Setting LIBNAME Options That Affect Performance of SPD Engine Tables.
For more information
about the SORT procedure, see the
Base SAS Procedures Guide.