- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
My instructor created a folder with data and the folder name is APN775. I was unable to use the SAS University Edition so instead I am using OnDemand. I ran my code and it came back with an error:
75 proc contents data=APN775.store
ERROR: Libref APN775 is not assigned.
I added that folder to my C drive yesterday and added a myfolder subfolder under it where the sas files are that are provided by my instructor. I added these under the folder option but based on the error code, do I need to instead add them as a libref on onDemand since it is not assigned? That is my only error. Second, If I do that, I am not understanding how to fully enter the library name after APN775. What exactly should go between these slashes / /? I tried to get more info on chat but it did not give me a resolution. Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Glad you got it working though!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS On Demand runs on a remote (cloud) server and has no access (not even a shared folder like University Edition uses) to your PC. You need to create the folder in SAS Studio and upload the contents of your local folder there (use the upload facility of SAS Studio). Then you need to declare the LIBNAME for this folder; you can retrieve the absolute path to it by right-clicking on it and selecting Properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So if you are using SAS onDemand does that mean you are using SAS/Studio (a browser based interface) to run your SAS code? So you are not running SAS on your PC. (Note that SAS University Edition doesn't really run on your PC either as it uses a virtual machine to run SAS. The virtual machine is running on your PC but SAS is running on that virtual machine.)
You first will need to copy the files to the server where SAS is running. SAS/Studio has an upload feature to allow you to do that.
Once you have the files and folder created on the SAS server you can use SAS/Studio to look at the properties of the folder and see where it actually is on that server. Copy the path from the properties window and paste it into your LIBNAME statement in your code. The path should look something like /home/myname/APN775 depending on how OnDemand creates your home folder and what name you created when you uploaded the files.
In the LIBNAME statement the path goes inside the quotes.
libname APN775 "/home/myname/APN775" ;
proc contents data=APN775.store;
run;
Note that SAS does not care about the case of the names you use for the libname (APN775 in this program) and datasets (store in this program), but the Unix filesystem does care about the case of the directory names. So copy the path exactly as SAS/Studio shows it to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
[cid:17b448c8-c8c1-4fdd-ac4a-cd38e3d91f97]
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
On Demand cannot see your desktop, it's a cloud software, there is no connection to your computer.
To set this up in On Demand these are the rough steps you would need to have followed:
Go to the Servers File & Folders Pane in Studio.
Create a folder with the name APN775
Upload the files your professor created to the folder.
Assign a libref via a LIBNAME statement or the GUI
Then run your PROC CONTENTS.
Did you complete all the steps above? If not, try that first.
Because you're using On Demand, your path will also be different, you don't need the folders/myfolders, that's part of SAS University Edition.
It will be more likely:
To find the exact path, right click it in Server Files Folder pane, select properties and you'll find the path.
libname APN775 "/home/yourUserName/APN775/"
@NisiaS wrote:
My instructor created a folder with data and the folder name is APN775. I was unable to use the SAS University Edition so instead I am using OnDemand. I ran my code and it came back with an error:
75 proc contents data=APN775.store
ERROR: Libref APN775 is not assigned.
I added that folder to my C drive yesterday and added a myfolder subfolder under it where the sas files are that are provided by my instructor. I added these under the folder option but based on the error code, do I need to instead add them as a libref on onDemand since it is not assigned? That is my only error. Second, If I do that, I am not understanding how to fully enter the library name after APN775. What exactly should go between these slashes / /? I tried to get more info on chat but it did not give me a resolution. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
[cid:793f15ed-a7b7-481e-b5a2-31038b303c81]
So those files are uploaded on SAS Studio.
Next, assign a libref via a LIBNAME statement or the GUI is where I am stuck. Here is where I saved the folder on my C:Drive
[cid:57bfdf83-8bb1-490b-b380-bafd97b6550b]
Do I enter libname APN775 '/????????/' (is this where I enter the path under location?)
I get what you are saying about using the cloud. Makes perfect sense. I just can't figure the rest out. Now do I have to go to the library to add something or is this just a code line at the top of the page where I write my code?
You are correct I am not using the SAS UE but that is how I started yesterday, when I was trying to load it to my computer and ran into problems. I already had those folders created and never changed them. Do I need to move the folders somewhere else and/or rename it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
As mentioned before, nothing on your C drive is accessible to SAS On Demand.
Did you follow the steps exactly that I listed in SAS Studio On Demand or the UE?
It must be the On Demand instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I understand that the cloud is unable to read my C drive. But I am still not sure what my statement should read if the properties tab says that my location is C:\SASOnDemand\APN775.
I had already created this folder and never changed it and added my data to it. Yes, I followed your steps exactly.
Do I need to create a library, or can I just add the statement to the top of the code when I write it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Glad you got it working though!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help and going forward I will add my screen shots to a file to attach so you can see what I am saying.