database sysmaster;
select dbsname, b.tabname, rowidr, keynum, e.txt type, d.sid owner,
g.username ownername, f.sid waiter, h.username waitname
from syslcktab a, systabnames b, systxptab c, sysrstcb d, sysscblst g,
flags_text e, outer (sysrstcb f , sysscblst h)
where a.partnum = b.partnum
and a.owner = c.address
and c.owner = d.address
and a.wtlist = f.address
and d.sid = g.sid
and e.tabname = 'syslcktab'
and e.flags = a.type
and f.sid = h.sid
into temp tmplocks with no log;
select dbsname,
tabname,
rowidr,
type[1,4],
owner,
ownername
from tmplocks
order by dbsname, tabname, owner;
drop table tmplocks;