Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctGetOpenFilesXtd

Declaration

NINT ctGetOpenFilesXtd(FILNO ConnectionNumber, pctFILINF pFileInfo, pLONG pNbrFiles);

Description

V12 and later: Returns the names of all open FairCom DB files or all files open by a specified connection. This function is similar to ctGetOpenFiles except that it has been extended to handle greater than 32,767 files. The information is returned in this structure (which is slightly different from the structure returned by ctGetOpenFiles):

typedef struct ctfilinfox {

FILNO filno; /* system file number */

LONG status; /* user count or user file number */

TEXT filtyp; /* file type */

TEXT suptyp; /* superfile type */

TEXT filnam[255]; /* file name */

} ctFILINFX, ctMEM * pctFILINFX;

In V12 and later, FairCom DB supports opening more than 32,767 files. A particular database connection is still limited to a maximum of 32,767 files because we preserved the original definition of data and index file numbers as two-byte signed values, using the COUNT data type. However, internally we introduced new data types that support billions of files. Note that a compile-time limit is set to a maximum of 1,000,000 files.

Tip: If opening many files, consider the possibility of using multiple c-tree database engines to host the files, rather than having one c-tree database engine hosting all the files, since the files will compete for resources such as data and index cache, file system cache, operating system kernel memory, and transaction logs.

Return Values

Symbolic Constant

 

Explanation

NO_ERROR

0

No error

VBSZ_ERR

153

Buffer too small

LADM_ERR

589

Member of ADMIN group required

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

Example

For example code showing how to find the address of a subsequent ctFILINF structure in the output buffer, see the function ictadmnListOpenFiles() in ctadmn.c.

See Also

TOCIndex