Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctcv67 - Extended File Conversion Utility

ctcv67 <old file name> <new path> [<option> <argument> ...]

The first two arguments are required. The new path is prepended to the old file name or the files in the parameter file. The options are listed in the table later in this topic.

ctcv67 performs various conversions, including:

  • Converting data and index files from Standard FairCom DB format to Extended c‑tree format (HUGE or non-HUGE) using Incremental ISAM (IFIL) or parameter files.
  • Adding huge file support to a non-huge file.
  • Adding, removing, or changing segment support.
  • Automatically compacting the output file.

Note: ctcv67 must be built by FairCom. An executable version is included in the FairCom Server installation for each platform, in the Utils folder.

If the original file has an extended header, the new file inherits the extended header attributes. This utility does not convert a huge file to a non-huge file. If a superfile host is specified, ctcv67 converts all member data files and their associated indexes. When a mirrored file is specified, the conversion does NOT produce the mirrors, but maintains the mirrored names in IFIL structures. Copy the converted master files to produce the mirror files.

Unless a parameter file is used, a data file must have an embedded IFIL definition for its associated indexes to be converted. A data file will have an embedded IFIL definition if it was created with one of the CreateIFile() routines or PutIFile() was called for the file.

If an index file is specified by the <old file name> parameter, then a new index file with an extended header will be created, all the resources will be transferred to the new index, its key length will be increased if HUGE is specified and the key supports duplicates, but no key values will be transferred to the new file. In essence, it will be an empty index file.

The following options are available:





<yes | no>

If yes, <old file name> is a parameter file with file modes set to ctREADFIL (8) and the second parameter (# of files) doubled. PP ignored. Default: no


<yes | no>

Set to yes to output the names that will be assigned to the converted files along with pro forma segment specifications. This option is for information purposes only: No actual conversion takes place. Default: no


<page size>

Sets the page size in bytes used to create the new files. This setting must be compatible with the existing file. Default: 8192


<yes | no>

Set to yes to have the conversion run the Superfile prepass. Default: no


<yes | no>

Set to yes to enable 6-byte transaction number support. This option is recommended for all files using FairCom Server Version 8 and later. Default: no


<yes | no>

Set to yes to create a huge file. Default: yes


<new segment host file name>
<host segment size in MB>

The new file name of a data or index file to be created as a segmented file. Derive this name from the new path and the file’s original name. (The T option can be used to check on the new name assigned to a file.) Use a G entry for each new file to be segmented.

Note: Even if the old file is segmented, segments must be specified for the new file or it will no longer be segmented.


<segment name>
<segment size in MB>

This option must follow immediately after the G option for the associated host file. Repeat this option as necessary to create all the additional segments of the file. The segment name will be used exactly as specified. The new path will NOT be prepended to the name.


<max # auto segments including host>

Use as many S <name> <size> entries as needed or OR one A <max> entry for each host. The S or A entries for each host must follow immediately after each host's G entry.


<encryption method>

Specify a valid ctSETENCRYPT() mod value (see SetEncryption). For example: ctAES32 for AES with a 32-byte key.


<File Extension size in Bytes>

Note: 2GB maximum.


<Temp file directory>

Defaults to .\


ctcv67 vcusti new H no G new\vcusti.ndx 10 S e:\vc.s01 10 S f:\vc.s02 0


  • vcusti is the existing file name.
  • new is the new path.
  • H no creates a normal file rather than a huge file.
  • G new\vcusti.ndx 10 sets the new segment host file name to new\vcusti.ndx and the host segment size to 10 MB.
  • S e:\vc.s01 10 S f:\vc.s02 0 creates the following segments:

    e:\vc.s01 with a size of 10 MB.

    f:\vc.s02 with a size of 0 MB.

Ordinarily, the new path name is simply prepended to the original file name. If both have absolute names, the new (absolute) path replaces the absolute portion of the original name. If only the original file is absolute, the new (relative) path is inserted immediately after the absolute portion of the original file name. Otherwise, the new path (relative or absolute) is prepended to the original (relative) file name.

For example, to convert the data file C:\DATA\SAMPLE.DAT and its associated index, C:\DATA\SAMPLE.IDX, into huge files with three segments of 2000 MB each, use the following command line:



Even if the original file is segmented, the new file will not be segmented unless a new segment definition is specified using the ‘G’ and ‘S’ options.

The associated indexes are recreated based on the IFIL resource embedded in the data file or based on the parameter file information. If the associated data file becomes huge, index files allowing duplicate records will have their key lengths automatically increased by 4 bytes to accommodate the longer associated position information used to break the tie. If you recall, when allowing duplicate key values in an index, you must add 4 bytes to the key length. For huge files, you must add a total of 8 bytes. In addition, the index file names in the IFIL definition will reflect the new path name.

ctcv67 creates (or appends to) a text file named CV67.REP, which reports on the actions and progress of the utility program.