Reading a Database From a File in Small Chunks (lkt_read_records)

The following command is used to read records from the database.

dvkerr_t lkt_read_records(lpar_t host, lpar_t filehandle, lpar_t *reclist, 
int numrecords );

lkt_read_records accepts a filehandle lpar returned by lkt_open_dbfile and reads up to numrecords from the file and returns them in reclist.

The output of lkt_read_records is a list of records or LPAR_NULL if the end of the file has been reached.

Input:

host (optional)

This is used to identify the server. For more information, see Communicating with TIBCO Patterns Servers.

filehandle (required)

is the open file handle returned by lkt_open_dbfile.

numrecords (required)

the number of records to read.

Output:

reclist (required)

is a list of records read, or LPAR_NULL if the end of the file has been reached.

 

Error codes and items returned by lkt_read_records

FILEFORMAT

a line from the file which could not be parsed

PARAMVAL