PVK_read( ) |
Read a Record from a File |
int PVK_read(int fh, char *dtabfr, int dtasz, int function);
Where:
fh |
File handle returned from a prior call to PVK_OpenExt( ) | ||||||||||
dtabfr |
Pointer to the data buffer to receive the record data | ||||||||||
dtasz |
Size (in bytes) of the data buffer | ||||||||||
function |
Type of read to be performed. Values are:
|
PVK_read( ) is used to read a record from a PxPlus Keyed, Indexed or EFF file. The return value will contain the length of the record in bytes or -1 if an error occurred. A return value of -2 indicates that the supplied buffer was not large enough to store the entire data record.
A record may be locked or extracted by specifying PVKRD_LOCK in conjunction with the appropriate function (e.g. PVKRD_NEXT | PVKRD_LOCK).