BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
s_m
Obsidian | Level 7 s_m
Obsidian | Level 7

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
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

View solution in original post

9 REPLIES 9
Yavuz
Quartz | Level 8
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
s_m
Obsidian | Level 7 s_m
Obsidian | Level 7

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

 

Reeza
Super User

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

Reeza
Super User

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. 

s_m
Obsidian | Level 7 s_m
Obsidian | Level 7

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
Reeza
Super User

Did the solution suggested not work?

s_m
Obsidian | Level 7 s_m
Obsidian | Level 7

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

kaverisonu1
Fluorite | Level 6

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.

 

s_m
Obsidian | Level 7 s_m
Obsidian | Level 7

thanks a lot Kaverisonu for your help.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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