BookmarkSubscribeRSS Feed
vickys
Obsidian | Level 7

HI Experts,

 

we in the process of migration and I came across a situation where I need to Find all the Datasets in particular Folder in SAS DI and their Size as well.

 

I have generated a report in SAS DI but its giving all the information on jobs , Tables, and columns etc.

 

I am looking for the datasets present in particular folder, Dataset path and Datasets Size.

 

Could someone please share some info if they have idea.

 

Really appreciate it.

 

Thanks,

Vicks

1 REPLY 1
AllanBowe
Barite | Level 11

When you say folder, I'm presuming you mean a physical directory (not metadata folder).

 

The following macro will give you what you need: https://core.sasjs.io/mp__dirlist_8sas.html

 

Use the `getattrs` parameter to get additional (size) info, eg as follows:

 

%mp_dirlist(path=/your/folder,outds=work.results,getattrs=YES)

If you're looking to simply grab the size of a single dataset you can also use this macro function: https://core.sasjs.io/mf__getfilesize_8sas.html

 

/Allan
SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 624 views
  • 0 likes
  • 2 in conversation