issue #20044: Reorganize retrive record output to separate header from data. Add option for try lock to only read a lock