BookmarkSubscribeRSS Feed
jatkrs
Calcite | Level 5

I'm trying to extract external data file from my desktop into SAS. I keep getting an error saying the physical file does not exist. The path to the file is correct and I've checked it multiple times. I'm not sure what I'm doing wrong or if maybe it's some type of firewall setting that SAS can't get into my desktop files?  My laptop is running Windows 7 and I'm using the SAS Studio. Any Ideas? Here's my SAS syntax:

DATA assignment2;

INFILE 'C:\Users\new_account\Desktop\assignment2.dat';

INPUT Gender $ Age $ Systolic $ Diastolic;

RUN;

The log looks like:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

42 ;

43 DATA assignment2;

44 INFILE 'C:\Users\new_account\Desktop\assignment2.dat';

45 INPUT Gender $ Age $ Systolic $ Diastolic;

46 RUN;

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\new_account\Desktop\assignment2.dat.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.ASSIGNMENT2 may be incomplete. When this step was stopped there were 0 observations and 4 variables.

WARNING: Data set WORK.ASSIGNMENT2 was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.00 seconds

  cpu time 0.00 seconds

  

47 ;

48 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

58 ;

6 REPLIES 6
Ksharp
Super User

Your SAS is installed in remote server , but you are using local PC 's file path , therefore that couldn't work out .

You need upload that file to remote SAS server , and use

INFILE '/home/etc/assignment2.dat';



Or if you are using EG , try to import it via Menu .

morgankho
Fluorite | Level 6

Thanks for this! I was going crazy trying to figure this out, but this tip fixed my problem! 🙂 

R_kunamneni19
Calcite | Level 5

How to copy the file to my remote server and how can i find the remote server?

my file is on local pc C:\Users\xxxx\Desktop\SAS Assignments\XLSX-files\sample.xlsx

 

 

even i copied this file to shared folder where it is allowed in the Virtualbox

 

please suggest me

shailaja1
Calcite | Level 5
best reply to this issue till date. Crystal clear solution. Thank you
Kurt_Bremser
Super User

do a google search for

"physical file does not exist sas community"

and you will find the many threads here that have dealt with this problem.

Cynthia_sas
SAS Super FREQ

Hi, As Kurt suggested, there are MANY postings, especially in the SAS Analytics U forum about how you CANNOT use a C: drive location and Windows slashes (\) when you use SAS University Edition or SAS OnDemand for Academics. One of the LAST steps in setting up the SAS University Edition was setting up your shared folder location.

So that means, if you are using SAS University Edition you will need to

1) make sure you have set up shared folders

2) put your assignment2.dat file in the shared folder location

3) use the correct path name (which you will find many examples of in the forums)

Or, if you are using SAS OnDemand for Academics you will need to

1) check to see if your instructor already put assignment2.dat into the class directory and if so, use that folder path

2) if you instructor has NOT put the file in the class directory, then you will need to upload the file to your OnDemand server folder

3) use the correct path name (which you will find an example of in your Control Center information)

cynthia

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 23737 views
  • 2 likes
  • 7 in conversation