The List Object Locks (QWCLOBJL) API generates a list of lock information about a specific object or database file member and places the list into a specified user space. This API provides information similar to that provided by the Work with Object Lock (WRKOBJLCK) command.
Scott Klement's sample program is available at
http://archive.midrange.com/rpg400-l/200202/msg00344.html.
The documentation for QWCLOBJL is located at
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/apis/qwclobjl.htm.