CBL_TEST_RECORD_LOCK

Tests for an existing record lock on a file.

Note: This routine is not supported in JVM COBOL.

Syntax:

call "CBL_TEST_RECORD_LOCK using file-handle
                                 record-offset
                                 record-length
                                 reserved

Parameters:

  Using call prototype (see Key) Picture
file-handle cblt-bytestream-handle pic x(4) comp-5.
record-offset cblt-x4-compx pic x(4) comp-x.
record-length cblt-x4-compx pic x(4) comp-x.
reserved cblt-x2-compx pic x(2) comp-x.
return-code cblt-x2-compx pic x(2) comp-x.

On Entry:

file-handle
The handle returned from a successful CBL_OPEN_FILE or CBL_CREATE_FILE call.
record-offset
The offset from the start of the file to the first byte to be tested for a lock.
record-length
The number of bytes to test for a lock, starting from record-offset.
reserved
Reserved - must be zero.

On Exit:

return-code
One of the following values:
0 Record not locked
1 Lock already owned by run-unit
9/nnn File status code indicating an error condition