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
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 🙂
Kind regards,
Juan
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.
Thanks Kurt. Do you know how I could verify my USERID on the SAS Server without having to call up the Technology Team?
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.
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.
Is that comma really there at the start of your path?
Which environment does your SAS server use (UNIX or Windows)?
Please show the log of the exact code run, i.e. without the "," preceeding.
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.