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:
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:
Option |
Arguments |
Description |
---|---|---|
F |
<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 |
T |
<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 |
P |
<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 |
PP |
<yes | no> |
Set to yes to have the conversion run the Superfile prepass. Default: no |
6 |
<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 |
H |
<yes | no> |
Set to yes to create a huge file. Default: yes |
G |
<new segment host file name> |
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. |
S |
<segment name> |
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. |
A |
<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. |
E |
<encryption method> |
Specify a valid ctSETENCRYPT() mod value (see SetEncryption). For example: ctAES32 for AES with a 32-byte key. |
L |
<File Extension size in Bytes> |
Note: 2GB maximum. |
TP |
<Temp file directory> |
Defaults to .\ |
Example:
ctcv67 vcusti new H no G new\vcusti.ndx 10 S e:\vc.s01 10 S f:\vc.s02 0
where:
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:
ctcv67 C:\DATA\SAMPLE.DAT C:\HUGEDATA\ H yes
G C:\HUGEDATA\DATA\SAMPLE.DAT 2000 S D:\HUGEDATA\SAMPLE.SG1 2000 S E:\HUGEDATA\SAMPLE.SG2 2000 G C:\HUGEDATA\DATA\SAMPLE.IDX 2000 S D:\HUGEDATA\SAMPLE.IS1 2000 S E:\HUGEDATA\SAMPLE.IS2 2000
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.