DATA Step, Macro, Functions and more

library does not exist

Accepted Solution Solved
Reply
Contributor s_m
Contributor
Posts: 22
Accepted Solution

library does not exist

libname libsas "folders/myshortcuts/s2/";
data libsas.account;
account_id = 00001;
firtname ='John';
lastname ='Liu';
run;

 

ERROR: Library LIBSAS does not exist.

 

 

 

Please help me with code,I am a beginner and this library thing is becoming a trouble for me.

I have attached the sceenshot of log as well.


error_screenshot.png

Accepted Solutions
Solution
‎03-31-2017 02:30 AM
Super User
Posts: 17,767

Re: library does not exist

The path is incorrect, the / in front of folders is missing. 

View solution in original post


All Replies
Contributor
Posts: 43

Re: library does not exist

1.) Please write full path. Like
Libname mylib "D:\mydata";

2.) If account_id is string it must be like "00001"

3.) Are you working on Sas base or sas EG,
If sas Eg server maybe you have an authorization problem
Contributor s_m
Contributor
Posts: 22

Re: library does not exist

thanks for your help

but actually i have defined s2 in shared folder so it is coming under my shortcuts in sas studio so i can refer it as /folders/myshortcuts/s2.So please help me out what went wrong

 

Solution
‎03-31-2017 02:30 AM
Super User
Posts: 17,767

Re: library does not exist

The path is incorrect, the / in front of folders is missing. 

Super User
Posts: 17,767

Re: library does not exist

Are you using an English browser? 

I think something may be wrong earlier and carrying over. 

 

Can you start a new session, restart your VM and run only the code shown. 

Contributor s_m
Contributor
Posts: 22

Re: library does not exist

[ Edited ]

I am using SAS Studio (SAS University Edition)

I started the new session but error is still the same.

I am unable to assign a libref through libname statement.

 

libname libsas "/folders/myshortcuts/s2/";
data work.out;
set libsas.abc;

run;

 

ERROR:

File LIBSAS.ABC.DATA does not exist

 

abc.xlsx data is physical present under S2 and is visible in myshorts in sas studio.Please refe the screenshot attached.

 

Please help me ith this.

.

 


error_screenshot2.png
Super User
Posts: 17,767

Re: library does not exist

Did the solution suggested not work?

Contributor s_m
Contributor
Posts: 22

Re: library does not exist

Thanks Reeza it worked but I am facing another issue which I have already described in previous reply.Please help me on that.

Thanks in advance

Occasional Contributor
Posts: 7

Re: library does not exist

You cannot use excel file directly as a dataset. You need to first import teh excel file using proc import as below.

 

proc import datafile= "<path>"  out=<dataset name in sas>

sheet ="<sheetname if specific sheet needs to be imported>" ;

run;

 

post this you acn use your dataset.

Another way would be using DDE in sas.

 

Contributor s_m
Contributor
Posts: 22

Re: library does not exist

thanks a lot Kaverisonu for your help.

☑ This topic is SOLVED.

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

Discussion stats
  • 9 replies
  • 633 views
  • 1 like
  • 4 in conversation