BookmarkSubscribeRSS Feed
vkievsky
Fluorite | Level 6

When I am creating my own file under Window 7 with extension .sas, stating there :

libname learn '/tutorials/bookdata/learning_sas_by_example';

and load it into PrepGuide into Program space  I am getting error message below.

ERROR: User does not have appropriate authorization level for library LEARN.


At the same time when I am loading into  PrepGuide a UNIX file like

Learning_sas_by_example, chapter04examples.sas which contains the same statement "libname learn..."

I am not getting errors.

Vladimir Kievsky
vkievsky@hotmail.com

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  I suspect that you tried to WRITE to the LEARN library. So the problem isn't your LIBNAME statement. The problem is how you are USING the LIBNAME. See  example #2 in the screen shot. As long as you READ from the LEARN location (example #1, #3), you will be OK. But you do not have WRITE access to any of the data locations on the server. So if there is an example in the book that shows something like:

   

DATA LEARN.NEW;

** some code;

RUN;

   

Then you will have to change it to your user library or to the WORK library to test file creation:

  

DATA WORK.NEW;

** some code;

RUN;

  

  Here is some example code that I used for the attached screen shot. I can replicate your ERROR message just by trying to write to the LEARN library -- which fails because NOBODY has WRITE access to the OnDemand server except to your user folder. You will have to write to your user folder/directory (see Example #4). The tutorial on this web page explains how to use the OnDemand server with Book data.

(SAS OnDemand for Professionals Customer Support tab -- see videos)

  

Cynthia

 

libname learn '/tutorials/bookdata/learning_sas_by_example';

**1) reading FROM the LEARN library;

data test;

  set learn.bicycles;

run;

** 2) trying to write to the LEARN library;

** will generate an error;

data learn.new;

  set sashelp.class;

run;

** 3) again, reading FROM the LEARN library;

proc contents data=learn._all_;

run;

   
**4) write to user directory, called MYPLACE;
libname myplace '~/user';

data myplace.new;
  set learn.bicycles;
run;


cannot_write_to_server_tutorials_loc.pngcan_write_to_user_folder.png

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 2475 views
  • 0 likes
  • 2 in conversation