How to request SAS from R via SSH

I would like to query the SAS database from R and return the data to R, and I need to connect to the SAS database via SSH. How do i get started?

+5
source share
1 answer

To do this using ssh, you can try to run a remote command that will "translate" the results (that is, send them to stdout) back to the ssh client. Ask R to directly capture these results or transfer them to a file using the OS, and then import them into R.

If SAS is running on the remote computer, this should be easier, since you can just run sas and tell it to print the results to standard output.

So your command will look something like this:

C:\Progra~1\ICW\bin\ssh.exe servername -l username -i c:\id_rsa " sas -sysin myquery.sas " > results.txt

sas sas myquery.sas. stdout, . result.txt, R.

, R, R- . - / .

+1

All Articles