SAS Consulting, Department of Statistics
| Program Statements | Description |
| data class1; | No LIBNAME statement and no libref. The data set "class1" will be stored is the saswork directory. It will be erased at the end of the SAS session, so it is a "temporary" SAS data set. |
| libname mylib 'research';
data mylib.exp1; | The LIBNAME statement defines the libref, "mylib", as the "research" subdirectory. The SAS data set "exp1" will be written in the "research" subdirectory, because the libref "mylib" was used on the data statement. |
| libname inlib '.';
data inlib.chem; | The dot inside the parenthesis on the LIBNAME statement means "current working directory". The SAS data set "chem" will be written in the "current working directory", because the libref, "inlib", was used on the data statement. |
| libname lib1 'c:\mysas';
data a; set lib1.exp; | Data set "a" will be a copy of "exp1". "a" will be written in the saswork directory, data set "exp1" will be read from c:\mysas. |