Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

CloseRFile

Incremental ISAM close for files opened by Resource IFIL open.

Short Name

CLRFIL()

Type

ISAM function

Declaration

COUNT CloseRFile(FILNO filno)

Description

In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering

CloseRFile() closes the data file filno, and all associated indexes, opened by OpenFileWithResource().

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

Successful close of ISAM files.

22

FNUM_ERR

File number out of range.

24

FCLS_ERR

Could not close file number isam_fil.

401

RNON_ERR

Resources not enabled.

408

RNOT_ERR

IFIL structure not stored in data file resource.

438

DZRO_ERR

File definition block is empty.

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

Example

FILNO myfile;

COUNT retval;

if (retval = InitISAM(6,7,4))

printf("\nCould not close files. Error %d.", retval);

else {

if (myfile = OpenFileWithResource(-1, "sample.dat", 0))

printf("\nCould not open files.");

else if (CloseRFile(myfile))

printf("\nCould not close files.");


if (CloseISAM())

printf("\nCould not close ISAM.");

}

See also

InitISAM, CreateIFile, OpenFileWithResource

TOCIndex