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
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.
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.