BookmarkSubscribeRSS Feed
turcay
Lapis Lazuli | Level 10

Hello everyone,

 

I would like to display whole databases number of observations in a library. I have a method as below but I'm looking for other methods. I just wonder that, is it possible to show number of observations by using Proc Datasets or Proc Content or any other methods which is different from following one?

 

Here is my method;

 

proc sql;
select memname,nobs
from dictionary.tables
where libname eq 'SASHELP'
quit;

 

Actually, this code works for many libraries, however, when I try to use some other libraries which are larger data sets, does not work and I get the following error. 

 

ERROR: Error on server LIBNAME socket.

 

The foregoing Error can be related to size of library or the reason is completely different?

 

Thank you

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This sounds to me like your connecting to a database or a server somewhere, and its is trying to get the information back from there.  However no information is provided in your post so can't say.  I would check with your IT group/SAS IT group to see what is connected and what is causing the problem, maybe you have a DB connection but you don't have the correct accesses.

ballardw
Super User

If your Library on the server is another database then the metadata SAS maintains on its datasets may not be available and you may have to explicitly query the database specific tools for that information.

turcay
Lapis Lazuli | Level 10

Hello,

 

Thank you for your responses.

 

I would like to state that whole libraries are in the same server, the code works for many libraries but doesn't work for some of them. 

When I first click the icon->(+) I can see the data sets under the library, but after I execute the code and then click the icon ->(+) I see nothing under the library.

 

Do you have additional thought about this case? And any other codes to see number of observations?

 

Thank you

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 3 replies
  • 1141 views
  • 0 likes
  • 3 in conversation