|
Purpose |
Reads a DP4 record from a file | ||
|
Old names |
#define _vread tf_read_record | ||
|
Syntax (CCOWN) |
void tf_read_record(int file_handle, short *datarec) | ||
|
Syntax (DP4DBAPI) |
BOOLEAN dp4_sf_read_record(FCONN * fconn,short * datarec) | ||
|
Parameters |
int file_handle |
File handle of file | |
|
FCONN * fconn |
File handle of file | ||
|
|
short * datarec |
Pointer to a DP4 record to hold record read from file | |
|
Description |
The tf_read_record() and sf_read_record() functions read a DP4 record from the current position in the file. You obtain the file handle with a successful call to tf_open() or sf_open(). The sf_read_record() function calls the file handling support in the database manager, and the tf_read_record() function calls the file handling support in the terminal manager. You must not call an sf_ function with a handle obtained with tf_open(), or a tf_ function with a handle obtained with sf_open(). A DP4 record is a record corresponding to a structure of the form below:
The L field is used to determine the number of bytes to read from the file. The file pointer is automatically incremented. datarec must be large enough to hold the largest expected record. Do not mix calls to the function tf_read_record() with calls to the function tf_write(). This is because the function tf_read_record() allows for any byte ordering differences on non-INTEL machines, but the function tf_write() does no such translation. This function is not intended for reading database files directly, but only for reading and writing extract files, or similar files you have created yourself. | ||
|
See also |
|||
|
Example |
| ||