SAS data sets are referenced with a one- or two-level name. The two-level name is of the form libref.member-name where libref refers to the SAS data library in which the data set resides and member-name refers to the particular member within that library. The one-level name is of the form member-name (without a libref ). In this case, SAS stores the files in the temporary Work data library. To override this action and have files with one-level names stored in a permanent library, first assign the User libref to an existing directory. To refer to temporary SAS files while User is assigned, use a two-level name with Work as the libref.
You have three ways to assign the User libref:
Assign the User libref directly using the LIBNAME statement:
libname user '/users/myid/mydir';
Specify the USER= system option before you start the session. For example, you can assign the User libref when you invoke SAS:
sas -user /users/myid/mydir
Specify the USER= system option after you start the session. First, assign a libref to the permanent library. Then use the USER= system option in an OPTIONS statement to equate that libref to User. For example, these statements assign the libref User to the directory with libref Mine:
libname mine '/users/myid/mydir'; options user=mine;
See Chapter 17, "System Options under UNIX," on page 311 for details on the USER= system option.
Note | SAS on UNIX does not support the assignment of the User libref via the USER environment variable. |