Hello,
I am a new SAS user and having some issue when trying to import data. I get the error "Library is not assigned." My code and the error message is below. I read up on libraries, and I am not sure why I need one here for importing a single csv file, so some intuition into that would be much appreciated as well. I tried putting the libname inside and outside of the import procedure, it doesnt appear to be working either way.
Thanks!
You're correct, you do not need a library, but you've also indicated in your code that you'd like the data stored to a library so if you're trying to use one you do need to make sure it exists.
When you use a naming convention such as libName.DataSetName this means the portion before the period is the libname. You've used this type of notation while trying to name your output file so SAS is looking for that library to save the file.
If you don't want that, remove the library name.
Please post images directly into the forum using the photos icon, or better yet, post your code directly into the forum.
@nla2121 wrote:
Hello,
I am a new SAS user and having some issue when trying to import data. I get the error "Library is not assigned." My code and the error message is below. I read up on libraries, and I am not sure why I need one here for importing a single csv file, so some intuition into that would be much appreciated as well. I tried putting the libname inside and outside of the import procedure, it doesnt appear to be working either way.
Thanks!
looks like you have a libname statement improperly placed in your SAS code. Please post the code using the insert SAS code option
please use the libname P1 for storing the new dataset created from CSV file.
please call the libname P1 first and then in the proc import replace the ART. with P1.
Libname statement also has to go before your PROC IMPORT, so it's ready before you try and use it.
@Jagadishkatam wrote:
please use the libname P1 for storing the new dataset created from CSV file.
please call the libname P1 first and then in the proc import replace the ART. with P1.
Sorry, replied to wrong post.
Hi everyone,
Thank you for the responses, they were instructive! Problem solved 🙂
Cheers!
@nla2121 wrote:
Hi everyone,
Thank you for the responses, they were instructive! Problem solved 🙂
Cheers!
Please mark the question solved.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.