Once a data set is stored in the desired directory, the associated libref must be used to retieve the data set. Without a libref SAS would look in the default, saswork, directory for the data set. The saswork directory is erased at the end of each SAS session. For this reason, data sets stored in saswork are only available during the current SAS session. Data sets stored in the saswork directory are erased at the end of the SAS session.
Libname statements assign an alias, libref, to a directory.
Once Assigned, librefs are used to indicate the directory location for saving or accessing SAS data sets. Here are some examples. For some reason this is a difficult subject to teach. If you have suggestions for this document, please let us know.