BookmarkSubscribeRSS Feed
mvinash
Calcite | Level 5

Hi all,

i am new to SAS ,

while doing example i have an error..

 

Error : Libref sp4r is not assigned

 

help me out

thanks

2 REPLIES 2
tsap
Pyrite | Level 9

You are using a Libref value that has not been defined yet. To use the libref 'sp4r', as you currently are in your coding example, you first need to run a line of code like this:

 

libname sp4r 'physical_folderpath_where_sp4r_files_are_located';

Fill in the details in quotation with the specific folder path information for where the sp4r folder is located. Once you set this up and run this line, when you run the other piece of code it will understand where to look for the 'example_data2' dataset.

 

Hope this helps.

ballardw
Super User

Instead of taking the time to make an additional document you can copy text from the editor or the log and paste directly into a code box opened using the forum's {I} or "running man" icon to preserve content and to set that apart from the main message text.

 

Example from a log:

111  data need;
112     set work.count(where=(not missing(age)))
113         work.count(where=(missing(age)))
114     ;
115     retain cumcount cumperc;
116     cumcount= sum(cumcount, count);
117     cumperc = sum(cumperc, percent);
118  run;

NOTE: There were 6 observations read from the data set WORK.COUNT.
      WHERE not MISSING(age);
NOTE: There were 1 observations read from the data set WORK.COUNT.
      WHERE MISSING(age);
NOTE: The data set USER.NEED has 7 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.00 seconds

If someone has a comment or suggestion based on my log they can COPY the text, paste and make edits or highlights in another message window. That is not generally possible with PDF. Code pasted into word processor documents often gets reformatted introducing characters that cause code to fail. The code boxes won't do that (unless copied from a source already corrupted).

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1403 views
  • 2 likes
  • 3 in conversation