Referencing a Raw Data File

Using a FILENAME Statement

Use the FILENAME statement to point to the location of the external file that contains the data.
Filerefs perform the same function as librefs: they temporarily point to a storage location for data. However, librefs reference SAS libraries, whereas filerefs reference external files.
Syntax, FILENAME statement:
FILENAME fileref 'filename';
  • fileref is a name that you associate with an external file. The name must be 1 to 8 characters long, begin with a letter or underscore, and contain only letters, numbers, or underscores.
  • 'filename' is the fully qualified name or location of the file.

Defining a Fully Qualified Filename

The following FILENAME statement ...

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.