cancel
Turn on suggestions
Showing results for
Search instead for
Did you mean:
BookmarkSubscribeRSS Feed
Calcite | Level 5

Thankyou for responding ,i got it and i did it.

thankyou so much.

0 Likes
Fluorite | Level 6
Thank you for responding.
0 Likes
Super User

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 Employee

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.

Obsidian | Level 7

It is possible to use multiple folders in one library

libname income ('corpsale','retail');

However, if a dataset is stored in both folders with the same name, sas uses the dataset from the first folder.

SAS Employee

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');
Log:
69 libname x ('S:/workshop/data' 'S:/courses/SQLM6/data');
NOTE: Libref X was successfully assigned as follows:
Levels: 2
Engine(1): V9
Physical Name(1): S:\workshop\data
Engine(2): V9
Physical Name(2): S:\courses\SQLM6\data
Obsidian | Level 7

You can add multiple folders to a library, however, if you have files with the same name in multiple folders, sas will only use the first folder where the file is located

0 Likes

sasinnovate.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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ドル!

Register now

LIBNAME 101

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.

Discussion stats
[フレーム]

AltStyle によって変換されたページ (->オリジナル) /