|Getting Started with the SAS System Using SAS/ASSIST Software|
|Tasks||Data management||Edit/Browse||Edit Data...|
Note: For this
example you will edit the data, but if you wanted only to browse the data, you would select Browse Data... as the last step of the selection
Edit Data Window
Edit Data in Tabular Format Window
HOUSES Table Data
When you edit data in a tabular format, multiple rows are shown in one window.
|Setting the Update Mode|
You can edit data in tabular format in one of two update modes: record-locking or member-locking. If you edit data in record-locking mode, you must first select a row before you can edit it. This method prevents you from accidentally editing the wrong row. If you edit data in member-locking mode, you can edit any row in the window without selecting it first. The default update mode is record-locking.
For this example, select RECORD if it is not already selected, and then select OK. The FSVIEW window reappears.
|Editing by Row|
Use the following process to make changes to existing data. When record-locking is turned on, you must first select a row before you can edit it.
For this example, select row 15 (or the last row).
example, position the cursor on the CONDO style of row 15 (or the last row) and type
SPLIT over CONDO (or over the existing style).
|Editing by Member|
Use this process to make changes to existing data. When member-locking is on, you can edit any row in the window without selecting it. To turn member-locking on, follow the directions in Setting the Update Mode, except select MEMBER in the Update window.
To edit a row, use the arrow keys to position the cursor on the data you want to change and type the new data over the old data.
Use this process when you want to add new information to the table. For example, you might want to add new houses for sale to the HOUSES table. Follow these same instructions to add data whether record-locking or member-locking is on:
Adding a New Row
When the AUTOADD feature is turned on, a new row is automatically displayed at the bottom of the table. This row is not added to the table until you enter values in it. After you enter values and press ENTER, the row is added to the table and another new row is displayed.
Type the data where the cursor is placed within each column after you press TAB. After you type all the data for each column in the row, press ENTER. The numeric data align to the right of each column. The dollar sign and decimal are also added to the price after you press ENTER.
After you type the number of baths, you can use the scroll bars or the RIGHT and LEFT function keys to display additional columns.
For this example, type the data as follows:
When you have typed one row of data and pressed ENTER, another NEW row appears at the bottom of the window. This is a result of the AUTOADD feature.
If some rows are similar, you can duplicate a row and type in the data for the columns that are different. Follow the same instructions for duplicating rows whether record-locking or member-locking is on.
For this example, make two copies of row number 16 (or the last row), and then select OK. The duplicated rows appear at the bottom of the list of rows.
|Deleting by Row|
If record-locking is on, you must first select a row before you can delete it. You can turn record-locking on by following the directions in Setting the Update Mode.
18, and then select OK. The highlighted row is deleted and the FSVIEW window appears.
|Deleting by Member|
If member-locking is on, you can delete any row without selecting it. To turn member-locking on, follow the directions in Setting the Update Mode, except select MEMBER in the Update window.
1 3 5to delete rows 1, 3, and 5. If you want to delete a range of rows, type the beginning and ending row numbers separated by a hyphen. For example, type
12-15to delete rows 12 through 15.
Select OK. The rows are deleted, and the FSVIEW window appears.
|Creating a Subset of Your Data|
If you only want to see part of the data (for example, if you only want to see all the houses for sale that are greater than 1500 square feet with three baths), you can create a subset of the data with a WHERE clause. The WHERE clause selects a subset of rows by comparing the values of the columns to the value you specify in the clause.
sqfeet>1500, and then select OK. The HOUSES data in the window show only houses with more than 1500 square feet. The word Where appears at the top of the window to indicate that a WHERE clause is in effect.
Houses with > 1500 Square Feet
baths=3to select only the houses with three bathrooms.
Houses with > 1500 Square Feet and Three Baths
The following is a list of some of the comparison operators that you can use in a WHERE clause (arithmetic, logical, and other operators are also available):
|LT or <||less than|
|GT or >||greater than|
|EQ or =||equal to|
|LE or <=||less than or equal to|
|GE or >=||greater than or equal to|
|NE or <>||not equal to|
|IN||equal to one in a list|
If you use character strings in the clauses, they must be enclosed in double or
single quotes and must be in the correct case. For example, if you only want to see the ranch-style houses, you would type
style='RANCH'. The word RANCH needs to be in all capital letters because all of the styles in the HOUSES table are in uppercase.
|Search||Undo last where|
Continue to select Undo last where to undo each previous WHERE clause.
Periodically, you may want to save any changes and additions you have made to the data so that they are stored permanently. The autosave feature saves the changes for you after 25 row modifications. You can change the autosave feature so that it saves data after any number of row modifications you specify. You also can save data at any time.
|Exiting the FSVIEW Window|
When you have finished editing the data, exit as follows:
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.