There is the Analyze IFS Storage Consumption Example in Run SQL Scripts that might accomplish what you need.
This all starts with a RTVDIRINF command followed by a few SQL Statements to retrieve the information you'd be looking for.
You can find it under the Edit Menu, Examples, SYSTOOLS for you.  
Good luck
Matt
message: 3
date: Mon, 28 Mar 2022 15:43:51 -0700
from: Jerry Draper <midrangel@xxxxxxxxxxxxx>
subject: Re: calc directory size on IFS
   From where are these functions evoked?
   J
   On 3/25/2022 5:09 PM, Jack Woehr via MIDRANGE-L wrote:
 Db2 for i Services to the rescue: IFS_OBJECT_STATISTICS table function  [1]<
https://www.ibm.com/docs/en/i/7.3?topic=services-ifs-object-statistics-table-function>
 Sum the ALLOCATED_SIZE column.
 On Fri, Mar 25, 2022 at 5:14 PM Jerry Draper [2]<midrangel@xxxxxxxxxxxxx>
 wrote:
    I have a directory on the IFS that has some 1,158,058 files varying in
    size.
    Mgmt wants to know how total GB of files in this directory.
 --
 Jerry Draper, Trilobyte Software Systems, since 1976  IBM I, Network, and Connectivity Specialists, LAN/WAN/VPN  Representing WinTronix, Synapse, HiT, and others .....
 (415) 457-3431 . [3]www.trilosoft.com
 
As an Amazon Associate we earn from qualifying purchases.