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-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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