The system system variable references the instance of the
vars
locks : LockArray;
notMine : Lock;
begin
create locks transient;
system.getLocks(locks, 100); // retrieve a maximum of 100 locks
foreach notMine in locks do
write notMine.target.String & "locked by " &
notMine.lockedBy.userCode;
endforeach;
epilog
delete locks;
end;