BookmarkSubscribeRSS Feed
mariopellegrini
Pyrite | Level 9

Goodmorning everyone.
I'm new to SAS Viya, maybe I ask a trivial thing but I can't find a solution.
I would simply like to upload a sas dataset from my pc locally.
In this video:
https://video.sas.com/detail/video/5334369476001/understanding-caslibs-and-loading-data-in-sas%C2%AE...
a sas library is set up very simply like this:

libname orion "c\mydata";

However from sas viya if I set up a library by putting a local path I get the answer that the library does not exist:

viya.jpg

5 REPLIES 5
Vince_SAS
Rhodochrosite | Level 12

The SAS executable is running on a server machine, not your local machine.

 

The LIBNAME statement referencing the path on your local machine fails because the server machine does not have access to your local machine.

 

Vince DelGobbo

SAS R&D

mario_pelleg
Fluorite | Level 6

Ok Vince_sas. however, Since it is possible to upload files locally through the following procedure, I thought it was also possible to do it from sas code. Is it possible?

 

viya.jpg

Vince_SAS
Rhodochrosite | Level 12

Are you presented with a Windows Open File dialog box during the import process?  The Open File dialog box is able to navigate the file system on your local machine and then transfer the file to the server.

 

If your IT department hasn't provided you a way to access your local machine from the SAS Viya server machine, then there is no code SAS code that you can write to access the local file, except possibly the URL or FTP FILENAME access methods (or PROC HTTP).

 

Vince DelGobbo

SAS R&D

mario_pelleg
Fluorite | Level 6

mario_pelleg_1-1593157477873.png

My question at this point is:
what is the correct way to load a sas table present locally, on cas lib?

 

Vince_SAS
Rhodochrosite | Level 12

SAS Studio in the video is accessing C:\, but it is C:\ on the server machine, not the local machine.  One can deduce that the server is running on the Windows operating system.  The code would fail if the server were running on a UNIX operating system.

 

You can use the visual interface to load data from your local machine.  If you want to use code to load the data, then you need to move the data to the server machine, or contact your IT department to see what options they can provide to map a network drive that is accessible to the server machine.

 

Vince DelGobbo

SAS R&D

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Discussion stats
  • 5 replies
  • 2980 views
  • 3 likes
  • 3 in conversation