Creating Multiple Observations
The majority of the SAS data sets contain multiple observations.
In order to create a data set that contains more than 1 observation, you need the Input and Datalines statements.
Input and Datalines Statement
Data Test; Input a b c; Datalines; 1 3 4 2 7 9 12 444 123 ;Run;(1) Input Statement
The Input statement lists the variables to be created.
In our example, the Input statement tells SAS to create 3 variables: a, b and c
Datalines statement signals SAS to begin reading the data on the next line.
Together with these statements, you can create a data set with multiple observations.
Create a data set that contains the following variables:
Name the data set as SCORE.
Need some help?
HINT: The semi-colon must be placed on the NEXT line after the last line of data.
SOLUTION: Data Score; Input Score1 Score2 Score3; Datalines; 77 88 35 93 57 74 67 85 71 ; Run;
Username or Email Address
Registration confirmation will be emailed to you.