05-27-2014 07:44 PM
Here's the cod:
length First_Name $ 12 Last_Name $ 18 Job_Title $ 25;
input First_Name $ Last_Name $ Job_Title $ Salary;
title 'New Sales Employees';
proc print data=work.newsalesemps;
proc means data=work.newsalesemps;
So the main error I'm getting here is that the physical file does not exist. I'm on SAS Enterprise Guide and so I've discovered that the program itself cannot access my comps C or D drive which makes downloading orion onto my comp no kind of a solution. I'm wondering if we need to even bother with the infile since it seems mainly to be used to reference a physical pathway on my actual computer. Am I looking at this the wrong way or have I missed something? Any help would be appreciated.
05-27-2014 08:01 PM
Are you running SAS on your local machine or on a server?
If you are running on a server then your code is attempting to access the CSV on the servers default location.
Copy the file to a network drive that SAS has access to, alter your code to reflect this and run it again.
Hopefully that will do the trick.
05-28-2014 02:17 AM
With EG, you most probably have the SAS system itself running on a server. If you specifiy a relative path (something that does not start with X:\ on windows or / on UNIX), SAS will look in the current working directory it was started in, so it will not find the file in most cases.
In order to get a valid infile, you must
- find out what type of server you have
- copy the file to the server or to a network location that the server (and your acoount on the server!) has access to
- use the correct naming conventions when specifying the absolute(!) path to the file
If your EG is a frontend for a local SAS installation on your PC, simply put the file in a location that's easy to find (like C:\TEMP), and then use 'C:\TEMP\newsalesemps.csv' in your filename or infile statement.