FairCom Corporation


F.23 CloseRFile


Incremental ISAM close for files opened by Resource IFIL open.

Short Name

CLRFIL

TYPE

ISAM function

DECLARATION

COUNT CloseRFile(COUNT filno)

DESCRIPTION

CloseRFile closes the data file filno, and all associated indices, 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 Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.

EXAMPLE

COUNT 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, and OpenFileWithResource.


FairCom Corporation
www.faircom.com