Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Result Option

BAT_RET_REC

Return the actual records to the buffer. As many records as fit are placed in the buffer region, and the number actually read is in breturn.

Fixed-length records are stored with the 4-byte record offset first, followed by the actual data record. Variable-length records are stored with the 4-byte record offset first, then the 4-byte record length, followed by the actual data record. It is up to the programmer to use the buffer correctly.

Note: When using Huge Files, BAT_RET_REC mode returns an 8-byte record offset preceding the record body for each record returned in the batch buffer. For non-Huge Files, a 4-byte record offset is returned instead.

BAT_RET_POS

With this option, only the 4-byte record offsets of the matching records are placed in the buffer. This allows you to do the actual reading of the records when you want.

BAT_RET_FIX

Operates in the same manner as BAT_RET_REC except that only the fixed length portion of a variable-length data record is returned. If BAT_RET_FIX is used for a fixed length data file the results will be the same as using BAT_RET_REC. When BAT_RET_FIX is called for a variable-length file, it returns information in the same manner as BAT_RET_REC called for a variable-length file except that only the fixed length portion is returned.

The form of the information returned is the same: record position, (entire) record size, fixed length portion. The size information provides the total record size of the variable-length record (even though only the fixed length portion is returned). Nowhere in the output is the fixed length size explicitly returned. In this, it is the same as when BAT_RET_REC is called for a fixed length file. It is assumed the application has knowledge of the fixed length size, say through a call to GetCtFileInfo(datno,RECLEN).

Default

The default is for the buffer not to be used. Only the first three fields of the PKEYREQ structure, (btotal, bavail, and breturn), are updated.

See also:

TOCIndex