SAS Institute. The Power to Know

SAS(R) 9.2 Universal Viewer: Help

Working with SAS Data Sets

Viewing SAS Data Set Tables

When you open a SAS data set, a list of tables appears in the Name column:
SAS Universal Viewer Tables Window
SAS Universal Viewer Tables
Window
The tables that appear show the number of observations and the number of variables that comprise the table. To view a list of the variables in a table, click the table name. The variables and their properties appear in the right pane of the window, as shown in the following display:
Variables in the PRDSALE Table
Variables in the PRDSALE
Table
A variable can be associated with a SAS format or informat. In the PRDSALE table shown above, the variable ACTUAL is written with the DOLLAR12.2 format.

Viewing SAS Data Sets

SAS applies a format to the data by default. If you want to change the table default, select Toolsthen selectOptions from the menu. Then click the Formats tab. The check box on this tab works as a toggle. Check the box to change the default.
If your data set is very large, you can break the data set into pages and view one page of data at a time. If you select Toolsthen selectOptions from the menu, and then click the Performance tab, you can set how the data set breaks. The following display shows items that you can set in the Performance tab:
The Performance Tab in the Options Window
The Performance Tab in
the Options Window

Sort a Data Set by Column

You can sort a data set by any column, but not by row. To sort a data set, click the heading of the column that you want to sort. If you sort the data in ascending order, an up arrow appears in the heading. If you click the heading again, the data is sorted in decreasing order, and a down arrow appears in the heading. Sorting columns applies only to the page of observations that you are viewing, not to the entire data set.

Subset the Data by Using a WHERE Clause

Select WHERE from the View menu (there is no View menu), or press Ctrl-W.

Resize Columns

To resize columns, grab and drag the separator between the headings. Note that row height is determined by the font size.

Copy and Paste Data Elements

Press Ctrl-C to copy an entire table, column, row, or block of data to the clipboard. Open NOTEPAD and press Ctrl-V to paste the data into NOTEPAD.

Find Text in a SAS File

You can find text in a SAS file by using expressions to filter rows and columns.