SAS Studio

Write and run SAS programs in your web browser
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
a13
Calcite | Level 5 a13
Calcite | Level 5

I am getting the errors mentioned in the screenshots while writing the program. I am using the SAS Studio via Oracle VM Virtual Box, so I don't have the path available for specifying the libname, I'm exporting the Cars table into my folders and then using that path. Please help me on how to specify the path.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisBrooks
Ammonite | Level 13

You are including a file name (cars.dta) in your libname statement when it should only contain a folder name. If you change your libname statement to:

 

libname libsas '/folders/myfolders';

Your code will work

View solution in original post

4 REPLIES 4
andreas_lds
Jade | Level 19

Please post the log using {i}-icon.

a13
Calcite | Level 5 a13
Calcite | Level 5
 
 
LOGS:
 
OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73
74 /* %let dirdata="/folders/myfolders/CARS.csv"; */
75 libname libsas '/folders/myfolders/CARS.dta';
ERROR: Library LIBSAS is not in a valid format for access method RANDOM.
ERROR: Error in the LIBNAME statement.
76 /*1*/
77 /* data snow.snowfall; */
78 data libsas.ecars;
79 set sashelp.cars;
80 where Origin='Europe';
81 run;
 
ERROR: Libref LIBSAS is not assigned.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
 
82 proc print data=libsas.ecars;
ERROR: Libref LIBSAS is not assigned.
83 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
84
85
86
87 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
100
ChrisBrooks
Ammonite | Level 13

You are including a file name (cars.dta) in your libname statement when it should only contain a folder name. If you change your libname statement to:

 

libname libsas '/folders/myfolders';

Your code will work

a13
Calcite | Level 5 a13
Calcite | Level 5

Yes, removing Cars.dta from path worked fine. Thank you. 🙂

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 9184 views
  • 1 like
  • 3 in conversation