I suggest to use a shared network resource that is accessible both from your client and the SAS server.
Copying from a SAS program on the server directly to your PC requires that your PC is up and running all the time, and running file transfer server software, something which is usually not appreciated by IT people.
If you want to share a SAS dataset, you just define a library (LIBNAME) to the shared location and use it to create the dataset.
if you want to share the output of a procedure, use the appropriate path to the shared resource in the respective ODS statement.
Similarly, you can use the path to the shared resource in FILENAME or FILE statements when exporting to external files, or in the OUTFILE= option of the PROC EXPORT statement.
The most important part is that the shared resource has to be available on the SAS server. If that is a Windows system, the UNC path should work, if it is Linux/UNIX, you need the shared resource mounted on the server.
Before we start tinkering with SAS code, we need to make sure that the shared resource is available on the server. Log on to it with your SAS userid using any kind of SSH client, and see if you can navigate there; if you have trouble with this, get in touch with your server admins.
What happens if you define a libname to the path? Please share the complete log from the libname statement; use this icon to post the log:
What does "so I can automate it to SMC" mean? Why do you need to copy a SAS dataset to your local PC? If your Windows(?) SAS server storage is accessible via file shares it could be as simple as going into Windows Explorer and doing a copy and paste.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.