Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Improved IFIL Path Handling

Historically, the IFIL resource stored in the file includes a path component in IFIL.pfilnam and optionally IIDX.aidxnam, which could be absolute or relative. If the file is moved to a different directory, a mismatch exists between the path the application must specify to open the file and the path contained in the IFIL resource. This mismatch, particularly in the aidxnam, can cause problems, as this on-disk version of aidxnam is used by OPNRFIL() to locate these indexes.

Unless SUPPRESS_PATH_IN_IFIL NO is set in ctsrvr.cfg, the following changes take effect::

  • The file becomes incompatible with older servers. This change takes effect when the PUTIFIIL() function is called, which typically occurs if a data or index definition changes. PUTIFIL() might be called automatically within operations such as file creation, an AlterTable operation, or potentially within a Rebuild or Compact operation.
  • Applications may now specify IIDX.aidxnam as "+myaltindex.idx", meaning that the alternate index is expected to be in the same directory as the data file. This syntax was previously available to PRMIIDX() and TMPIIDX() only. It is now available with all calls that accept an IFIL argument (CREIFIL, OPNIFIL, RBLIFIL, CMPIFIL, RENIFIL, CLIFIL, DELIFIL)
  • Applications may now specify IIDX.aidxnam as "?myaltindex.idx", meaning that the alternate index is expected to be in the same directory as the data file, and should be prefixed with the data file name as well: For pfilnam="mypath/mydata" and aidxnam="?myaltindex.idx", the name of the index in the file system will be "mypath/mydatamyaltindex.idx". ISAM-level renames of the data file will implicitly rename the alternate index.
  • Beginning with V12, when a PutIFile() or one of it's extended versions is called, the path is automatically stripped off the file name (IFIL.pfilnam) and alternate index name (IIDX.aidxnam) elements of the IFIL structure.

These changes can cause compatibility issues. See these sections for information about disabling them:

See also:

  • Partition file directory with SUPPRESS_PATH_IN_IFIL

In This Section

Configuration Option to Disable IFIL Path Improvements

Programming Option to Disable IFIL Path Improvements

Previous Topic

Next Topic

Configuration Option to Disable IFIL Path Improvements

New configuration option allows you to disable IFIL path improvements so files can be opened by earlier releases

FairCom DB includes enhancements to the storing of data and index file paths in the IFIL resource of a c-tree data file to avoid potential problems when files are moved to a different location. An attempt to open a data file that was created with these enhancements with a V11.5 (or earlier) server fails with error FREL_ERR (744, "file requires unavailable feature").

FairCom Server supports a configuration option that allows newly-created files to keep the IFIL resource in the old format, so that the data file can be opened by V11.5 and earlier. To use this option, add the following keyword to ctsrvr.cfg:


Note: This error will be seen only in environments in which a file is created on a server with the index file path enhancements and then is copied (replicated) to earlier versions of the server without this feature. As a best practice, FairCom always recommends keeping all servers in the same operating environment on the same release. If it is not possible to upgrade all servers to the same release, the keyword can be used as a last resort.

Previous Topic

Next Topic

Programming Option to Disable IFIL Path Improvements

The new IFIL path logic can be deactivated programmatically using the following procedures:

The new IFIL path logic can be deactivated by setting the following environment variable after you have called InitISAM() and prior to creating any files:

ctSuppressPathInIFIL = NO;

For example:

retval = INTISAMX(6, /* index buffers */

100, /* files */

64, /* page sectors => 8192 bytes cache page size */

6, /* data file buffers */

MY_USER_PROFILE_MASK, /* UserProfile */

uid, /* user id */

upw, /* user password */

svn); /* server name */

if (retval) {

printf("\nCould not initialize c-tree Plus(R) (%d)\n",retval);

#ifdef ctThrds





/* Setting this environment variable removes V11.6 and newer IFIL path logic */

ctSuppressPathInIFIL = NO;

printf(" Attempting to create.\n");

if ((retval = CREIFILX( &vcustomer, /* IFIL pointer */

" ", /* data file name ext*/

".ndx", /* indx file name ext*/


WPF_READ), /* permission mask */

NULL, /* alt group id */

NULL)) /* password */

|| (retval = PUTDODA(CUSTDAT,doda,(UCOUNT) 7)))


printf("\nCould not create file with error %d (on file %d).\n",retval,isam_fil);




printf("File created successfully.\n");