zOs/SQL/REOTS

set current path = oA1p;
select substr(value(clone, '-') || value(strip(char(base)), '-')
                         || value(strip(char(instance)), '-'), 1, 3) cbi
    , count(*)
    , min(reason), max(reason)
    from s100447.VReoIx s
group by value(clone, '-') || value(strip(char(base)), '-')
                          || value(strip(char(instance)), '-')
;x;
    from s100447.VReoTs s
select
        substr(strip(db) ||'.' || strip(ts), 1, 17) "db.ts",
        smallint(part) "part",
        substr(fosFmTime(reorgTime), 1, 5) "reoTi",
        substr(fosFmTime(i0Time), 1, 5) "i0Ti",
        importance "imp",
        reason "reason",
        s.*
    from s100447.VReoTs s
    where  1=1 -- reason like '%clusterRat%'
        and db = 'DB2PDB2'
    --  and TS like 'PAXXSB'
    --  and importance > 0

 -- order by  importance desc, db, ts, part
    order by db, ts, part
    with ur
;;;;
select substr(strip(db) || '.' || strip(ts)
              || ':' || strip(char(part)), 1, 25), reorgTime, importance
              , reason, s.*
    from A540769.VReoTs s
    where importance > 0
    order by  importance desc, db, ts, part
;;;;