Sorting Data
Overview
-
rearranges the observations in a SAS data set
-
creates a new SAS data set that contains the rearranged observations
-
replaces the original SAS data set by default
-
can sort on multiple variables
-
can sort in ascending or descending order
-
does not generate printed output
-
treats missing values as the smallest possible values.
General form, simple PROC SORT
step:
PROC SORT
DATA=SAS-data-set<OUT=SAS-data-set>;
BY
<DESCENDING> ... |
Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.