Hello all,
Is it possible to create a permanent library that points to a local folder on my computer while using SAS Studio (SAS on Demand for Academics)?
I have tried the simple libname statements but to no success, like:
libname library "C:\SASonDemand";
libname library "/pbr/biconfig/940/Lev1/SASApp/C:/SASonDemand";
Is it possible within SAS Studio to create a folder like (C:\SASonDemand) and have the permanent library point to it? Or, must all permanent libraries be contained within the SAS Studio environment?
Thank you for your time.
@kofi_appiah wrote:
Thank you. So SAS studio does not allow the uploading of SAS code or data sets from my local drive? Thus, must everything be created or generated within the SAS studio environment?
You can upload and download files (code files, datasets, text files, etc). You just have to use the point and click interface in your browser to do it.
SAS/Studio is a tool that allows you to use your BROWSER to manipulate and run SAS code.
The SAS code itself will run on SAS session that is running on the application server that your SAS/Studio session is connected to.
SAS on Demand for Academics is a particular SAS/Studio installation. The server that it uses to run SAS is located at SAS. So if you want to make libref that points to some directory where you can store SAS datasets then that directory needs to be on the machine where SAS is running. So you need to place the files in your home directory on the SAS server, not on the PC that you happen to be running the browser that is allowing you to access SAS/Studio. Even if there was some magic that the browser could do that would allow SAS/Studio or SAS code to reach over the internet back to your PC and grabs files tomorrow you might connect to SAS/Studio from a different browser on a different PC.
Thank you, it is a bit clearer. So how do I find my home directory on the SAS server? Please see screenshot.
Thank you.
Look under Server Files and Folders. Only LIBREFs that have been defined will appear in LIBRARIES.
On UNIX (which is where SAS is running) you can normally just use ~ as shortcut for referencing your home directory.
69 data _null_; 70 infile '~/test1.csv' obs=3; 71 input; 72 list; 73 run; NOTE: The infile '~/test1.csv' is: Filename=/home/XXX/test1.csv, Owner Name=XXX,Group Name=oda, Access Permission=-rw-r--r--, Last Modified=06Dec2021:20:14:49, File Size (bytes)=384 RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 1 Alfred,M,14,69,112.5 20 2 Alice,F,13,56.5,84 18 3 Barbara,F,13,65.3,98 20 NOTE: 3 records were read from the infile '~/test1.csv'. The minimum record length was 18. The maximum record length was 20. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
With your guidance, I tried the home directory listed at the bottom of the console (highlighted in second screenshot) and it works, finally. I created (I hope) a permanent folder called 'Testing' for which I now see in the libraries.
Thank you.
@kofi_appiah wrote:
Is it possible within SAS Studio to create a folder like (C:\SASonDemand) and have the permanent library point to it? Or, must all permanent libraries be contained within the SAS Studio environment?
It is not possible to create a permanent library to your local drive, all permanent libraries must be contained in the SAS Studio Environment.
You can navigate that environment using the Servers Files & Folders Pane.
Thank you. So SAS studio does not allow the uploading of SAS code or data sets from my local drive? Thus, must everything be created or generated within the SAS studio environment?
@kofi_appiah wrote:
Thank you. So SAS studio does not allow the uploading of SAS code or data sets from my local drive? Thus, must everything be created or generated within the SAS studio environment?
You can upload and download files (code files, datasets, text files, etc). You just have to use the point and click interface in your browser to do it.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Ready to level-up your skills? Choose your own adventure.