BookmarkSubscribeRSS Feed
CoolBreeze
Calcite | Level 5

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?

 

34 REPLIES 34
SASKiwi
PROC Star

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. 

CoolBreeze
Calcite | Level 5

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.

SASKiwi
PROC Star

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.  

Kurt_Bremser
Super User

@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
Fluorite | Level 6
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 !
Kurt_Bremser
Super User

@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.

elisa_s
Fluorite | Level 6
Yes thank you.

I'm not very familiar with neither shared network resource or winSCP. Still a little bit blurry for me 😞

When I look on the internet it seems that it's 2 differents software and it's quite complicated in my company to install new stuff. And the idea for me is not to move my local txt into the server (I can do it with fileZilla) but really to create like a "libname" on my local.

I was adviced to use fillename FTP but it didn't work so far.
Kurt_Bremser
Super User

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.

elisa_s
Fluorite | Level 6
Thank you ! Much clearer.

I will see with my IT for option 4.
MaryA_Marion
Lapis Lazuli | Level 10
A server configuration change. As a student and the administrator for my desktop, how do I go about that? Are you referring to something like dropbox?
Mary A. Marion
Cynthia_sas
SAS Super FREQ

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

MaryA_Marion
Lapis Lazuli | Level 10

Thanks. I have been struggling with this ever since I stopped using University SAS.

Sincerely,

Mary A. Marion

blueskyxyz
Lapis Lazuli | Level 10

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.

 

 

Capture.PNG

 

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?

Capture1.PNG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 34 replies
  • 17518 views
  • 8 likes
  • 12 in conversation