zOs/SQL/PDBPKGLI
select plan_name, PCK_COLLECTION_ID
, count(*), min(timestamp), max(timestamp)
, min(subsystem_id), max(subsystem_id)
from rz1dd.tacct_program
where -- timestamp > current timestamp - 10 days
PCK_COLLECTION_ID like 'A1%'
or PCK_COLLECTION_ID like 'A2%'
or PCK_COLLECTION_ID like 'NTA%'
group by Plan_Name, PCK_COLLECTION_ID
order by Plan_Name, PCK_COLLECTION_ID
with ur
select *
from rz2dd.tacct_program
where timestamp > current timestamp - 12 days
and PCK_COLLECTION_ID like 'NTA1%'
order by PCK_COLLECTION_ID desc
with ur