zOs/SQL/CATTBKE

--  simple Kennzahlen pro Table aus sysTables
--
set current path = OA1P;
select substr(strip(creator) || '.' || name, 1, 20),
       substr(fosFmtE7(spacef*1024), 1, 7) "bytes",
       substr(fosFmtE7(cardf),1, 7) "rows",
       smallInt(recLength) "maxRowLen",
       smallInt(avgRowLen) "avgRowLen"
    from sysibm.sysTables
    where creator = 'OA1P' and name like 'TNI%'
    order by name
    with ur