FairCom Corporation


F.20 CloseIFile


Incremental ISAM close.

Short Name

CLIFIL

TYPE

ISAM function

DECLARATION

COUNT CloseIFile(pIFIL ifilptr)

DESCRIPTION

CloseIFile closes the data file, and associated indices, referenced in the IFIL structure pointed to by ifilptr.

RETURN

Value
Symbolic Constant
Explanation
0
NO_ERROR
Successful close of ISAM files.
24
FCLS_ERR
Could not close file number isam_fil.

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

extern IFIL myfile;
COUNT retval;
if (retval = InitISAM(6,7,4))
printf("\nCould not close files. Error %d.", retval);
else {
if (OpenIFile(&myfile))
printf("\nCould not open files.");
else if (CloseIFile(&myfile))
printf("\nCould not close files.");
if (CloseISAM())
printf("\nCould not close ISAM.");
}

SEE ALSO

InitISAM, CreateIFile, OpenIFile, and CloseISAM. The Chapter 5 "ISAM Functions" of the c-tree Plus Programmer's Reference Guide discusses the contents of the IFIL structure.


FairCom Corporation
www.faircom.com