DATA Step, Macro, Functions and more

ERROR: Physical file does not exist and one prefix extra "/" forward slash

Reply
Occasional Learner
Posts: 1

ERROR: Physical file does not exist and one prefix extra "/" forward slash

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

Super User
Posts: 17,828

Re: ERROR: Physical file does not exist and one prefix extra "/" forward slash

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-...

 

 

Super User
Posts: 10,500

Re: ERROR: Physical file does not exist and one prefix extra "/" forward slash

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.

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