BookmarkSubscribeRSS Feed
ramdantu
Calcite | Level 5

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

2 REPLIES 2
Reeza
Super User

Are you using SAS UE? 

If so, see the instructions in the Help Centre, or search on here. 

 

https://communities.sas.com/t5/SAS-Studio/SAS-University-Edition-Studio-quot-physical-file-does-not-...

 

 

ballardw
Super User

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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2 replies
  • 1119 views
  • 0 likes
  • 3 in conversation