Wouldn't it be easier to query the SYSTABLES file from the DB2 System
Catalog? You could select those that have FILE_TYPE = 'S'. Then you
could join to SYSPARTITIONSTAT to get the list of members and sum the
NUMBER_ROWS column? I guess you would need to do something if you
it by source type, but that's probably somewhere else in the System
Catalog--I'm just not sure where off the top of my head.