DATA Step, Macro, Functions and more

Selected Library is Invalid

Reply
Frequent Contributor
Posts: 129

Selected Library is Invalid

Hi,

 

I haven't been working on SAS for a while. I got back from break and suddenly I can no longer refer to the library that I have been using for months. The library name is LEARN and it I am using SAS University edition with VirtualBox.

 

When I click on the library properties for LEARN I get the message that the library is invalid. When I try to reference the library in the SAS programs, I get the Error message that the library Learn does not exist. Help!  I have tried to delete and recreate the library, and it works for a minute or so (whereby the SAS program recognizes the library), and then I get the same problem.

 

Below is the log form one of the programs. Thanks for your help...

 

-----------------------------------

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62
63 data learn.blood;
64 length Gender $ 6 BloodType $ 2 AgeGroup $ 5;
65 input Subject
66 Gender
67 BloodType
68 AgeGroup
69 WBC
70 RBC
71 Chol;
72 label Gender = "Gender"
73 BloodType = "Blood Type"
74 AgeGroup = "Age Group"
75 Chol = "Cholesterol";
76 Datalines ;
 
ERROR: Library LEARN does not exist.
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.01 seconds
 
1077 ;
 
 
1078
1079 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 

 

Frequent Contributor
Posts: 129

Re: Selected Library is Invalid

Posted in reply to ManitobaMoose

Here is another log showing the same thing:

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 /* Chapter 15
63 Problem 15.2*/
64
65 Libname Learn '/folders/myfolders/learn' ;
NOTE: Libref LEARN refers to the same physical library as SASDATA.
WARNING: Library LEARN does not exist.
NOTE: Libref LEARN was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders/learn
66
67 title "Statistics from BLOOD by gender" ;
68 proc report data=learn.blood ;
ERROR: File LEARN.BLOOD.DATA does not exist.
69 column gender WBC RBC ;
70 define Gender / group width=12 ;
71 define WBC / analysis mean "Average WBC" width=5
72 format=comma8.2 ;
73 define RBC / analysis mean "Average RBC" width=5
74 format=comma8.2 ;
75 run ;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
76
77
78
79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
92
 

 

Frequent Contributor
Posts: 129

Re: Selected Library is Invalid

Posted in reply to ManitobaMoose
I RECOPIED AND PASTED THE LIBNAME INFORMATION AND SOMEHOW IT NOW WORKS??? AT LEAST FOR NOW. i have no idea why. Anyway, no solution needed for now. If it stops working again, I will repost. Thanks.
Super User
Posts: 10,238

Re: Selected Library is Invalid

Posted in reply to ManitobaMoose

Maybe you had a hidden character somewhere in there that wouldn't display. Such Heisenbugs are the worst of the species.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 10,238

Re: Selected Library is Invalid

Posted in reply to ManitobaMoose

Most probably you somehow managed to remove the directory learn from your shared folder.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 4 replies
  • 173 views
  • 0 likes
  • 2 in conversation