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

I am running a VERY simple program from SAS. I am unable to compile it because of this error message - LIBREF SP4R NOT ASSIGNED. The program follows:

NB: The OS is MAC Catalina on Mac Air
************************
data sp4r.example_data;
Length First_Name $ 25 Last_Name $ 25;
Input First_Name $ Last_Name $ age height;
datalines;
Jordan Bakerman 27 68
Bruce Wayne 35 70
Walter White 51 70
Henry Hill 65 66
JeanClaude VanDame 55 69
;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Why are you trying to write to the SP4R libref if you never defined it?

Why not just create a WORK dataset instead?

data work.example_data;

Or more simply

data example_data;

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

Why are you trying to write to the SP4R libref if you never defined it?

Why not just create a WORK dataset instead?

data work.example_data;

Or more simply

data example_data;
Kadjere
Fluorite | Level 6
Please include SP4R in your solution. That’s easier tl follow. Thanks
Reeza
Super User
libname sp4r 'path to folder where you want to save your work';

data sp4r.example_data;
........

@Kadjere wrote:

I am running a VERY simple program from SAS. I am unable to compile it because of this error message - LIBREF SP4R NOT ASSIGNED.

 


This means you did not create a library reference so you cannot use the library. You either need to create the library reference via a LIBNAME statement or you need to save your data set to the work library which is a temporary location.

 

data sp4r.example_data; *trying to use the library but it does not exist yet;


 

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 632 views
  • 0 likes
  • 3 in conversation