Get Direct/Record (23)
The Get Direct/Record operation (B_GET_DIRECT) retrieves a record using its physical location in the file instead of using one of the defined key paths.
Use Get Direct/Record to accomplish the following:
Parameters
 
*Note: The key number parameter is not needed when you are performing a Get Direct/Record operation on a data-only file.
Prerequisites
Procedure
1
For more information about locking, refer to the PSQL Programmer's Guide.
2
3
4
5
Result
If the Get Direct/Record operation is successful, the MicroKernel Engine returns the requested record in the data buffer, the length of the record in the data buffer length parameter, and the key value for the specified key path in the key buffer.
If the Get Direct/Record operation is unsuccessful and the MicroKernel Engine cannot return the requested record, the MicroKernel Engine returns one of the following status codes:
Positioning
The Get Direct/Record operation erases any existing logical currency information and establishes the new logical currency according to the key number specified. It has no effect on the physical currency information.