Add the following condition to, or as, a WHERE clause:
_Lock-Recid NE ?
Example:
FOR EACH _Lock NO-LOCK WHERE _Lock-Recid NE ?:
DISPLAY _lock.
END.
In earlier releases, this pattern has severe performance cost as the size of the lock table (-L database startup parameter) increases. However, also due to the algorithm changes, in 11.4 table scans on _Lock are much faster.
To compare: Assuming the same hardware, with databases started with -L 200000. Where a database running on OpenEdge 11.3.3 or earlier will take minutes to complete the scan, one running on OpenEdge 11.4 or later takes less than a second.