DATA Step Statements for Reading Data

Naming the Data Set with the DATA Statement

The DATA statement indicates the beginning of the DATA step and names the SAS data set to be created.
Syntax, DATA statement:
DATA SAS-data-set-1 <...SAS-data-set-n>;
SAS-data-set names (in the format libref.filename) the data set or data sets to be created.
Remember that a permanent SAS data set name is a two-level name. For example, the two-level name Clinic.Admit specifies that the data set Admit is stored in the permanent SAS library to which the libref Clinic has been assigned.

Specifying the Raw Data File with the INFILE Statement

When reading raw data, use the INFILE statement to indicate which file the data is in.
Syntax, INFILE ...

Get SAS Certification Prep Guide, 4th 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.