Desktop productivity for business analysts and programmers

ERROR: Physical File does not exist

Reply
Occasional Contributor
Posts: 11

ERROR: Physical File does not exist

Hi  SAS Community,

 

I am trying to import a very basic excel file with 4 columns and 5 rows  from a shared folder, however I  keep getting the following error:

 

ERROR: Physical file does not exist,//bqlpnas01/hodata/Assessment/Testdata.xls

 

I am using SAS Enterprise Guide 4.3 and  below is my logic:

 

Proc Import Datafile=",//bqlpnas01/hodata/Assessment/Testdata.xls"

OUT=Outdata

DBMS=xls

REPLACE;

SHEET="Sheet1"

GETNAMES=YES;

run;

 

I really appreciate your help to make this work.

 

Kind regards,

Maggie

Trusted Advisor
Posts: 1,427

Re: ERROR: Physical File does not exist

Hello @Timbim , Maggie,

 

first, I would say that your path to your shared file would need to use \\ ...\...\  instead of //..../.../ But perhaps it does not matter.

Second, I would say that either your user (or the user who runs the process in your sas code (server or pc) does not have permissions to that shared location.

 

I would ask this question to a system administrator, they should be able to help you just fine Smiley Happy

 

Kind regards,

Juan

Occasional Contributor
Posts: 11

Re: ERROR: Physical File does not exist

Posted in reply to JuanS_OCS
Hi Juan,
I do have access to the shared folder. This is proven by other files I have
imported using the "import" function on SAS EG without having to write an
import logic myself.
Super User
Posts: 8,062

Re: ERROR: Physical File does not exist

When SAS says "Physical File does not exist", it is usually right. Up to now I have recorded a 100% success rate for this.

 

When you use the import wizard in EG, the resource is read LOCALLY, Excel to text conversion is also done locally, the text is sent to the server via the IOM bridge, and a data step created for the text is executed there.

When you write proc import code yourself, the code is sent to the server, and then the server tries to read the resource. If the SAS server or your user on the SAS server does not have access to the shared resource, the file is simply not there.

 

So you have to verify that your userID on the SAS server has access to the UNC path.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 11

Re: ERROR: Physical File does not exist

Posted in reply to KurtBremser

Thanks Kurt. Do you know how I could verify my USERID on the SAS Server without having to call up the Technology Team?

Super User
Posts: 8,062

Re: ERROR: Physical File does not exist

On a UNIX server, I would simply connect to it with SSH, log on with my SAS UserID, and then try to navigate to the intended location.

If that does not work, I'd do a df to check if the resource in question is mounted on some other directory I did not look for.

But that's UNIX.

 

Since you do have a Windows backend, I'd check with the sysadmin of the SAS server if the shared resource is available on the server, and if the necessary permissions are propagated there. Windows can be very tricky in that regard.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 11

Re: ERROR: Physical File does not exist

Posted in reply to KurtBremser
Actually, I think I have a unix server. How do I tell the difference?

Really appreciate your insights.
Super User
Posts: 8,062

Re: ERROR: Physical File does not exist

If you have UNIX, you can safely assume that it also has a secure shell (SSH) server running. Use a tool like PuTTY to log on to the server, and then go searching for network mounts. Or use WinSCP (same connection), which allows you to browse the filesystem Explorer-like.

 

IMO, you're better off by simply asking the admin if the resource is mounted on the server, and if yes, where.

 

For searching on your own, some knowledge about UNIX filesystem structures and UNIX utilities is required.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 8,062

Re: ERROR: Physical File does not exist

Is that comma really there at the start of your path?

Which environment does your SAS server use (UNIX or Windows)?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 11

Re: ERROR: Physical File does not exist

Posted in reply to KurtBremser
Hi Kurt, that comma was inserted by mistake. I have a Windows environment.
Super User
Super User
Posts: 8,177

Re: ERROR: Physical File does not exist

Please show the log of the exact code run, i.e. without the "," preceeding.

Occasional Contributor
Posts: 11

Re: ERROR: Physical File does not exist

1 ;*';*";*/;quit;run;

2 OPTIONS PAGENO=MIN;

3 %LET _CLIENTTASKLABEL=%NRBQUOTE(Code2);

4 %LET _EGTASKLABEL=%NRBQUOTE(Code2);

5 %LET _CLIENTPROJECTNAME=%NRBQUOTE(H:\Transformation\Daily Arrears Summary\Project1.egp);

6 %LET _SASPROGRAMFILE=;

7

8 ODS _ALL_ CLOSE;

NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these

drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.

9 OPTIONS DEV=ACTIVEX;

10 FILENAME EGHTML TEMP;

SYMBOLGEN: Macro variable SASWORKLOCATION resolves to

"/saslev1comp/sasegwork/SAS_workE9970000527A_boqs0312pp/SAS_work84890000527A_boqs0312pp/"

NOTE: Writing HTML(EGHTML) Body file: EGHTML

11 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault

11 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css")

11 ! ATTRIBUTES=("CODEBASE"="http://www2.sas.com/codebase/graph/v91/sasgraph.exe") NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation

11 ! ;

SYMBOLGEN: Macro variable SYSVLONG resolves to 9.01.01M3P020206

SYMBOLGEN: Macro variable GRAPHAVAIL resolves to 9.01 TS1M3

12

13 %gaccessible;

SYMBOLGEN: Macro variable ACCESSIBLE resolves to NOACCESSIBLE

14 Proc Import DATAFILE="//bqlpnas01/hodata/AssetMnmt/Testdata.xls"

15 OUT=OUTDATA

16 DBMS=xls

17 REPLACE;

18 Sheet="Sheet1";

19 GETNAMES=YES;

20 run;

ERROR: Physical file does not exist, //bqlpnas01/hodata/AssetMnmt/Testdata.xls.

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

NOTE: PROCEDURE IMPORT used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

21

22 %LET _CLIENTTASKLABEL=;

23 %LET _EGTASKLABEL=;

24 %LET _CLIENTPROJECTNAME=;

25 %LET _SASPROGRAMFILE=;

26

27 ;*';*";*/;quit;run;

28 ODS _ALL_ CLOSE;

29

30

31 QUIT; RUN;

32

 

Ask a Question
Discussion stats
  • 11 replies
  • 166 views
  • 0 likes
  • 4 in conversation