BookmarkSubscribeRSS Feed
vinayemmadi
Calcite | Level 5

Hi All,

I have a program running in UNIX environment I need to export data set directly into windows environment in form of text file with that using WINscp automatically is there any way?

Thanks

Vinay Emmadi

2 REPLIES 2
SASKiwi
PROC Star

I've never used WINscp but a brief Google search tells me that it is a Windows-only FTP tool so it won't work on Unix.

However I understand that FTP is available in pretty much all flavours of Unix, so you could simply use SAS's FILENAME FTP option to send text files to a Windows server/PC.

The Windows server would have to be "known" by your Unix server. For example from Unix can you PING (ping MyWindowsServerAddress or ping 111.222.333 - ) your Windows server using the IP address. 


Kurt_Bremser
Super User

Assuming that SAS is only available on UNIX, you can do that with Enterprise Guide (File - Export).

Another way is to do the export with a data _null_; step and file '$HOME/somefilename.txt';. You do all the formatting needed in the put statement(s). Then you transfer with WinSCP, which allows you to use SFTP/SSH; most UNIXen today do not run simple FTP anymore, for security reasons. With .txt, WinSCP will do the necessary character code conversions for you.

SASKiwi's method may not work for lack of a FTP server in Windows.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1788 views
  • 0 likes
  • 3 in conversation