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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 4584 views
  • 3 likes
  • 4 in conversation