Hi,
I have encountered a rather odd issue regarding attempting to view the SAS datasets in SAS 9.4 after creating a SAS library. Specifically, I do not see any of the SAS datasets within my first folder when I created a new library in SAS. In other words, I am only able to view the datasets located in the second folder upon assigning it to the same SAS library. Please find below an example of the SAS code that I have used to create the SAS library:
What does the log say when you run your first libname, Is it assigned successfully?
Hi Suryakiran,
So, I have just tried to run each SAS code separately instead of both codes simultaneously. When I ran the first set of SAS codes, I am able to see all of the SAS datasets from my first folder within the SAS library. However, when I ran the second set of SAS codes, the datasets from the second folder overrode those from the first folder. Perhaps I should create two different libraries?
The second libname re-assigns the library definition; it does not append the second to the first. For that you need concatenated libraries.
Or you use two separate libraries.
Hi,
Thank you so much for clarifying the root cause of my SAS issue. I have already concatenated the two folders into a single library and was able to view all datasets located in both folders. Thanks again!
If you want to see the contents of more than one directory in one SAS library, google "sas concatenated library".
Hi,
Thank you for suggesting the "sas concatenated library" as an alternative solution to the SAS issue. I will definitely google the specific details involved in this procedure.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.