Create program statements to read in the data
You now have the raw data in the Editor Window.
Next, you need some statements (instructions) in your SAS program to enable SAS to read the data
(to know that it is data). The instructions differ depending on your Specialized Features, because the variables in the dataset change. If you are using your own dataset, use the supplied statements but replace and add variable names with your own, as needed to match your data columns (names must follow the rules in the Hint below). |
|
|
(1) Click your Specialized Feature below (gray box at left)
Note that "None" is a valid choice that will also provide statements (i.e., you have no specialized features).
(2) Copy the statements in that pop window
(3) Paste them into SAS before the data values in the Editor Window.
| |
|
If using your own data, modify the INPUT statement to indicate your variable names. You may copy-and-paste these from your data file into the INPUT statement, if convenient (just make sure there is a space between variable names).
Note, in the "gray box pop-ups" and in the SAS image below, the data name "one" was used; you can choose any name you wish.
Names must follow the rules in the Hint below. The $ symbol in the INPUT statement indicates that the preceding variable will read in text, instead of numerical values.
|
Put a semicolon on the line following the data, then these two statements.
PROC PRINT; RUN;
Your program now looks something like this (data depends on your specialized features).
Note the period for missing data values and the semicolon on line following data.
Be sure to delete any header text that you may have inadvertently pasted (such as a row of variable names). Variable names are specified by the INPUT statement as noted above, rather than in the dataset itself. Text with the yellow background in SAS should be data only.
Click for larger image
(need help using SAS?)
|
|
next >>
( Step 5: Run SAS program to read data )
| H I N T S : |
 |
|
|