Hi,
I was following the captioned tutorial under the free course SAS® Programming 1: Essentials. The activity asked to perform as below:
" Open a new program window and perform the following tasks:
What i did first was that I manually opened the foilder containing the above file from "My Computer" and then got its file directory from its properties.
I then copied the same directory in the Proc Contents step and executed it as per the instructions. SAS code is as below:
proc contents data="E:\SASUniversityEdition\myfolders\EPG194/storm_summary.sas7bdat";
run;
Then i got an error message which i have attached as Attachment 1
Subsequently I figured out the file location by accessing it through the SAS Studio and found the location address which I have attached as Attachment 2. The address is "/folders/myfolders/EPG194/data/storm_summary.sas7bdat" . By copy pasting this address, into the Proc contents code, i could get the summary table.
But my question is that why did the original file path which i took from the My Computer did not work and why the other file path which i got from SAS studio only worked. Moreover the file path mentioned in SAS studio started with /folders, whereas in reality the "My Folders" folder was not created in any such folder by name "folders".
How would a new learner be able to figure out this file path logic ? or how would a new comer be able to write the file path without viewing it through the GUI by clicking the properties ?
Im having a similar issue but i have the correct file name and getting this error message
could you let me know what I am doing wrong?
you have to use the same / for unix or \ for windows systems.
proc contents data="E:\SASUniversityEdition\myfolders\EPG194/storm_summary.sas7bdat";
run;
try this
proc contents data="E:\SASUniversityEdition\myfolders\EPG194\storm_summary.sas7bdat";
run;
No this did not work.
Hi:
You CANNOT use a local Windows path location with SAS University Edition. This will NOT work. When using SAS University Edition, you MUST use the shared folder location, as you see it when you check the Properties for the data folder in SAS Studio. If you followed ALL of our instructions, that path should be:
data="/folders/myfolders/EPG194/data/storm_summary.sas7bdat";
and, if you are using SAS OnDemand for Academics and followed all the instructions, the location would be:
data="/home/<yourUserID>/EPG194/data/storm_summary.sas7bdat";
That means if YOUR UserID is imastudent0 then the path would be:
data="/home/imastudent0/EPG194/data/storm_summary.sas7bdat";
You can ONLY use a Windows path if you are using SAS or Enterprise Guide with a local install of SAS.
Cynthia
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.