BookmarkSubscribeRSS Feed
armoore
Fluorite | Level 6

 

option validvarname=v7;
libname Coolinfo "C:\Users\ravon\Desktop\practices";

 

I am attempting to create a libname; but each time in the LOG I have a note stating "Note: Library Coolinfo does not exist."

 

On my desktop I have a few SAS table in the practices folder. What am I doing wrong?

 

My version of SAS is 9.04.01M6

 

 

 

17 REPLIES 17
Jagadishkatam
Amethyst | Level 16
The libname path is case sensitive, so please check the path again and copy/paste the same from the folder
Thanks,
Jag
fpb1
Obsidian | Level 7

Wow, I just lost 2 hours on this very issue, after following the advice of the Little SAS Book: "SAS in insensitive to case so you can use uppercase, lowercase, or mixed case - whichever looks best to you". Clearly not a valid general statement.

Tom
Super User Tom
Super User

Referencing SAS variables and other objects in SAS code is case insensitive.  SAS does not care if your code use Name, NAME, nAME there is only one variable that it can match.

 

But your operating system, in this case unix, has its own rules that you also need to understand.

 

ed_sas_member
Meteorite | Level 14

Hi @armoore 

I used to experience the same issue and its was solved by using slash (/) instead of back slash (\). So please, try this:

libname Coolinfo "C:/Users/ravon/Desktop/practices";

Hope this helps,

 

Best,

armoore
Fluorite | Level 6

I was able to get this to work

libname XO xlsx "C:/Users/ravon/Documents/np_info.xlsx";

 

The LOG states

NOTE: Libref XO was successfully assigned as follows:
       Engine:        XLSX
       Physical Name: C:/Users/ravon/Documents/np_info.xlsx
 
Thank you
Kurt_Bremser
Super User

Since the XLSX libname can be used to create a new file, SAS does not access the file before you actually try to read from or write to the library. Therefore the success of the libname statement itself does not mean anything.

Kurt_Bremser
Super User

SAS Studio is part of a server installation (as it needs a web server and web application server to run).

If the server name in your browser's address line for the Studio window is not localhost, then your SAS will most probably run on a remote server, and you cannot access your C: drive from there.

armoore
Fluorite | Level 6

Because I'm not able to access my C: drive using SAS Studio. Would that be the reason why I'm not able to save data sets to that library name example.

 
libname XO xlsx "C:/Users/ravon/Documents/np_info.xlsx";
 
data XO.fastcars;
                     set sashelp.cars;
                     keep MSRP Type Origin;
run;
 
Also, the reason SAS studio states Library HAT does not exist for this libname statement below?
 
libname HAT base "C:/Users/ravon/Documents/yepyep/practices";
 
 
 

 

Tom
Super User Tom
Super User

Where is the version of SAS that you are using SAS/Studio to connect to running?  Is it running on your local machine (where you are running the browser that is connecting to SAS/Studio webpage?).  If you are using the free SAS University Edition then it is running in a virtual machine, so it is not really running on your machine.

 

But SAS/Studio provides a nice panel to let you browse the files that the SAS server can see. Find the file that you want to read (or the directory where you want to write to) in that panel.  Right click on it and ask for Properties.  That will show you the path that SAS is using the see that file.  Copy that path into your SAS code. 

armoore
Fluorite | Level 6
My version of SAS is 9.04.01M6.
Yes, Its I am running on my labtop where I have to connect to the SAS/Studio webpage.

If I right click on the folder on my desktop. Then, select properties and copy location this is what is seen C:\Users\ravon\Desktop
Tom
Super User Tom
Super User

@armoore wrote:
My version of SAS is 9.04.01M6.
Yes, Its I am running on my labtop where I have to connect to the SAS/Studio webpage.

If I right click on the folder on my desktop. Then, select properties and copy location this is what is seen C:\Users\ravon\Desktop

There isn't any "desktop" in SAS/Studio, checking the desktop on your PC does not help anything. Everything in SAS/Studio is in your browser.  Look at the Server Files and Folders area of the SAS/Studio browser window for file you want and check the properties there. Can that see a folder named C:\Users\ravon?  Or do you see only the /folders/myfolders/ area that the virtual Machine were the SAS University Edition version of SAS is running?  Or something else?

armoore
Fluorite | Level 6

I have attached pictures of my view of the Server Files and Folders

Kurt_Bremser
Super User

You use SAS on Demand for Academics, the "odaws" on the top of your directory tree is the clue. Your SAS does not run on your desktop, it runs in the AWS cloud. Files must be uploaded through SAS Studio.

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 17 replies
  • 2265 views
  • 2 likes
  • 6 in conversation