BookmarkSubscribeRSS Feed
Daily1
Quartz | Level 8

SAS EG
proc import datafile="C:\Users\HP\Desktop\AMRA.xlsx"
dbms=xlsx
out=mydata
replace;
run;

 

log

ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:\Users\HP\Desktop\/AMRA.

3 REPLIES 3
PaigeMiller
Diamond | Level 26

If you are using SAS® Studio, you cannot directly access files on your C: drive. You have to upload them to the SAS Studio server. On the left, under "Server Files and Folders", select a folder and then click on the upload icon.

--
Paige Miller
Kurt_Bremser
Super User

Your Enterprise Guide is connected to a SAS server running on UNIX, most probably Linux. You need to first upload the file to the server so your SAS process can read it.

Enterprise Guide provides the Copy Files task for this. After uploading, use the target path from Copy Files as DATAFILE in your PROC IMPORT statement.

Sajid01
Meteorite | Level 14

Whenever a SAS code is executed on a server, it can access folders and files on the server but not on your desktop.

Now you are  executing the code on the server, so the SAS searches for the file "C:\Users\HP\Desktop\AMRA.xlsx" on the server. Therefore it triggers an error.

The solution would be upload the file to the appropriate folder using scp client.

In a typical SAS environment jobs running on the server cannot normally access location on the users desktop/laptop/vdi. However some times access is permitted and one need to use the UNC path something like "\\your_esktop_name\full_file_path\filename.xlsx" in place of the filepath you have provided. This fact can be confirmed by your SAS administrator.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 3441 views
  • 3 likes
  • 4 in conversation