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
MacroCore library for app developers
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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 907 views
  • 0 likes
  • 2 in conversation