DATA Step, Macro, Functions and more

excel using Proc Import

Reply
N/A
Posts: 0

excel using Proc Import

Hi, I tried to use Proc Import to get some data from Excel. here's my code:
proc import
out=imrcomplete
datafile= "c:/my data/IMR.xls"
dbms=xls replace;
sheet = 'IMR';
run;
ERROR: Physical file does not exist, /local/sso/academics/prod/biconfig/Lev1/SASApp/data.IMR.xls.

Does that mean i didn't assign a library or something.
please help!
Mandy
Super User
Posts: 9,681

Re: excel using Proc Import

The code should be like ?
sheet = 'IMR$';
SAS Super FREQ
Posts: 8,743

Re: excel using Proc Import

Hi:
I notice 2 things about the error message:
[pre]
ERROR: Physical file does not exist, /local/sso/academics/prod/biconfig/Lev1/SASApp/data.IMR.xls.
[/pre]

The fact that your location specified in the code was "c:\my data\IMR.xls and the fact that the ERROR referred to a biconfig\Lev1\SASApp location.

This implies several possibilities to me:
1) you are using SAS Enterprise Guide, which accesses SAS on the server and in this particular scenario, the server on which SAS is running has no visibility of your local C: drive.
2) you are using a BI Platform (or SAS Enterprise Intelligence Platform) configuration, in which security and data access is handled by the Metadata repository. Again, in this particular scenario, the platform server (SASApp) on which SAS is running has no visibility of your local C: drive.

Depending on which version of the Enterprise Intelligence platform you are running, you may need to upload your .XLS file to a location on the server which is accessible to SAS. This means that the DATAFILE= option would no longer be a local C: drive location. This will probably involve the help of your SAS administrator to ensure that 1) you have a directory assigned to which you have write access on the server and 2) you have sufficient authority and authorization privileges to write to that location on the server and 3) you will have to know that location on the server in order to specify the correct DATAFILE= option.

Also, you might want to reconsider the use of the WORK library as the location for the place to store your SAS dataset IMRCOMPLETE -- if your SAS Administrator will allocate a library to you, in the Metadata, you could then write to a permanent library, so the dataset IMRCOMPLETE will be available to you in subsequent EG sessions.

I believe that in some versions of SAS EG, there is a way to upload local files to the SAS servers, you might want to check with your SAS Administrator or Tech Support about which version of EG and how to accomplish this task.

cynthia
Ask a Question
Discussion stats
  • 2 replies
  • 1681 views
  • 0 likes
  • 3 in conversation