Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Extended File Properties

The Extended File Creation Block supports several other properties, listed below:

Host Segment Size (segsiz)

The segsiz member of the XCREblk structure permits the host’s segment size to be specified.

Note: Segment sizes are specified as multiples of a megabyte: 1048576 bytes. For example, to specify that the host segment size will be one gigabyte, 1 GB, set segsiz to 1024. It is not necessary to specify the host segment size in XCREblk because SetFileSegments() can optionally set the host segment size as well as the other segment sizes.

Maximum Number of Segments (segmax)

The segmax member of the XCREblk structure specifies the maximum number of segments permitted for the file, including the host segment. This value can be overridden with SetFileSegments().

Max File Size Limit (mxfilzhw, mxfilzlw)

The mxfilzhw and mxfilzlw members of the XCREblk structure permit a maximum file size limit to be specified for a 4-byte or 8-byte file. The file size is specified in bytes.

  • For files over 4 GB, mxfilzhw must be a non-zero value.
  • For each multiple of 4 GB, add one to the mxfilzhw member.

For example, to limit the file size to 8 GB, set the (mxfilzhw, mxfilzlw) pair to (2, 0). To limit the size to 8.5 GB, use the pair of values (2, 2147483648). To indicate no file size limit, set both values to zero.

File Extent Size (lxtsiz, fxtsiz)

c-tree Plus V6.x files are limited to a file extension size of under 64KB. The lxtsiz member of the XCREblk structure can be used to define file extension sizes of up to 2 GB. lxtsiz is specified in bytes. The fxtsiz member specifies the first file extension size applied when the file is created and may be up to 2 GB. For example, to start a file with an initial size of 100 MB, and to have the file grow by an additional 10 MB as more space is required, use these values:


100 * 1024 * 1024 = 104857600


10 * 1024 * 1024 = 10485760

Individual File Disk Space Threshold (dskful)

FairCom DB gives you the ability to turn on/off disk full checking on a file-by-file basis and the ability to define the disk full threshold on a file-by-file basis.

To turn off disk full checks for a particular file, create the file using the 8-byte extended creates (e.g., CreateDataFileXtd8()) and set the ctNOSPACHK bit in the x8mode member of the XCREblk structure on.

To turn on file by file checking with a file specific disk full threshold, set the dskful member of the XCREblk structure to the desired limit at file create time using the extended 8-byte create functions.

To specify the size, in bytes, of the disk-full threshold to be used whenever the file is extended, place the non-zero limit in the dskful member of the XCREblk structure. If extending the size of the file will leave less than the threshold specified in dskful, then the write operation causing the file extension will fail with the error SAVL_ERR (583).

File Encryption Key (filkey)

Whether or not SetEncryption() has been called, setting the filkey member of the XCREblk structure to a non-zero value causes the file to be encrypted using the value of the filkey member as the encryption key.

Relative Partition Key Number (prtkey)

The partition key can be set when the file is created using the prtkey parameter of the extended file creation block. This value defaults to 0, indicating the first key associated with the data file. Set this value to the relative key number for the desired index if the default is not appropriate for your application.