BookmarkSubscribeRSS Feed
MattJans
Obsidian | Level 7

Hi folks! I'm not a regular SAS user so sorry if this is obvious. I'm wondering how to get a count of the # of tables in  a library. For example, I thought there would a "# of files" count somewhere in the Explorer window, or selecting all (ctrl+a on the files) would give a "N files selected" message like in Windows Explorer. But no luck. Did a quick Google but no luck. I have two versions of a library with hundreds of tables that I need to compare (one local and one remote on a collaborator's server), and I was hoping I could just quickly get the # of files in each and then scroll through to find any missing. Obviously this wouldn't guarantee that the file contents are the same, but right now we're just checking whether files are present. Thanks!

 

In short, using the Mapssas library as an example, how can I easily get a count of the # of files in that library? Doesn't need to be automated or used in other code. I just need to see it with my eyes without counting. Thanks! 

 

MattJans_0-1723747266517.png

 

3 REPLIES 3
MattJans
Obsidian | Level 7
Actually, I may have figured it out. In the lower left it says "Library has 338 member(s)." That message goes away once you start clicking in the files, though. So I answered my own question. If anyone has a programmatic way to get this, and you want to share, please do. Thanks all!
ballardw
Super User

@MattJans wrote:
Actually, I may have figured it out. In the lower left it says "Library has 338 member(s)." That message goes away once you start clicking in the files, though. So I answered my own question. If anyone has a programmatic way to get this, and you want to share, please do. Thanks all!

"Members" are not necessarily "data" files.

Members can  be data sets, views (which are instructions to build data from another source), Catalogs which may contain format definitions, graphics or some very specialized things like menu definitions or screen interface instructions created by SAS/AF, MDDB (multidimension data base definitions) and Itemstores which are generally templates of some sort.

 

If you want to know the number of DATA sets add: and Memtype="DATA" to the code provided by @Kurt_Bremser . Or "VIEW" "CATALOG" "ITEMSTOR" "MDDB" to count those.

 

You may want to note that one data set could be used by multiple Views or one View can use multiple data sets.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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