A fileref is nickname
that you assign to a file or device. You assign the fileref once,
and then use it as needed. Filerefs are especially useful under the
following conditions:
-
The pathname is long and has to
be specified several times within a program.
-
The pathname might change. If the
pathname changes, you need to change only the statement that assigns
the fileref, not every reference to the file.
You can assign filerefs
in the
File Shortcuts window of the
Explorer, with the FILENAME statement, with the FILENAME
function, or by defining the fileref as an environment variable.
Note: For a complete description
of the FILENAME statement and the FILENAME function, see
FILENAME Statement in SAS Statements: Reference and
FILENAME Function in SAS Functions and CALL Routines: Reference.