ERROR: Physical file does not exist

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

ERROR: Physical file does not exist

[ Edited ]

I know this question has been asked a million times, but none of the solutions I found helped me. I am very new to SAS, so please bear with me.

 

Here is my situation. I have a file located at C:\Users\myaccount\Documents\IO\temp.csv

 

When I use the "File > Open > Data" menu, I can successfully open that file in SAS. I can then right click on it an choose Import Data and see the data itself. If I right click on the file in the Process Flow box (top left) and choose properties, the path it shows me is, obviously, C:\Users\myaccount\Documents\IO\temp.csv

 

But, when I run a program as follows, I get the error "Physical file does not exist".

 

DATA temp;
INFILE 'C:\Users\myaccount\Documents\IO\temp.csv';
INPUT ID AGE;
RUN;

Any help is highly appreicated.


Accepted Solutions
Solution
‎01-04-2016 04:34 PM
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

I solved my problem by putting my files on a shared drive and accessing the shared drive using its URI.

View solution in original post


All Replies
Super User
Posts: 19,772

Re: ERROR: Physical file does not exist

The answer will be the same. You need to create a shared folder myfolders and map that, then reference it using UNIX paths because of the VM. The GUI probably uses a different method to import but code needs to be different. This is assuming your using SAS UE. If it's SAS EG it's a similar answer except you need to move your data to the server.
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

Thanks Reeza and sorry for delayed follow up. I am using SAS EG and it is on a Windows machine. I have moved the data to that machine (the path to C:\Users\myaccount\Documents\... is local to that machine) but I cannot get it to work. Please advise.
Super User
Posts: 19,772

Re: ERROR: Physical file does not exist

Post your log.
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='ReadFile';
4          %LET _CLIENTPROJECTPATH='C:\Users\ACCOUNT\Documents\IO\Project.egp';
5          %LET _CLIENTPROJECTNAME='Project.egp';
6          %LET _SASPROGRAMFILE=;
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         GOPTIONS XPIXELS=0 YPIXELS=0;
11         FILENAME EGSR TEMP;
12         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
13             STYLE=HtmlBlue
14             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
15             NOGTITLE
16             NOGFOOTNOTE
17             GPATH=&sasworklocation
18             ENCODING=UTF8
19             options(rolap="on")
20         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
21         
22         GOPTIONS ACCESSIBLE;
23         DATA temp;
24         INFILE 'C:\Users\ACCOUNT\Documents\IO\temp.csv';
25         INPUT ID AGE;
26         RUN;

ERROR: Physical file does not exist, C:\Users\ACCOUNT\Documents\IO\temp.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEMP may be incomplete.  When this step was stopped there were 0 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
      

27         
28         GOPTIONS NOACCESSIBLE;
29         %LET _CLIENTTASKLABEL=;
30         %LET _CLIENTPROJECTPATH=;
31         %LET _CLIENTPROJECTNAME=;
32         %LET _SASPROGRAMFILE=;
33         
34         ;*';*";*/;quit;run;
35         ODS _ALL_ CLOSE;
36         
37         
38         QUIT; RUN;
39         
Super User
Posts: 19,772

Re: ERROR: Physical file does not exist

Can you post a screenshot of your path? I'm inclined to believe the log is correct and your path isn't specified correctly.

The other alternative is to make sure the path is specified correctly - including case. Copy the path of the file, in Windows you can do this by holding down control and right clicking on the file and "Copy Path". Use that path in your data step and see if it works.
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

I copied the path, and the case is correct.
Super User
Posts: 19,772

Re: ERROR: Physical file does not exist

It still didn't work? What about Bruno_SAS suggestion to verify the server location?

Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

The server location is a subdomain on my company's domain. I don't have access to it except via Citrix.

 

But, when I go on SAS and click File > Open, I can see the file system on that server. That is exactly where I stored the file.

 

For privacy reason I cannot share screenshots, but I can follow the steps that you might suggest to investigate the problem.

Super User
Posts: 19,772

Re: ERROR: Physical file does not exist

You need to find the path to the file on the server, you may be able to use the Server List to find the path. Servers>Server (NOT LOCAL)>find the path to the file and use that path.
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

Under servers I have only one, called SASApp; opening it shows Libraries and Files. The latter is empty. The former contains some libraries created by a former user who has left organization.
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

I also right clicked on that server, and there is a number of parameters set in the Initialization Log. The look like:

%LET _SASSERVERNAME = 'SASApp';
%LET _SASHOSTNAME = 'subdomain.domain.com';

Should I specify them manually so I can access files?
SAS Super FREQ
Posts: 708

Re: ERROR: Physical file does not exist

This sounds like your SAS session is running on some other machine, that does not see your file system on the PC where you are running SAS Enterprise Guide.

 

Use your RightMouseButton on the SAS Server you run the code, go to properties, this will show you the machine name and other information related to your SAS Server.

 

Have a look at this blog entry http://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/ by @ChrisHemedinger this will allow you to copy files from your local machine to the SAS Server where your SAS code is executing

 

Bruno

 

 

Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

Posted in reply to Bruno_SAS
The SAS session is running on a server; however I believe I have moved the file to that same server. I will check the blog now too.

I should clarify that I access the SAS EG through Citrix.

Thank you both for your responses!
Solution
‎01-04-2016 04:34 PM
Occasional Contributor
Posts: 10

Re: ERROR: Physical file does not exist

I solved my problem by putting my files on a shared drive and accessing the shared drive using its URI.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 14 replies
  • 3106 views
  • 0 likes
  • 3 in conversation