10-16-2017 02:43 AM
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"
I really appreciate your help to make this work.
10-16-2017 03:02 AM
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
10-16-2017 03:37 AM
10-16-2017 04:06 AM
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.
10-17-2017 01:59 AM
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.
10-17-2017 03:18 AM
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.
10-16-2017 03:29 AM
Is that comma really there at the start of your path?
Which environment does your SAS server use (UNIX or Windows)?
10-16-2017 07:10 PM
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=;
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
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
SYMBOLGEN: Macro variable ACCESSIBLE resolves to NOACCESSIBLE
14 Proc Import DATAFILE="//bqlpnas01/hodata/AssetMnmt/Testdata.xls"
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
22 %LET _CLIENTTASKLABEL=;
23 %LET _EGTASKLABEL=;
24 %LET _CLIENTPROJECTNAME=;
25 %LET _SASPROGRAMFILE=;
28 ODS _ALL_ CLOSE;
31 QUIT; RUN;