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
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.
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.
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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.