BookmarkSubscribeRSS Feed
sassharp
Calcite | Level 5

Need to measure space occupied by SAS data sets in a given directory(x) and need to generate report every day in excel or email??

Obstacle: dont have permission to read every sub directory under given directory (x)?

But have sudo privileges in command prompt to a given directory (x).

Q) Can we done this task using SAS management console?

or

Using scripting only?

Any literature appreciated.

I saw some paper or tip to do this in SAS.com Now not able to find that paper or tip. Share if you have that paper.

Thanks.

5 REPLIES 5
Prit
Calcite | Level 5

One way to find the details of space occupied by sas datset by using "PROC CONTENTS".

Refer below sample code which may help you.

Libname Test "<PATH>";

Proc Contents DATA=Test._all_ nods;

run;

Ksharp
Super User

What engine are you using ?

If BASE then you can query the dictionary table like above did.

If SPDS then you can use command du -g .

LinusH
Tourmaline | Level 20

In dictionary.tables, there is also a column specifying level compression, which can be used in the calculation.

If you have table in place deletions, beware to use no of physical observations.

What is missing here is size information of indexes, which could be complicated to calculate.

So, bottom line, using OS tools is preferable if you need a result close as possible to the "truth".

Data never sleeps
sassharp
Calcite | Level 5

Still looking for effecient answers.

Ksharp
Super User

The efficient way is to use OS command as Linux did .

What engine are you using .BASE engine can query dictionary table to find out the size , but SPDS can't .

The attachement is a paper I wrote for SGF next year. But it is still not adopted .Hope it can help you a little bit. I used OS command to get SPDS library's size ,very fast. you can try it.

Ksharp

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 5259 views
  • 0 likes
  • 4 in conversation