2. In the Keys window, select the F-Key that you want to assign to the VIEWTABLE
command and place the cursor in the Definition field of the selected F-Key.
3. Type the VIEWTABLE command with the desired option. Here is an example:
VIEWTABLE %8b. '%s'.DATA colheading=name
4. Close the Keys window.
For more information about using VIEWTABLE, see Doing More with the SAS®
Display Manager: From Editor to ViewTable - Options and Tools You Should Know
(PDF).
Temporarily Change Column Headings
Within the VIEWTABLE window, you can temporarily change column headings. To
temporarily change column headings, follow these steps:
1. Right-click the heading for the column that you want to change, and then select
Column Attributes from the menu.
2. In the Label field of the Column Attributes window, enter the new name of the
column heading and then click Apply.
In this example, the Name heading is replaced by the Name of Player label.
Working with VIEWTABLE 385
When you press Apply, the column heading in VIEWTABLE changes to the new
name.
In this example, the label was changed to Name of Player.
3. Click Close to close the Column Attributes window.
Move Columns in a Table
Within the VIEWTABLE window, you can rearrange columns in your table. To move
columns in your table, follow these steps:
1. Click a column heading for the column that you want to move.
2. Drag and drop the heading onto another column heading.
386 Chapter 17 Managing Your Data in the SAS Windowing Environment
In this example, if you click the heading Name, and then drag and drop Name onto
Team at the End of 1986, the Name column moves to the right of the Team at the
End of 1986 column.
Sort by Values of a Column
You can sort your table in ascending or descending order, based on the values in a
column. You can sort data permanently or create a sorted copy of your table.
To sort your table, follow these steps:
1. Right-click the heading of the column on which you want to sort, and select Sort
from the menu.
2. Select Ascending or Descending from the menu.
3. When the following warning message appears, click Yes to create a sorted copy of
the table.
Note: If you selected Edit Mode after opening the table and clicking a data cell, this
window does not appear. SAS updates the original table.
Working with VIEWTABLE 387
4. In the Sort window, enter the name of the new sorted table.
In this example, the name of the sorted table is BaseballStatisticsList.
5. Click OK.
The rows in the new table are sorted in ascending order by values of Team at the
End of 1986.
388 Chapter 17 Managing Your Data in the SAS Windowing Environment
Edit Cell Values
By default, VIEWTABLE opens existing tables in browse mode, which protects the table
data. To edit the table, you need to switch to Edit mode. To switch to Edit mode and edit
a table cell, follow these steps:
1. With the table open, select Edit ð Edit Mode from the Edit menu.
2. Click a cell in the table, and the value in the cell is highlighted.
In this example, the third cell in the fifth row is highlighted.
3. Enter a new value in the cell and press Enter.
In this example, the cell has been updated with a new value for Times at Bat in
1986.
4. Select File ð Close from the File menu.
5. When prompted to save pending changes to the table, click Yes to save your changes
or No to disregard changes.
Working with VIEWTABLE 389
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.91.47