zOs/SQL/CHECKRTF
set current path = 'OA1T';
---------------------------------------------------------------------
-- compare new and old vRtsReoTS
--
select count(*),
substr(strip(char(n.importance)) || ' ' || n.reason, 1, 9) "new",
fOsFmtE7(sum(n.reorgTime)) "reoTime",
fOsFmtE7(sum(n.reorgTime * (sign(n.importance)
+ case when left(o.reason,3)='no ' then 0 else -1 end
))) "tiDiff",
substr(o.reason, 1, 7) "old"
from tstRts.vRtsReoTS n
full outer join s100447.vRtsReoTs o
on n.db = o.db and n.ts = o.ts and n.part = o.part
and n.dbid = o.dbid and n.psid = o.psid
and n.partition = o.partition
-- where n.db like 'MF%'
group by
substr(strip(char(n.importance)) || ' ' || n.reason, 1, 9),
substr(o.reason, 1, 7)
order by 1 desc
with ur
;
---------------------------------------------------------------------
-- compare new and old vRtsReoIX
--
select count(*),
substr(strip(char(n.importance)) || ' ' || n.reason, 1, 9) "new",
fOsFmtE7(sum(n.reorgTime)) "reoTime",
fOsFmtE7(sum(n.reorgTime * (sign(n.importance)
+ case when left(o.reason,3)='no ' then 0 else -1 end
))) "tiDiff",
substr(o.reason, 1, 7) "old"
from tstRts.vRtsReoIX n
full outer join s100447.vRtsReoIX o
on n.db = o.db and n.ts = o.ts and n.is=o.is and n.part=o.part
and n.dbid = o.dbid and n.isoBid = o.isoBid
and n.partition = o.partition
-- where n.db like 'MF%'
group by
substr(strip(char(n.importance)) || ' ' || n.reason, 1, 9),
substr(o.reason, 1, 7)
order by 1 desc
with ur
;