Writing a DATA Step Program

Naming the Data Set

The DATA statement indicates the beginning of the DATA step and names the SAS data set to be created.
Naming the Data Set
To do this...
Use this SAS statement...
Example
Reference a SAS library
LIBNAME statement
libname libref 'SAS-data-library';
Reference an external file
FILENAME statement
filename tests 'c:\users\tmill.dat';
Name a SAS data set
DATA statement
data clinic.stress;
General form, basic DATA statement:
DATA SAS-data-set-1 <...SAS-data-set-n>;
where SAS-data-set names (in the format libref.filename) the data set or data sets to be created.
Remember that the SAS data set name is a two-level name. For example, the two-level name Clinic.Admit ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.