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
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.
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
@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.
yes i did.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.