Hi all,
I am new to SAS and recently downloaded UE after having similar trouble using SAS 9.4 on my University's computers.
I have:
libname libsas "/folders/myfolders/libsas/finaldata";
data libsas.finaldata;
run;
and I get:
Hi:
What's not clear is whether "finaldata" is a folder, a dataset or both. It seems clear that LIBSAS is a folder name under your /folders/myfolders location, but it's not clear about whether finaldata is a folder or a dataset.
So there is a absolute, never-fail, way to see what the path for your LIBNAME statement should be.
In the server files and folders pane on the left side of SAS Studio, look for the LIBSAS folder under your My Folders top node. Expand the LIBSAS folder using the little arrow.
Do you have a dataset named "finaldata" in that folder? Or, do you have a subfolder named finaldata? What you need to to is right click on the LIBSAS folder and choose Properties. In the Location field will be the location of that folder. If you have a data table called finaldata that is directly under the LIBSAS folder, then you need this:
libname libsas '/folders/myfolders/libsas';
Note that for this to work, you must really have a folder called libsas under your My Folders top node.
This syntax
data libsas.finaldata;
run;
will CREATE a table called finaldata in the LIBSAS library. So that is problematic. Are you trying to create a SAS dataset called FINALDATA or are you trying to READ an existing SAS data set called finaldata?
This might be easier if you took a screen shot of what you see under LIBSAS in the server files and folders pane and explained what you envision you are going to create with THIS code:
data libsas.finaldata;
run;
Cynthia
Is FINALDATA supposed to be a single data set or folder with multiple files in it? I am going to guess that maybe you are using the dataset name as part of the library and shouldn't.
What happens if you use:
libname libsas "/folders/myfolders/libsas";
Libraries store multiple items and basically correspond to folders or directories (let's not get in to specific composite files like databases and such). So the Libname statement should only list folders, not a specific file if you have done so.
73 libname libsas "/folders/myfolders/libsas/finaldata"; NOTE: Library LIBSAS does not exist.
Tells us there is something wrong but without access to your system we can't really tell. The LIBSAS referenced in the NOTE is not the folder but the actual attempted to create library. So you can "see" libsas in a folder location but something else is going on. To test this change the libname statement to something like
libname mylib "/folders/myfolders/libsas/finaldata";
And see if the note you get is
NOTE: Library MYLIB does not exist.
There might be an issue like space or other unprintable character before the folder name in /libsas
This might be time to actually take a screen capture of what you "see" and post the image using the camera icon.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.