Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

FreeSetNbr

Free space allocated for a specific set.

Short Name

FRESETN()

Type

Low-Level function

Declaration

COUNT FreeSetNbr(COUNT setnum)

Description

FreeSetNbr() frees set number setnum. This routine permits flexible use of a large number of sets within particular code segments responsible for the creation and clean up of the particular sets. Instead of freeing all sets any time one needs to be freed, this function frees sets one at a time.

Return

This routine returns an error code, but should return NO_ERROR even if the setnum given does not exist. See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Example

COUNT i;

FILNO keyno0, keyno1;


struct DATAREC datrec0, datrec1;


if (ChangeSet(0))

printf("\nCould not change set. Error=%d\n", isam_err);

if (FirstInSet(keyno0, &datrec0))

printf("\nCould not get FirstInSet. Error=%d\n", isam_err);


if (ChangeSet(1))

printf("\nCould not change set. Error=%d\n", isam_err);

if (LastInSet(keyno1, &datrec1))

printf("\nCould not get LastInSet. Error=%d\n", isam_err);


FreeSetNbr(0);

See also

FreeSet(), FirstInSet(), ChangeSet()

TOCIndex