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