ERROR: Library does not exist

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 112
Accepted Solution

ERROR: Library does not exist

%let dirdata=C:\Users\jc3992\MySASData\Week4;
libname WEEK4 "&dirdata";
run;

Hello everyone,

 

Sorry I have used SAS Studio for months and now changed to SAS 9.2

thus I am not familiar with basic things

The code is as above

and the LOG showed:

25   %let dirdata=/folders/myfolders/WEEK 4/;
26   LIBNAME week4 '/folders/myfolders/WEEK 4';
NOTE: Library WEEK4 does not exist.
27   RUN;

Can anyone help me with setting up the library so I can move on?

Thank you very much for reading and any help

 

 


Accepted Solutions
Solution
‎03-03-2018 01:26 PM
Super User
Posts: 9,300

Re: ERROR: Library does not exist

The first line of the log does not match the first line of the code. Please correct that, and show the real log for your code.

Where is your ancient SAS running? On your Windows desktop or a (UNIX?) server?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Super User
Posts: 22,495

Re: ERROR: Library does not exist

SAS 9.2 wouldn't use shared folders. 

 

Are you sure you're using 9.2? That's about a decade old.

 

And the log doesn't match the code so it's hard to say what the issue is.

Frequent Contributor
Posts: 112

Re: ERROR: Library does not exist

I have no idea either.

I used SAS Studio because I am a MAC user.

and because many data sets our instructor asked us to do with cannot easily looked through in SAS Studio

I changed to SAS Window version yeaterday.

I am using computers in our school >"<

 

I succeeded by this code

%let dirdata=C:\Users\jc3992\My SAS Data;
libname Test "&dirdata";
run;

I thought my problem is I set a new library by right clicking "Libraries" in Exploere

and actually I do not need to set up a libname "Dirdata"

it can be any libname which I would like to create with a code and the file would appear in the folder "Libraries"

and I just define a path as "dirdata" and create a libname in this path.

That was what my understanding.

 

sometimes after one or two sleeps

I forget about this and start all over again lol

 

Super User
Posts: 22,495

Re: ERROR: Library does not exist

The dirData macro variable step is unnecessary. 

 

To create a libname put the path into the libname statement. 

 

libname myLib 'C:\_localdata\sas\reeza\';
Solution
‎03-03-2018 01:26 PM
Super User
Posts: 9,300

Re: ERROR: Library does not exist

The first line of the log does not match the first line of the code. Please correct that, and show the real log for your code.

Where is your ancient SAS running? On your Windows desktop or a (UNIX?) server?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 216 views
  • 2 likes
  • 3 in conversation