Help using Base SAS procedures

pc files server

Reply
Super Contributor
Super Contributor
Posts: 440

pc files server

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

 

 

Super Contributor
Posts: 408

Re: pc files server

[ Edited ]

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.

 

 

Super Contributor
Super Contributor
Posts: 440

Re: pc files server

Thanks Jan

i did the  ping test and  it never stopped  pinging Smiley Happy

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 ?

Super Contributor
Posts: 408

Re: pc files server

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.

Respected Advisor
Posts: 3,124

Re: pc files server

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

Super Contributor
Super Contributor
Posts: 440

Re: pc files server

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

thank you

Super Contributor
Super Contributor
Posts: 440

Re: pc files server

[ Edited ]

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

Respected Advisor
Posts: 3,124

Re: pc files server

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.

Super Contributor
Posts: 408

Re: pc files server

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='****';
Super Contributor
Super Contributor
Posts: 440

Re: pc files server

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 Smiley Sad

Respected Advisor
Posts: 3,124

Re: pc files server

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?

Super Contributor
Super Contributor
Posts: 440

Re: pc files server

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?

Respected Advisor
Posts: 3,124

Re: pc files server

[ Edited ]

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.

Super Contributor
Super Contributor
Posts: 440

Re: pc files server

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

Super User
Super User
Posts: 6,500

Re: pc files server

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?

 

Ask a Question
Discussion stats
  • 23 replies
  • 353 views
  • 0 likes
  • 5 in conversation