The FILENAME statement
associates a SAS
fileref (a
file reference name) with a
filespec. The fileref must conform to SAS naming rules. The form of the
filespec varies according to operating environment. Some environments
require a fully qualified filename; other environments might permit
partial pathnames.
Filerefs are a shorthand
method for specifying a file in SAS statements and commands. After
you define a fileref, you can use the fileref in place of the longer
file specification to reference the file throughout a SAS session
or program.
A fileref remains associated
with an external file only for the duration of the SAS session. The
association is not permanent. Also, a fileref must be defined and
the FILENAME statement must be executed before a SAS statement or
command that uses the fileref can execute.