zOs/SQL/LOGEXNN

select *
     from OA1P.TQZ060TIMEOUT b
     where (rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id)
     in ( select rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id
     from OA1P.TQZ060TIMEOUT n
     where rz = '?' and name <> ''
            and victim_corr_id <> ''
         and exists
         (select 1
             from OA1P.TQZ060TIMEOUT a
             where a.rz = 'RZ2'
             and a.timestamp = n.timestamp
             and a.dbSys      = n.dbSys and a.ssid = n.ssid
             and a.event_type = n.event_type
             and a.victim_corr_id = n.victim_corr_id
             and a.victim_conn_id = n.victim_conn_id
             and a.holder_corr_id = n.holder_corr_id
             and a.holder_conn_id = n.holder_conn_id
             and a.name = ''
        ))
     order by rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id
;
select *
     from OA1P.TQZ060TIMEOUT n
     where rz = '?' and name <> ''
            and victim_corr_id <> ''
         and exists
         (select 1
             from OA1P.TQZ060TIMEOUT a
             where a.rz = 'RZ2'
             and a.timestamp = n.timestamp
             and a.dbSys      = n.dbSys and a.ssid = n.ssid
             and a.event_type = n.event_type
             and a.victim_corr_id = n.victim_corr_id
             and a.victim_conn_id = n.victim_conn_id
             and a.holder_corr_id = n.holder_corr_id
             and a.holder_conn_id = n.holder_conn_id
             and a.name = ''
         )
     order by rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id
;
select *
     from OA1P.TQZ060TIMEOUT n
     where rz = '?' and timestamp = '2015-10-02-01.36.00'
                  and dbSys = 'DBOF' and ssid = 'DOF5'
     order by rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id
;
select *
     from OA1P.TQZ060TIMEOUT n
     where rz = 'RZ2' and timestamp = '2015-10-02-01.36.00'
                  and dbSys = 'DBOF' and ssid = 'DOF5'
     order by rz, timestamp, dbSys, ssid
            , event_Type, victim_corr_id, holder_corr_id
                        , victim_conn_id, holder_conn_id
;x;
    and exists (select 1 from $crTb a
        where rz = '$rz'     -- for pta, beta has only 3 months
            and loadDate > current date - 100 days
            and a.timestamp = n.timestamp
            and a.dbSys      = n.dbSys and a.ssid = n.ssid
            and a.event_type = n.event_type

  $tb == 'TimeO'          then $@=[
            and a.victim_corr_id = n.victim_corr_id )
        --  and a.holder_corr_id = n.holder_corr_id