Data Set [3-14]

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;
    1 3 4
    2 7 9
    12 444 123
(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

(2) Datalines

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?

Get Hint

Get Solution