BookmarkSubscribeRSS Feed
bikashten
Fluorite | Level 6

Hello,

I was trying to use the pc file server in my work laptop, but it popped up this error. I have 64 bit sas and 32 bit MS excel. 

 

ERROR: A socket routine returned error: The connection has timed out.
ERROR: Unable to connect to server.
ERROR: Error in the LIBNAME statement.

 

This error is different than the error I have seen in the SAS like

 A socket routine returned error: The connection was refused.

I have no clue. I think it look like it is server issue. My friends have an exact same code via pc file server to export excel, it's working. For me, it's not working. Kinda weired. I appreciate your time. 

 

Sincerely,

Bikash 

6 REPLIES 6
ballardw
Super User

If you are attempting to connect to a remote server of any type that sort of error is likely. Timeout can be a number of things including just plain network failure to connect.

 

Refused often means that there may be a user/password issue (check your connection settings and parameters) or permissions (you don't have one you are attempting to use on the server).

 

The SAS LIbname will attempt to have read and write permissions. If you don't have write permissions that could be an issue. Try creating the library as a readonly library.

 

Or you may be hitting some security issue such as attempting to use the a restricted port.

 

You might try sharing the code of your libname statement with any sensitive strings like user or password XXXXXed out to show us all of the options you might be using.

bikashten
Fluorite | Level 6

Hi Ballardw,

I do have read/run/write permission in the server. In the SAS Base, I do not have an issue becuase SAS base is only connected to local machine. But, In the enterprise guide, I have this issue. The sample code is as follows:

 

data testdata;
input name $ ssn;
datalines;
test 1111
test2 1112
test3 1113
;


libname myxls
pcfiles
path="C:\Users\BBhandari2\Desktop\pcfile_test\enterprise_demo.xlsx"
server="RPG15.rbcint.com"
scan_text=no

port=9621;

proc sql;
create table myxls.test as
select *
from testdata;
quit;

libname myxls clear;

 

Thank you,

Bikash

ballardw
Super User

@bikashten wrote:

Hi Ballardw,

I do have read/run/write permission in the server. In the SAS Base, I do not have an issue becuase SAS base is only connected to local machine. But, In the enterprise guide, I have this issue. The sample code is as follows:

 


libname myxls
pcfiles
path="C:\Users\BBhandari2\Desktop\pcfile_test\enterprise_demo.xlsx"
server="RPG15.rbcint.com"
scan_text=no

port=9621;

 

 


I have to assume that you have verified that the SERVER has that path. I find that "Desktop" as part of the path on a server to be a tad suspicious or at least out of typical for a server. Generally I would assume that path like "C:\Users\BBhandari2\Desktop\" points to the local machine as Server settings tend to point to other mount points. 

 

Reeza
Super User
It's EG running locally.
Reeza
Super User
Did you make sure you started the pc file server?
bikashten
Fluorite | Level 6

yes i did.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1483 views
  • 0 likes
  • 3 in conversation