iscluster

rebuild an ISAM file in a given natural order

SYNOPSIS

int iscluster( int isfd, IsKdsc * key );

isfd isam file identifier
key description of index to cluster on

RETURN

SUCCESS, or a negative value on error, in which case the error code is found in iserrno.

NOTES

the file must be open in exclusive mode

this routine makes use of a temporary file, created in the same directory as the original.

all active data records will be transferred to the temp file in the index order specified, and all indexes will be packed as efficiently as possible.

if successful, iscluster will return a new file descriptor, opened in the same format as the original, which will be abandoned. a NULL pointer will be returned on error, and the original descriptor and file will be left intact.

be warned that this call may take some time to run if the file in question is large.