Desktop productivity for business analysts and programmers

sas code

Reply
Contributor Go
Contributor
Posts: 53

sas code

I need to move/copy a csv file from server to desktop(local pc) with sas code, can i have sas code to do this ?

 

(generally for one time thing i just use winscp to drag and drop, but now i need code)

 

 

Regular Contributor
Posts: 154

Re: sas code

There's a post on the SAS blogs about this. Does that help?

Contributor Go
Contributor
Posts: 53

Re: sas code

Hi,
Thanks for the response
That doesn't help actually, I am just looking for a one line or two lines of code like ftp/scp maybe....!

x scp /uhome/gnayaki/test.txt psasmeta01:/uhome/gnayaki; --> this will send the testfile from one server to another server

?? --> need code to send the file form server to local PC
Respected Advisor
Posts: 3,060

Re: sas code

Unless your SAS server can "see" your local PC drive, that is there is a network share available on the SAS server that points to your local drive then a SAS server code solution isn't possible and that includes @paulkaefer's suggestion.

 

I'm not familiar with WINSCP but I suspect its doing things the other way around - it "see's" your server drive from your PC. With EG there is normally no local SAS to be able to do something similar. Please advise if you also have local SAS on your PC as that may be an option.  

Esteemed Advisor
Posts: 5,194

Re: sas code

You can use any os command using the X statement as long your OS environment allows you. So this is not really a SAS question.
Data never sleeps
Esteemed Advisor
Posts: 6,640

Re: sas code

If said SAS code needs to run on a server, you need to have a FTP/SSH daemon (service) running on your local PC. Then you can use the usual suspects on the server to connect to your local PC.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 5 replies
  • 324 views
  • 2 likes
  • 5 in conversation