A library in SAS is a reference to a location that contains SAS files like datasets, views or catalogs.
On UNIX systems and Windows that location is a directory.
Libraries cannot be nested (a library cannot contain another library, all libraries exist on the same level side by side).
It is possible to create a directory as a subdirectory of another, and assign library references to both, but when viewing from inside SAS, that hierarchy will not be represented.
SAS libraries access data. You set a library to some location (folder, database, Excel workbook). You can then references that library name when working with the data in those locations.
You can also check out the free SAS Programming course. Go to Lesson 2, then Accessing Data Through Libraries. Practices doing that with the Excel file, and folder paths.
Seems like you can. Here is an example in the LIBNAME statement documentation: https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/n1nk65k2vsfmxfn1wu17fntzszbp...
I tested it on my local SAS install and it worked.
libname x ('S:/workshop/data' 'S:/courses/SQLM6/data');
sasinnovate.png
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just 495ドル!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.