Learning SAS? Welcome to the exclusive online community for all SAS learners.

ERROR: Physical file does not exist

New Contributor
Posts: 2

ERROR: Physical file does not exist



I am currently following the sas programming 1 and i have some difficulties.

80% of the time when i try to do an exercice, i have the same error message in the log: ERROR: Physical file does not exist,...  Even if i copy and paste the answers (the programs) that SAS gives me.

What can i do to fix this ?


Thanks for your help



Trusted Advisor
Posts: 1,251

Re: ERROR: Physical file does not exist

When I tell SAS to read the file, say, C:\Temp\ABC.txt, I also get the error message "ERROR: Physical file does not exist, C:\Temp\ABC.txt." (And I have to admit: In fact, this file doesn't exist.)


What I would do in this situation is:

  1. Take a close look at the path and filename stated in the error message.
  2. Check if the drive (CSmiley Happy, folder (Temp) and file (ABC.txt) exist. (Typical errors include typos, e.g. "Tmp" instead of "Temp".)
  3. If they do, rerun the code. (Maybe there was a temporary disconnection or something.)
  4. Otherwise, either modify the path and filename in the program so that they point to an existing file, or move the file to the specified folder (or create it there if it doesn't exist at all), whichever is more appropriate.

If you have a concrete example, don't hesitate to post the full error message, including the path and filename.

Super User
Posts: 23,724

Re: ERROR: Physical file does not exist

This is a VERY common question here. More than likely you did not set up the shared drive properly - ie /folders/myfolders/ OR you didn't grab the correct file from the course - make sure you get the one specified for Analytics U.

Go back over the installation instructions, it was a PDF and make sure that SAS UE was set up properly.
1. VM downloaded/unzipped
2. Opened with VirtualBox or VMWare
3. Create folder called myfolders in the SASUniversityEdition folder.
4. Create shared path to folder, via VMWare or OracleBox settings.
Posts: 9,368

Re: ERROR: Physical file does not exist

When you are following SAS Programming 1, in the Course Overview and Setup section, there are demos for the 4 different methods of using SAS. Each demo shows how to create files and build a LIBNAME statement. In addition, there are explicit setup instructions that contain 2 tasks. Task 1 generally has you create a program called "SETUP.SAS" which you are instructed to run EVERY time you log on in order to reestablish your connection to the ORION data. Task 2 in the setup instructions has you run a program to MAKE the data files in the location you specify in Task 1.
The exception to this setup procedure is for Enterprise Guide users. There are slightly different instructions for EG users, that have you make a project and put your program in the project and then you are instructed to run this project EVERY time you want to work with Programming 1.
So, without more information about how you are using SAS (SAS Studio with a VM and the University Edition, SAS Studio on a local install, Base SAS on Windows, SAS Enterprise Guide, etc), all I can do is refer you back to the setup instructions and demos INSIDE the course.


New Contributor
Posts: 2

Re: ERROR: Physical file does not exist

Posted in reply to Cynthia_sas

Thank you everybody for you help Smiley Wink

It was my fault. I didn't follow  the setup instructions properly.

Have a good day Smiley Very Happy

Community Manager
Posts: 681

Re: ERROR: Physical file does not exist

Thank you for letting us know! 

Ask a Question
Discussion stats
  • 5 replies
  • 5 in conversation