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::
These changes can cause compatibility issues. See these sections for information about disabling them:
See also:
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:
SUPPRESS_PATH_IN_IFIL NO
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.
The new IFIL path logic can be deactivated programmatically using the following procedures.
Note: Programming support through the SDK only applies to standalone libraries. This technique is not supported in client-server applications.
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
ctThrdTerm();
#endif
ctrt_exit(2);
}
/* 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*/
(LONG) (OPF_ALL | GPF_READ | GPF_WRITE |
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);
fflush(stdout);
}
else
printf("File created successfully.\n");