Chapter Contents |
Previous |
Next |
Getting Started with the SAS System Using SAS/ASSIST Software |
Instructions |
To enter data interactively, follow this selection path:
Tasks | Data Management | Create data | Interactively... |
Enter Data Interactively Window
Entering Data in a Tabular Format |
Select a New Table to Create Window
SALES
as the name of the table that you want to create for the new data. Refer to SAS Tables for information about table naming
conventions.
Note: Replace if existing enables you to replace the existing table with a new table of the same name. If the SALES table already
exists, you get an error message stating this. You may either enter another name for the table or select Replace if existing to replace the existing
table.
Define a New SAS Table Window
MONTH
as the name of the first new column.
$
or a
C
to indicate that the column is a character column.
3
. Each character uses one byte. The length indicates the number of bytes used to store each of a column's values in a SAS table. A character column can have a length from 1 to
32767.
Sales Month
. The label is a description of up to 40 characters that can be printed by certain tasks instead of, or in addition to, the column name.
GSALES
as the name of the second new column.
8
. A numeric column can have a length of 2 to 8 bytes or 3 to 8 bytes, depending on your operating environment. If you leave this field blank, it will use a length of 8 by
default.
Gross Sales
.
dollar8.2
and press ENTER. A format is a pattern that the SAS System
uses to determine how a column value should be displayed. The SAS System provides a set of standard formats and also enables you to define your own custom formats. The
dollar8.2 format inserts a dollar sign before each entry, inserts commas for numbers greater than 999, and writes a decimal point and two decimal
digits.
File | Close |
Typing Data into WORK.SALES
Each row in the window represents information for each sale. Each column represents a particular type of data for the sales. When you type data in a tabular format, multiple rows are shown in one window.
JAN
for the month and
3051.20
for the first GSALES entry.
When you have typed one row of data, press ENTER and another NEW row appears. The format you just specified also adds the dollar sign and comma to the amount of sales when the data appears. Type the rest of the data as shown here:
FEB 2813.50 MAR 3214.80 APR 3471.00 MAY 3943.70
Use the scroll bars or the BACKWARD, FORWARD, LEFT, and RIGHT function keys to see all the columns and rows.
Refer to Editing and Browsing Data for more information about editing data.
File | Close |
Refer to Editing and Browsing Data for instructions on editing and browsing the data you just entered.
Entering Data One Row at a Time |
Tasks | Data Management | Create data | Interactively... |
Follow steps 1 through 14 in
Entering Data in a Tabular Format except, in step 1, select Enter data one record at a time... from the Enter Data
Interactively window. In step 2, name the table
SALES2
.
After you have defined your columns, select Close from the File menu, and then select Yes to save the changes to the table. The FSEDIT window appears for the first row with the word New at the top of the window.
Entering Data into WORK.SALES2
JAN 4339.20
When you have typed in one row of data, press ENTER, and the dollar sign and comma are added to the amount of sales.
Edit | Add New Record |
FEB 3482.50 MAR 4238.80 APR 3529.00 MAY 3433.70
To view other rows you have already added, select View from the menu bar and use the items as described here:
File | Close |
Refer to Editing and Browsing Data for instructions on viewing and editing the data you just entered.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.