Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

AllocateBatch

Optionally allocates buffer space for multiple batches (groups of records).

Short Name

ALCBAT()

TYPE

ISAM function

Declaration

COUNT AllocateBatch(COUNT numbat)

Description

AllocateBatch() is an optional part of the API called internally by ChangeBatch().

AllocateBatch() allocates data structures for multiple, simultaneous batches. Ordinarily the FairCom DB batch function, DoBatch(), is used for only one batch at a time. Each time ChangeBatch() is called with a previously unused numbat, a new batch structure is allocated and maintained by FairCom DB. Therefore, calling AllocateBatch() is optional, as it is automatically called by ChangeBatch().

Prior to c-tree V6.4B, the numbat parameter was a unique batch identification number. numbat is ignored by c‑tree V6.4B and after. See ChangeBatch() for more information.

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

Successful allocation.

184

ISDP_ERR

AllocateBatch() already called for this batch. Call FreeBatch() if you must recall AllocateBatch().

185

ISAL_ERR

No memory available for set buffers.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Example

See the ChangeBatch example.

See also

ChangeBatch, FreeBatch, DoBatch

TOCIndex