Help using Base SAS procedures

"Physical file does not exist"

Reply
N/A
Posts: 1

"Physical file does not exist"

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 ;

Super User
Posts: 9,676

Re: "Physical file does not exist"

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 .

New Contributor
Posts: 4

Re: "Physical file does not exist"

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

Learner
Posts: 1

Re: "Physical file does not exist"

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

Super User
Posts: 6,935

Re: "Physical file does not exist"

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 8,743

Re: "Physical file does not exist"

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

Ask a Question
Discussion stats
  • 5 replies
  • 9124 views
  • 1 like
  • 6 in conversation