zOs/SQL/CATV9NEZ

select tp, char(left(nm, 40), 40), v9
   from s100447.db2v9 v9
 -- ( select creator cr, name tb from sysibm.systables

 --             ) gt
   where    v9.v9 <> ''
         -- v9.cr = gt.cr and v9.tb = gt.tb
         and  (    ( v9.cr   = 'GDB9998' and v9.tb= 'TWK573A1' )
                or ( v9.cr   = 'GDB9998' and v9.tb= 'TWK574A1' )
                or ( v9.cr   = 'GDB9998' and v9.tb= 'TWK575A1' )
              )
;
x
set current sqlid = 'A540769'
;
declare global temporary table session.gtt1
    (cr char(24), tb char(24));
insert into session.gtt1
    ( select creator, name from sysibm.systables

      where   (    ( creator = 'GDB9998' and name = 'TWK573A1' )
                or ( creator = 'GDB9998' and name = 'TWK574A1' )
                or ( creator = 'GDB9998' and name = 'TWK575A1' )
              ) )
;
select * from session.gtt1
;
select tp, char(left(nm, 40), 40), v9
   from s100447.db2v9 v9, session.gtt1 gt
   where v9.cr = gt.cr and v9.tb = gt.tb