zOs/SQL/TECSVSB1

--- statistic and list of parts with stage errors --------------------
select count(*), stage, err, info
    from oa1p.tqz005tecsvunload
    where stage <> '-r'
    group by stage, err, info
;
select db, ts, pa, stage, err, u.*
    from oa1p.tqz005tecsvunload u
    where stage <> '-r' and err <> ''
    order by db, ts, pa