Hi all,
I am trying to connect SAS to a linux box that holds particular files/ data.
1) How can this be done?
2) What type of access do I need?
I'd imagine coding a macro in enterprise guide highlighting all the connection information will do the job.
Please advise.
Thank You in advance.
Hi all,
I am trying to connect SAS to a linux box that holds particular files/ data.
1) How can this be done?
2) What type of access do I need?
I'd imagine coding a macro in enterprise guide highlighting all the connection information will do the job.
Please advise.
Thank You in advance.
Hi Reeza,
We are running EG on the server, and do have admin access.
We have access to the Linux server via SSH.
How will the connection be made through EG? Code based solution?
Thanks Reeza.
To clarify; I want to connect SAS to a Linux box. That Linux box holds certain data files that I would like to take a read into SAS.
Hope that helps.
What do you mean by "connect SAS"?
Are you running SAS on one linux machine and you want the SAS programs to be able to read the files from a different linux machine?
Might be easiest to ask your linux administrators to mount the disks onto the machine(s) where SAS is running so you can just treat them as local files.
NOTE that the FILENAME statement can link to different machines using a number of protocols. FTP, SFTP, HTTP, etc.
You could also potentially call system commands from your SAS program to copy the files to your local machine.
Is the remote machine also running SAS? Do you has SAS/Share licensed on that machine? If so you could share out SAS dataset via SAS/Share.
Thank you for the response Tom!
So to clarify a bit more.
I am trying to use SAS to connect to an "outside" Linux box. That Linux box has files that I want to "read into" my SAS environment.
They are simple data drop files.
This I believe will be the easiest way for me to bring in the data from the Linux boxes to use for reporting in SAS.
Since the Linux box has SSH installed and running, you can use filename sftp.
Mind that you need to set up passwordless authentication with a public/private keypair before you can use this.
Hi Kurt,
Thank you so much for your response.
Where will the passwords need to be set up? And what will the passwords be for?
You do not use passwords with SAS filename sftp. Instead you first establish public/private key authentication for your user (the one used to run the SAS session) from the commandline. The goal is to make
sftp user@host
work without being prompted for a password.
Thanks Reeza. I got in touch with the help desk folks.
They suggested created a LIBNAME and getting permissions to the box, then making the connection happen.
Or create a library in the metadata server.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.