BookmarkSubscribeRSS Feed
julianna1644
Calcite | Level 5

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: 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 libname libsas "/folders/myfolders/libsas/finaldata";
NOTE: Library LIBSAS does not exist.
74 data libsas.finaldata;
75 run;
ERROR: Library LIBSAS does not exist.
 
I can see my 'libsas' library in where my 'finaldata' data set exists in the side bar under 'Folders'.
 
I checked the Virtual Box and my 'myfolders' is the shared folder. My syntax isn't copied so I don't think there is any mistakes in that regard. I have gone through some of the other posts on here and I haven't been able to find anything that works. 
 
Any suggestions help! 
2 REPLIES 2
Cynthia_sas
SAS Super FREQ

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

ballardw
Super User

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1736 views
  • 0 likes
  • 3 in conversation