Reputation: 2189
I am opening a new program in SAS Enterprise Guide using file -> new -> program.
Now I would like to a load .csv file from my desktop using the following code:
proc import datafile="C:\Users\M.van.der.Peet\Desktop\test.csv"
out=shoes
dbms=csv
replace;
getnames=no;
run;
proc print;
run;
When I run this I get the following error however:
ERROR: Physical file does not exist, C:\Users\M.van.der.Peet\Desktop\test.csv.
But the file is there :). Any thoughts on how I get a better understanding of why this is not working? Is there an ls() like function to see which files are stored in a dir?
Upvotes: 0
Views: 344
Reputation: 31
Enterprise Guide is typically installed on UNIX/Linux Server. You have to FTP the file i.e. upload the file using a FTP client like WinSCP or UltrEdit from Windows to a location on UNIX. Then you have to provide that path on your program.
Upvotes: 1
Reputation: 6378
If your EG session is connected to a remote SAS server (such as a Linux server) your code will not work.
Basically, when you press submit in EG, it uploads the code to the SAS server, executes the code, and downloads the results and log to the EG client. Since the remote server cannot see files on your local C: drive, you will get an error if you try to read a file on C:.
You can upload the file to the remote server, and it will work. Or if you look at the EG tasks in the menus, I'm sure there is an IMPORT task or similar name which would work. The task works by uploading the input file for you before the SAS code is submitted. I don't use the menus, so can't give you the details.
Upvotes: 2