Dear Friends,
I'm trying to write a sample SAS program which suppose to extract data from Excel file @ my Desktop and write the data into my "Work.Age" table in SAS.
But I am getting the error as
"ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Dantu\Desktop\SASDATA\/Age.xlsx.".
It shows in the log one prefix extra "/" forward slash before "Age.xlsx" which is my input excel. But in the actual code there is no such extra forward slash.
Requesting to help me out in this issue.
Program ==>
PROC IMPORT DATAFILE="C:\Users\Dantu\Desktop\SASDATA\Age.xlsx"
out=work.Age
DBMS=XLSX
REPLACE;
SHEET="AgeTab";
GETNAMES=YES;
RUN;
Error Log ==>
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 PROC IMPORT DATAFILE="C:\Users\Dantu\Desktop\SASDATA\Age.xlsx"
63 out=work.Age
64 DBMS=XLSX
65 REPLACE;
66 SHEET="AgeTab";
67 GETNAMES=YES;
68 RUN;
ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Dantu\Desktop\SASDATA\/Age.xlsx.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
69
70 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
83
Are you using SAS UE?
If so, see the instructions in the Help Centre, or search on here.
The error line like this
/opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\Dantu\Desktop\SASDATA\/Age.xlsx.".
with mix of / and \ tells be that SAS is likely executing in a Unix / Linux environment and you told it to look at a windows path. Note the assumption that the windows is subordinate to the SASApp directory.
The single most common cause we see here for this is as @Reeza suggests followed by a server SAS install and your Server cannot see your desktop and is looking in the server file system for the file. Which may recquire using one of the wizards or tasks that allows the server to import files on your machine.
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.