BookmarkSubscribeRSS Feed
lbrennan
Calcite | Level 5

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?_

9 REPLIES 9
Reeza
Super User

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?

lbrennan
Calcite | Level 5

I'm using SAS On Demand for Academics Web Editor

jakarman
Barite | Level 11

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.

---->-- ja karman --<-----
ballardw
Super User

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.

lbrennan
Calcite | Level 5

How do I change my code in order to tell the server to look at my drive?

Reeza
Super User

I believe you need to upload your file to the server instead.

lbrennan
Calcite | Level 5

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?

jakarman
Barite | Level 11

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.

---->-- ja karman --<-----

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 833 views
  • 3 likes
  • 4 in conversation