Product Documentation

Knowledgebase

Previous Topic

Next Topic

Upgrading V6 Applications

As always, the FairCom DB is designed for immediate use right out of the box.

Applications written for c-tree Plus V6 that include ctreep.h as required will compile and link properly right out of the box. Your application will function exactly as before using the latest FairCom DB library. ctreep.h automatically includes the ctv6v7.h header (described in #defines).

Developers wanting to use HUGE, segmented files or other functionality made available with the Xtd8 file format (see File Formats in the FairCom Programmer's Reference Guide) first introduced in V7 must also:

  • Use the 8-byte file creation functions to create new extended files.
  • Change IFIL definitions for indexes allowing duplicates to store 8-byte offsets for indexes referencing HUGE files.
  • Convert existing data files using the ctcv67 utility.

Note that the ctoptn.h file is now created in a custom.xxx directory where .xxx represents the operational model. This file was previously created in the custom directory.

In This Section

Duplicate Keys

#defines

Previous Topic

Next Topic

Duplicate Keys

For indexes associated with Standard data files, a duplicate key length includes 4 bytes for the associated record position which is used to break ties. If an index is created for a HUGE data file, then the key length must include 8 bytes for the associated record position.

Previous Topic

Next Topic

#defines

The FairCom DB #define constants were modified to use a uniform style of ctWXYZ by appending ct to the beginning of all FairCom DB defines. For example, TRNLOG is changed to ctTRNLOG.

Two header files, ctv6v7.h and ctv7v6.h, provide compatibility.

Add the ctv6v7.h compatibility header file to applications written for c-tree Plus V6.x to automatically change the old defines to the new defines to allow the application to be compiled with the latest version of FairCom DB.

Add the ctv7v6.h compatibility header file to applications written for the latest version of FairCom DB to automatically change the new defines to the old defines to allow the application to be compiled with c-tree Plus V6.x. This header provides “rename #defines” to set the symbols back to their V6 convention.

The following #defines were changed:

ADMOPEN

LKSTATE

RESTRED

AG_LOCK

LOGFIL

RESTRED_BLK

AUTOSAVE

LOGIDX

RESTRSV

AUTOTRN

MIRROR_SKP

SAVECTREE

CHECKLOCK

NONEXCLUSIVE

SAVENV

CHECKREAD

OPENCRPT

SHARED

CIPFASE

OVRFASE

SS_LOCK

DEFERCP

PENDERR

SUPERFILE

DELUPDT

PENDREN

SUSPEND

DISABLERES

PENDRNU

TRANDEP_CRE

DUPCHANEL

PERMANENT

TRANDEP_DEL

ENABLE

PREIMG

TRANDEP_SFM

ENABLE_BLK

READFIL

TRNBEGLK

EXCLUSIVE

READREC

TRNLOG

FREE

READREC_BLK

TWOFASE

GETLKISAM

RESET

VIRTUAL

LK_BLOCK

RESTORE

VLENGTH

 

RESTORE_BLK

WRITETHRU

TOCIndex