I have a SAS dataset in my downloads folder that I need to write a program against. I cannot get the path correct to access the dataset. However, if I go into my file manager and double click the dataset it opens in my SAS EG project and I can see all the contents. I cannot reference it in my project or program to run a proc contents against it. Is there a way to get it into my work folder?
Right click on the file you see in the File explorer panel and the left and you should be able to get the properties to show you the actual path of the file.
To reference a dataset by directly using the path of the file you have to enclose the path in quotes.
proc contents data="/...../..../membername.sas7bdat";
run;
Or define a libref that points to the directory that holds the file and use a two level name.
libname mydata "/...../..../";
proc contents data=mydata.membername ;
run;
That is exactly what I'm doing and getting a file not found error.
libname a "C:/users/micchelle/downloads";
run;
data vila;
set a.vila_health_los_readmission;
run;
Is there a way once I open the dataset in SAS EG to save it to the project?
I changed the direction of my back slashes and continue to get the file not found error.
libname a "C:\users\micchelle\downloads";
run;
data vila;
set a.vila_health_los_readmission;
run;
Hi,
Enterprise Guide is often running on your PC, but it works by connecting to a SAS session, and usually that SAS session is on a server (often a linux server). One challenge in that setup is that if your SAS code is running on a server, that server can't see your local C: drive. It can be a bit confusing because EG can see your local C: drive, but SAS can't.
If you're using EG connected to a server, then typically you need to upload local data from your C drive to the server (or to somewhere the server can see it). EG has a COPY FILES task which can be used to copy a file from your local file, to the server. This blog post describes that tool. https://blogs.sas.com/content/sasdummy/2020/05/19/copy-files-in-sas-eg/
Do you know if your EG is connected to SAS running on a server? Do you know if you have personal space on the server? Do you know the path for your personal space?
Now I understand what you're saying but I can't figure out how to copy the file (despite your links). I am connecting to a SAS Server United States 2 through SAS OnDemand for Academics.
I'm not familiar with SODA, but I think it might be easier to use it with SAS Studio instead of Enterprise Guide.
I found these instructions on how to upload data to the SODA server via Studio:
https://support.sas.com/content/dam/SAS/support/en/products-solutions/ondemand/LocalData2022.pdf
At the end there is a note with a link to EG documentation which says it can temporarily (?) upload data with File->Open, but it's not clear to me. I only use EG to submit SAS code. If you're starting new with SODA, I would use Studio, unless you have a good reason for using Enterprise Guide.
I'm making slow progress. I found the copy file command and now I'm getting an error that it can't find the destination folder. I have tried substituting my user id and still get destination not found.
Maybe try /home/&sysuserid/Data as the destination. That's just a guess. Hopefully someone else who has used SODA will be able to help out and explain how the home directories are structured on the SODA server.
I changed to SAS Studio on Demand for Academics and the file uploaded. Now I need help accessing it. I can see it, but I'm not sure the correct path. I'm getting a file not found error.
Right click on the file you see in the File explorer panel and the left and you should be able to get the properties to show you the actual path of the file.
To reference a dataset by directly using the path of the file you have to enclose the path in quotes.
proc contents data="/...../..../membername.sas7bdat";
run;
Or define a libref that points to the directory that holds the file and use a two level name.
libname mydata "/...../..../";
proc contents data=mydata.membername ;
run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.