I cannot figure out why my code isn't working. I want to use a txt file that is saved on my computer as my data set. This is my code:
data water;
infile 'C:\Users\Laura\Desktop\Household_Consumption.txt'
DLM='09'x;
input #1 address $
persons
housetype $
#2 poweruse
#3 wateruse;
run;
The error that keeps popping up is "Physical file does not exist, /pbr/biconfig/930/Lev1/SASApp/C:\Users\Laura\Desktop\Household_Consumption.txt.
Do I have to save my data set within SAS Web Editor? How?_
You say web editor. Can you clarify what type of SAS you're using? Is the the SAS University Edition?
Or are you on a server somewhere?
I'm using SAS On Demand for Academics Web Editor
See all other posts on this as you are using Unix not Windows and must definine a connection in your virtual machine to Windows while using in SAS Unix naming.
Yet another server related issue. The path
/pbr/biconfig/930/Lev1/SASApp/C:\Users\Laura\Desktop\Household_Consumption.txt
tells you that it is looking at the SERVER which is UNIX of some flavor and not your
windows machine.
You need to tell the server to look at your drive not its.
How do I change my code in order to tell the server to look at my drive?
I believe you need to upload your file to the server instead.
That's what I suspected I would need to do, but I am not sure how to do it. Do I need to upload the txt file via code?
The SAS on demand for academics is a closed environment for students. Only an instructor, the person setting up your course, is allowed to do some uploads (limited space).
You could possible store some data in a location like your Unix-homedir (aside SASUSER). In all cases any Windows naming like your desktop will work.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.