As subject,
With SAS EG, I am accessed to two server, first is SASapp which is connected to a database that I can read data, and calculate it.
After I finish the work, I want to use that data table at second server (Local server), but I can not get the data table when I switch to the local server. The only way now is export the data table from SASapp server to my desktop. Then, switch to local server and import the data.
I would like to ask that is there any solution that I can copy the data table from SASapp server to Local server work lib (or any other lib I can create) by code. If so, I don't need to export data then import it.
Thank you guys, my poor English may make my article be difficult to understand.
You can use the Copy Files task to copy the .sas7bdat file to your desktop.
Thanks for the reply, if there is any other way that I do not need to export the file to my desktop?
@Harveyyang1 wrote:
Thanks for the reply, if there is any other way that I do not need to export the file to my desktop?
If both your desktop and server SAS have SAS/CONNECT licensed, you could use that.
Or you can (if XCMD is set) use any external (s)ftp utility to copy files.
Or you define a network share on the directory of your server library, so you can mount it on your desktop and define a similar libref there.
Actually, there is a special task for this. It's the Download Data Set from Server task, in the Tasks->Data area (or use task browser to search "Download". It will copy any data set (even from a database) and download into a local SAS7BDAT file. You can then assign a library in your Local server to read it.
There is an Upload Data Set from PC task too, which copies a SAS7BDAT file from your PC to any library on your remote server.
Chris
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.