Hi community, I've never done any sort of coding before, but I'm in now a class in college that requires us to know SAS. This is literally part of the first homework and I'm lost at what to do. I copied the directions on the handout to the T, but I keep getting an error that the library doesn't exist. I honestly don't know what I'm doing to begin with so I have no clue how to fix it.
If anyone has any insight that would be so greatly appreciated.
Hi @deeelle and welcome to the community.
The error you are getting normally means the physical location you are pointing the libname statement at doesn't exist so that's the first thing to check.
The other possibility Its that I notice that you have a dot in the physical location. This may be causing an issue as a dot is usually the precursor to a file extension - try renaming the folder to remove the dot and change your libname statement.
You may also try using the Tools>New Library menu and navigating use the Browse button to find the folder you want.
If you check on the box "Enable at startup' it will be available in following SAS sessions.
For fun after creating the library you can enter the command LIBNAME I the box in the upper left under the File menu. That will bring up a window with all of the assigned libraries and you can see the actual path used.
Or use this code to get path text in the results window after it is assigned.
proc sql; select distinct path from dictionary.libnames where libname='CITY' ; quit;
Your path looks mostly correct, do you have a folder called people on your desktop? That's what your'e trying to refer to in the code. You can do a quick test by removing the 'people' portion and see if that works.
One sure way to ensure the path is correct is to navigate to the location in Windows Explorer, right click while holding down SHIFT+CTRL then select "copy as path". It will give you the full path to the folder.
@deeelle wrote:
Hi community, I've never done any sort of coding before, but I'm in now a class in college that requires us to know SAS. This is literally part of the first homework and I'm lost at what to do. I copied the directions on the handout to the T, but I keep getting an error that the library doesn't exist. I honestly don't know what I'm doing to begin with so I have no clue how to fix it.
If anyone has any insight that would be so greatly appreciated.
Just wanted to say thank you to @ChrisBrooks , @ballardw , and @Reeza !!!!!!!! I ended up getting help from the class TA and saving it in a different location, but I really appreciate you all helping out this clueless newbie. I was having a mini panic attack that if I couldn't do the first homework then I was for sure going to fail the class, so I really appreciate how fast and nice you all were in your replies.
Hopefully I'll learn more and in the future be able to help out others...maybe
Many thanks for your kind words @deeelle - we're always happy to help
You'd most likely use data steps, macros or procedures or a combination of these. The possibilities are endless - there's a short video here on how to write a basic SAS program -> https://video.sas.com/detail/videos/how-to-tutorials/video/4573016765001/writing-a-basic-sas-program... along with other useful resources
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.