BookmarkSubscribeRSS Feed
eric_heum
Calcite | Level 5

Hi, I recently moved to sas studio from sas 9.4

I tried to create library on sas studio, but it's not working...

 

 

LIBNAME SAS_DB;

 

Please help me to create library on sas stuio.

Is there any difference between sas studio and sas 9.4?

 

1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
SAS 9.4 is the version of SAS that is running on the SAS OnDemand servers. SAS Studio is the front-end interface that you use to write code and submit code to SAS on the server.

To define a library in SAS Studio, first, your data must be up on the server. You cannot create a library in SAS Studio that points to a location on your C: drive or on your local computer. So let's say, for example, that you open SAS Studio and you click on the Server Files and Folders pane on the left hand side of the SAS Studio screen. You should see your top node as your Files (Home) location. This is your /home folder where you have write access. The operating system path for that folder is typically something like:
/home/u12345678 (where u12345678 is YOUR real UserID instead of my fake example).

So now let's say you right click on the Files (Home) top node and you select New --> Folder and you make a new folder called mydata. Now, if you have an empty folder with no files in it. However, you can now right click on the mydata folder and choose the Upload option from the popup window so that you can upload data from your machine to your SAS OnDemand new folder.

So now, what if you upload a SAS file called class.sas7bdat into the mydata folder under your home folder. You can right click on the mydata folder and choose Properties to see the EXACT location that you need to use for your path. For example, if you did make a folder called mydata under the Files (Home) top node, then the path to the mydata folder would be:
/home/u12345678/mydata and so the LIBNAME statement to that location would be:
libname mylib '/home/u12345678/mydata';

Of course, every place where I have u12345678, you would need to be replacing that string with YOUR userID, which should be visible to you when you right click and choose Properties on a folder icon under the Server Files and Folders pane.

You can also upload other files, like CSV files or XLSX files into your folder on the server. In that case, you'd need to use slightly different syntax to point to the data, but that syntax would depend on the type of file you were trying to access.

I hope this gets you started on creating a LIBNAME after you upload some data to your account's /home folder.
Cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 723 views
  • 1 like
  • 2 in conversation