Introduction to SAS [6-19]

h

Creating a Data Set

You can create a data set using a set of code called DATA Step

Example

Data Test;
    a = 1;
Run;

DATA Step is fairly simple.

It starts with the syntax 'Data' and ends with 'Run'.

Each line in SAS ends with a semi-colon.

You can create contents for the data set within the DATA Step. 

Now, run the Data Step from the example above.

This should create a data set called TEST that can be found from the WORK library.

A variable called a is also created in the TEST data set containing a single value of 1.

💪 Sign up for a free SASCrunch account now and keep track of your learning progress!

Exercise

Create a data set that contains the following 3 variables:

Var1 = 123
Var2 = 356
Var3 = 923

Name the data set as Number.

Need some help?

Get Hint

Get Solution