Learning SAS? Welcome to the exclusive online community for all SAS learners.

ERROR: Library LIBSAS does not exist

Reply
New Contributor ik
New Contributor
Posts: 4

ERROR: Library LIBSAS does not exist

Hi There,

I am not quite sure whether this is the correct forum to put my question.

Working with SAS U Edition.

Currently learning about SAS Libraries using this tutorial: Accessing Data in SAS Libraries Tutorial | SAS Training

On the verge of defining own library as mentioned in the tutorial :

TutorialProgram.PNG

I am facing this error: Library LIBSAS does not exist.

Please suggest.

Thanks and Regards

K

SAS Super FREQ
Posts: 361

Re: ERROR: Library LIBSAS does not exist

The path in the example your using to learn is just an example. You'd want to substitute in the path to an actual existing directory.

You should create a directory somewhere, perhaps call it "libsas" in your Documents folder, and then put that actual, literal path in the quotation marks in your libname statement.

This will work! :-)

New Contributor ik
New Contributor
Posts: 4

Re: ERROR: Library LIBSAS does not exist

Hi Randy,

Thanks! That snippet was from the tutorial Smiley Happy  wasn't mine line of coding.

In the sas program on which I am working, I have mentioned the actual existing directory but still the error persists.

Thanks and Regards

Indu Khatri

Community Manager
Posts: 552

Re: ERROR: Library LIBSAS does not exist

You're in the right place. Thank you for using the SAS Analytics U Community!

SAS Super FREQ
Posts: 8,743

Re: ERROR: Library LIBSAS does not exist

Hi:

  In the Education tutorials, the LIBSAS libname is used to make all the tutorials have the same common data library. However, the LIBSAS data shown in the tutorials is not provided. It is our intention for you to practice with your own data or with data from our e-learning classes.

cynthia

New Contributor ik
New Contributor
Posts: 4

Re: ERROR: Library LIBSAS does not exist

Hi Cynthia,

With what you have mentioned, I am concluding that I should have a 1) Self created directory(Eg. Dir1) 2) Database(or tables) present in the Dir1 (Eg, Table1, Table2)

Something of this sort:

libname Dir1 "C:\Temp\Persona\VV\SASUniversityEdition\myfolders\Dir1";

data Dir1.Table1:

run;

proc print data=Dir1.Table1:

run;

Correct?

Thanks and Regards

K

SAS Super FREQ
Posts: 8,743

Re: ERROR: Library LIBSAS does not exist

Hi,

  As you have discovered, when you use the SAS University Edition, it is like using a box in a box in a box. Your computer is the outer box #1 and it holds a Virtual Machine player that is box #2 (either VMWare Player or Oracle Virtual Box), then the box #2 holds box #3, which is SAS in a Linux Virtual Machine. Box #1 and Box #3 don't talk to each other. But they both talk to Box #2. This is why you need to have one of these Virtual Machine "managers". What happens is that you cannot use your Box #1 physical path when you write code in Box #3. So you have to define your shared folder location in Box #2. Then, since Box #3 is a Linux box, you have to know how to translate your Windows physical path (usually a C: drive location) into a Linux location that Box #3 knows how to find (because Box #3 always asks Box #2 where the shared folder location is).

  For example, I might have these physical C: drive locations for my shared folder (one or the other):

c:\SASUniversityEdition\myfolders

or

c:\temp\SASUniversityEdition\myfolders

Either way, it doesn't matter what the "high level" part of the physical path is. Once I am writing code inside Box #3, the locations become:

/folders/myfolders

So, then if I make a subdirectory under the shared folder location called all_SASdata, then my physical path would be:

c:\SASUniversityEdition\myfolders\all_SASdata

or

c:\temp\SASUniversityEdition\myfolders\all_SASdata

But as long as I have defined the shared folder correctly and put the all_SASdata directory UNDER the shared folder location, then the LIBNAME to point to either location would be the same:

libname mydata '/folders/myfolders/all_SASdata';

Note how the "high level" piece of the path name becomes just /folders and the shared folder location becomes /myfolders. Also note that what I write in my code does NOT contain any Windows path reference or Windows slash at all. So that means a program to create a simple SAS dataset from SASHELP.CLASS (one of the 200 datasets automatically available with a SAS installation) would be:

data mydata.newclass;

  length status $50;

  set sashelp.class;

  if age le 14 then status = 'Under Age, Not Eligible for Discount';

  else if age ge 15 then status = 'New Driver, Eligible for Discount ';

run;

And then a few programs to explore and sort and display the data would be:

  

proc contents data=mydata.newclass;

  title 'Contents';

run;

proc sort data=mydata.newclass;

by status age;

run;

  

proc print data=mydata.newclass;

  title 'Names of Students by Status';

  by status;

  var name age sex height weight;

run;

title;

  So, in essence, your first step is making sure that you have defined your shared folder in the University Edition correctly. Then your second step is to run code to make sure that you can write to that location (like my DATA step program) and then use code to make sure you can read from that location (like my PROC CONTENTS or PROC PRINT).

cynthia

New Contributor ik
New Contributor
Posts: 4

Re: ERROR: Library LIBSAS does not exist

Hi All,

Thanks for your replies.

I came to know what is the error. While using SAS U Edition,  SAS® University Edition generates errors when local data is accessed.

Here is the reference of the SAS official page from where I found the description of the error:

53333 - SAS® University Edition generates errors when local data is accessed

Solution to this problem is using "\folders\userdefinedfolders".

Here detailed explanation could be found :

How do I create my own SAS library?

Cheers Smiley Happy

Thanks and Regards

K

Established User
Posts: 1

Re: ERROR: Library LIBSAS does not exist

Hi I am encountering the same problem. Unable to solve it. Could you help. What exactly did you do? Thanks

Ask a Question
Discussion stats
  • 8 replies
  • 2075 views
  • 3 likes
  • 5 in conversation