Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Reading Records Using an Index Range

If the call to AllocateRange() succeeds, then FirstInRange(), FirstInVRange(), LastInRange(), or LastInVRange() must be called to activate the range and return the first or last data record in the range. If no record satisfies the range, then these routines return INOT_ERR (101). If the first/last range call succeeds, then NextInRange(), NextInVRange(), PreviousInRange(), and PreviousInVRange() may be used to traverse the range returning the next or previous record in the range. INOT_ERR is returned if no more records satisfy the range. It is permissible to call the first/last range routines any time to re-establish position at the beginning or end of the range. These routines are declared as follows:

ctCONV COUNT ctDECL FirstInRange(FILNO keyno, pVOID recptr);

ctCONV COUNT ctDECL LastInRange(FILNO keyno, pVOID recptr);

ctCONV COUNT ctDECL NextInRange(FILNO keyno, pVOID recptr);

ctCONV COUNT ctDECL PreviousInRange(FILNO keyno, pVOID recptr);

ctCONV COUNT ctDECL FirstInVRange(FILNO keyno, pVOID recptr, pVRLEN plen);

ctCONV COUNT ctDECL LastInVRange(FILNO keyno, pVOID recptr, pVRLEN plen);

ctCONV COUNT ctDECL NextInVRange(FILNO keyno, pVOID recptr, pVRLEN plen);

ctCONV COUNT ctDECL PreviousInVRange(FILNO keyno, pVOID recptr, pVRLEN plen);

The interpretation of the parameters in the range record read functions is the same as for the ISAM record read functions FirstRecord(), FirstVRecord(), etc. The range record read functions return NO_ERROR (0) on success.

TOCIndex