Using SAS Stuido (9.4) to write and execute code on a remote LINUX server. I have jobs that need to import or export files from/to my PC. I am begining to think that this is not a built in capability with SAS Studio? With BASE SAS, I could simply do a proc import/export then proc upload/download. Not so with SAS Studio? If not, can someone explain why SAS would not allow that capability on SAS Studio?
The problem is you are comparing SAS installed on a PC with the exclusively server-based interface of SAS Studio. With SAS Studio your PC simply becomes a viewer of SAS running on a server so there is no connection to your PC's hard drive.
A common solution in this situation is to create a network folder share that is readable by both the SAS server and your PC. Then you can simply drop the files to be loaded into this folder where SAS can read them. You would reference this folder like this: //ServerName/Folder1/Folder2. I suggest you talk to your SAS administrator as this is going to require a server configuration change.
Thank you for taking the time to respond. One quick follow-up ... The SAS Studio GUI actually provides a way to manually import PC files. So it can see the PC files if I opt to import them manually. But to do a proc import is not possible. Shouldn't they be able to allow the proc to do it if the GUI can?
I will talk to our SAS admin about your suggested solution. That makes sense.
In Enterprise Guide there is a similar manual task for uploading and downloading SAS data. The point being that once you move from SAS on a PC to a server-based thin client SAS interface like EG or SAS Studio you lose the ability to programmatically access PC data from SAS. There are many positives to thin client interfaces, but there are some restrictions too.
@CoolBreeze wrote:
Thank you for taking the time to respond. One quick follow-up ... The SAS Studio GUI actually provides a way to manually import PC files. So it can see the PC files if I opt to import them manually. But to do a proc import is not possible. Shouldn't they be able to allow the proc to do it if the GUI can?
I will talk to our SAS admin about your suggested solution. That makes sense.
Actually, it is not the SAS GUI per se that sees your local data, it is the web browser that provides this capability through javascript or a Java sandbox.
When you import PC files via SAS Studio, the web browser is used to read the PC data, the Java applet converts to text (if necessary) which is then copied to a temporary location on the server, where then (and only then) the workspace server (the SAS process itself) starts to read.
A proc import on its own needs someone else to move the data to the SAS server. That "someone else" is either the SAS Studio web app and it's PC parts (javascript, Java applet), or it is you. If you want to use proc import (or a data step) in manually created code, you need to provide for the data transfer yourself. You can use a shared network resource, or you can use a smiple SSH-based tool like WinSCP.
@elisa_s wrote:
Hi,
I'm having the same questions as QuickBreeze.
I have to import file from my local computer into SAS Studio but automatically. So the manually way won't be usefull.
I understand that when you are on SAS Studio you're directly on the server. But I would like to know a way to create a "path" between my server and my local.
I don't have the SAS Studio University version so I can't create a Shared folder;
Is there a way to create one even with the SAS Studio mid_tier version ? or another way to use easilly proc import/export ?
Thank you in advance !
Read my last post thoroughly. The answer is still valid.
Let's elaborate:
Your file sits on your local PC
The SAS process (which is executing on a server) needs to "see" that file.
Option 1: copy the file to the SAS server. This involves software like FileZilla or WinSCP, which might be scriptable. The necessary server processes for the needed SSH protocol are usually available on servers out of the box.
Option 2: filename FTP. This means that you somehow must make your PC a FTP server, more complicated than option 1. And you can only read text files with that.
Option 3: Make your SAS server a file server, and mount the exported directory on your PC (mounting is done with Windows Explorer). Needs configuration and possibly installation of software on the SAS server. After that you save to that location from your PC apps.
Option 4: Have a resource on a file server in your company, which you can access from your PC (something like a H:\ drive), mounted on the SAS server. You save to that location from your PC apps, and read from that location with SAS.
Be aware of the different file/pathname syntax if the SAS server runs on any UNIX flavor.
Hi: From your screen shot in this post: https://communities.sas.com/t5/SAS-Studio/how-to-configure-a-directory-shortcut-to-an-external-direc... it shows that you are using SAS OnDemand for Academics on our cloud server. You cannot directly access files on your machine or make shortcuts to your machine when you are using SAS Studio with SAS OnDemand for Academics. The OnDemand Dashboard that you use to get you logged into SAS Studio will ONLY take you to the SAS OnDemand server. On that server, you ONLY have access to SAS OnDemand server files. Under your Files (Home) top folder, you can make new folders and you can upload your local files to the server so you can work with them. The Folder Shortcut icon that you see in SAS Studio does not allow you to make a shortcut to your local files on your local machine. In your other posting, I have provided an example of a folder that you CAN make a shortcut to. However, that folder is also stored up on the SAS OnDemand server.
Hope this helps explain that you cannot access your local files directly with SAS Studio and SAS OnDemand for Academics.
Cynthia
Thanks. I have been struggling with this ever since I stopped using University SAS.
Sincerely,
Mary A. Marion
I also have the same problem using SAS stuido with this website https://welcome.oda.sas.com/
which can't access the local files on your pc, unless upload your local files.
but the teacher in the sas online training class can access the local disk as below, it is possible that the server connects to his pc, so how to set the environment?
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!
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.
Ready to level-up your skills? Choose your own adventure.