Network drives are not recognized by the SAS® PC File Server when the server is installed as a service


When you import network files with the SAS PC File Server, you might receive the following error:

ERROR: CLI error trying to establish connection: [Microsoft] [ODBC Excel Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. 
ERROR: Error in the LIBNAME statement. Connection Failed. See log for details.

This problem occurs when the SAS PC File Server is installed as a service and the path specified for either the DATAFILE= option or the OUTFILE= option is a named network drive, as shown in the following example:

proc import dbms=excelcs out=temp1
datafile='j:\sastest\sam64.xls' replace;
port=8621;
server='your-server.com';
sheet='one';
run;
 
proc export dbms=excelcs data=temp1
outfile='j:\sastest\sam64.xls' replace;
port=8621;
server='your-server.com';
sheet='one';
run;

The problem occurs because network drives are mapped at when a users logs on, and services do not recognize these mapped drives. To circumvent the problem, do one of the following:

  1. Specify the Universal Naming Convention in either the DATAFILE= option or the OUTFILE= option, both of which include the server name in the path, as shown in this example:
    proc import dbms=excelcs out=temp1
    datafile='\\my-server\sastest\sam64.xls' replace;
    port=8621;
    server='your-server.com';
    sheet='one';
    run;

    proc export dbms=excelcs data=temp1
    outfile='\\my-server\sastest\sam64.xls' replace;
    port=8621;
    server='your-server.com';
    sheet='one';
    run;

  2. Start the SAS PC File Server manually.

The server should now recognize network paths because the drives have been mapped prior to restarting the SAS PC File Server.