BookmarkSubscribeRSS Feed
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

hi,

so i  just  got pc files server  installed and  i read many articles saying one should be able to access pc files from unix sas .

I  have  SAS 64bit and Ofifce 32 bit

 

i tried my code on pc sas first and it worked:

 

PROC IMPORT DATATABLE=SLOCCov DBMS=ACCESSCS OUT=TEMP1 REPLACE;;

DATABASE="Y:\xx\yyy\zzz.accdb";

DBDSOPTS='READBUFF=30';

RUN;

 

 

but then when i ran it on EG SAS(Remote) i got an error

 

PROC IMPORT DATATABLE=SLOCCov DBMS=ACCESSCS OUT=TEMP1 REPLACE;;

DATABASE="Y:\xx\yyy\zzz.accdb";

PORT=9261;

SERVER="xyz.abc.com";

DBDSOPTS='READBUFF=30';

RUN;

 

ERROR: A socket routine returned error: The connection was refused.

ERROR: Failed to connect to the Server: *******.com.

 

1. Can i really import pc files into UNIX SAS?

2.Name of server  will be my computer name right?

3. Any insights on this error please

thx

 

 

23 REPLIES 23
jklaverstijn
Rhodochrosite | Level 12

Hi @Tal,

 

1) yes you can.

2) The name of the server should be the name of the server running the pc files server. On that server it will listen to the configured port, in your case 9261.

3) I would start with validating the network connectivity:

 

* Are server name and port correct?

* Is there basic network connectivity between the two (they may be on different networks). Use the ping command on the Linux machine to test that.

 

ping xyz.abc.com

* Use telnet (if availble) on the Linux host to determine if you can reach the port on the pc files server

 

ftp xyz.abc.com 9261

* If these tests do not indicate a working connection, there may be a firewall on either machines or en route that may block your traffic. Discuss with your network staff.

 

Only if this checks out (which I think it will not do), you can look into the SAS side of things.

 

Let us know how you fare.

 

Kind regards,

- Jan.

 

 

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

Thanks Jan

i did the  ping test and  it never stopped  pinging 🙂

i did the  telnet test and  connection to 6291 was refused but i could reach 6921 and i someone  mentioned i should use this port   so still a  possible firewall  issue ?

jklaverstijn
Rhodochrosite | Level 12

If I'm not mistaken the Linux should not need access to the path. It is validated and accessed on the Windows server. On that server it should be a valid path, either by drive letter or UNC.

 

You mentioned port to 9261 in your initial post. Make sure you use the one that the pc files server is configured to listen to. If telnet gives a "connection refused" your best bet would be the firewall.

Haikuo
Onyx | Level 15

DATABASE="Y:\xx\yyy\zzz.accdb";

 

Y (if pointing to a network share) seems to be a drive letter validated only by your PC. Try to use universal network address instead, such as \\share\blah\xx\yyy\zzz.accdb

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

hey Haikuo  yes  i changed the map to  reflect the  absolute path not the  path UNIX cannt  recognize

thank you

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

so  i changed  the path and also added the credentials i use to log into windows and changed the port to 9621 as advised by some of the  guys in different  depts  who  has used it

 

 

PROC IMPORT OUT= TEMP DATAFILE= "\\aaa\vv\bbb\tt\ccc\dd\Book1.xlsx" DBMS=EXCELCS REPLACE;

PORT=9621;

SERVER="xyz.abc.com";

SHEET='Sheet1';

SERVERUSER='domain\userid';

SERVERPASS='****';

RUN;

 

and  the error :

 

ERROR: Server is unable to authenticate user credentials. (missing or invalid SERVERUSER='<domain\username>';

SERVERPASS='<password>'; enclosed in quotes).

 

 

so looks like i dont have the   right SERVER's name above  huh?

 

ps.this is an excel file import as oopose the access i initially  had  posted

Haikuo
Onyx | Level 15

Make sure 'domain\userid' has the write access to "\\aaa\vv\bbb\tt\ccc\dd". You may need check with your network folks who manage the active domain.

jklaverstijn
Rhodochrosite | Level 12
Maybe it indicates you Do have the correct server. Otherwise I would expect different more basic errors. Just maybe this messages tells us like it is?

And what happens if you try the pcfiles libname engine?:

LIBNAME myxlsx PCFILES SERVER="xyz.abc.com" PATH='\\aaa\vv\bbb\tt\ccc\dd\Book1.xlsx' SERVERUSER='domain\userid' SERVERPASS='****';
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

hello

@Haikuo  i do have  read/write access to that drive

"Special Permisisons "  is checked under  "Permissions"  but i can save,delete,read   in  this folder

 

@Jan 

 

9621  is the  right port  i checked that and it connects

 

ftp "Txyz.abc.com" 9621

Connected to xyz.abc.com.

 

i did the  ping test again and  it never stops

 

64 bytes from ****: icmp_seq=4 ttl=121 time=7 ms
64 bytes from ****: icmp_seq=5 ttl=121 time=6 ms
64 bytes from ****: icmp_seq=6 ttl=121 time=6 ms

............................

..............................

 

i ran these again:

 

PROC IMPORT OUT= TEMP DATAFILE= "\\aaa\vv\bbb\tt\ccc\dd\Book1.xlsx" DBMS=EXCELCS REPLACE;
PORT=9621;
SERVER="xyz.abc.com";
SHEET='Sheet1';
SERVERUSER='domain\userid';
SERVERPASS='******';
RUN;

 

ERROR: Server is unable to authenticate user credentials. (missing or invalid SERVERUSER='<domain\username>';  SERVERPASS='<password>'; enclosed in quotes).

 


 libname mylib  pcfiles 
 path="\\aaa\vv\bbb\tt\ccc\dd\Book1.xlsx"
 server="xyz.abc.com";
 port=9621
 SERVERUSER='domain\userid'
 SERVERPASS='*****';

 

ERROR: Server is unable to authenticate user credentials. (missing or invalid SERVERUSER=<username> SERVERPASS=<password> on        libname statement).

 

I am clueless 😞

Haikuo
Onyx | Level 15

ERROR: Server is unable to authenticate user credentials. (missing or invalid SERVERUSER='<domain\username>';  SERVERPASS='<password>'; enclosed in quotes).

 

This shows your credential is not accepted by the server "xyz.abc.com, the one runs SAS pcfiles server. Do you have a SAS admin  managing your permission?

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

trying to find  out  if the server's name  i  have specified in the  code here matches the server's name the pc files server is installed on.

i am using my  computer's name a sa  server name

 

managing my permission as in not able to access remote  servers or something like it?

Haikuo
Onyx | Level 15

Are you saying you are using your PC as remote server running SAS pcfiles server? In that case, you need to make sure you have permisson to remote into your own PC. Yes, it sounds wierd, but local permission to your PC does NOT grant your remote permission to the same box automatically. You will need network security folks to fix that. At least, you will need to have admin access to your own pc to make some changes.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

yes, i am running EG SAS Remote to access files from  my  network drives and  import them into  UNIX.

i thought

SERVERUSER='domain\userid'

SERVERPASS='****'; 

is how i access my laptop from the unix sas sever,no?

The credential above is my  windows login

Tom
Super User Tom
Super User

So you are running PC Files server on your laptop?

Does EG connect to SAS running on your PC also?  Or to some other machine?  Is that machine running Windows or Unix?

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 23 replies
  • 5916 views
  • 0 likes
  • 5 in conversation