Chapter Contents

Previous

Next
Getting Started with the SAS System Using SAS/ASSIST Software

Chapter Overview

Sorting data enables you to categorize your data and arrange it in a particular order. For example, if you are sorting data on houses for sale, you can sort the data by a particular value, such as by the number of square feet. You can arrange the data in ascending or descending order, such as from the smallest house to the largest house. You can sort by a number such as by the price of a house, or by a characteristic such as in alphabetical order by the style of the house.

This chapter shows you how to sort the data in the HOUSES table in ascending order by style and then descending order by square footage. The sorted data are stored in a temporary table called WORK.STYLE. When sorted, the houses are in order alphabetically by style. If more than one house has the same style, the largest house is listed first.

The original order of the houses in the HOUSES table is shown in the following display as viewed using Edit/Browse on the Data Management menu.

Unsorted Houses Table

[IMAGE]

Refer to Editing and Browsing Data for information about editing and browsing.


Additional Information

For additional information about sorting data, refer to the PROC SORT chapter in the SAS Procedures Guide.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.