Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctvfyidx - Index Verify Utility

The ctvfyidx utility uses the ctVERIFYidx() function to check the integrity of an index file. The client version of the ctvfyidx utility supports the command-line options listed below.

Usage

ctvfyidx [<option> ...] [-u <userid>] [-p <password>] [-s <servername] <file name> [<member #>]

where <option> is one or more of the following:

  • -excl - Open the file in exclusive mode
  • -delstk - Check delete stack (on by default)
  • -link - Check links (on by default)
  • -leaf - Check leaf nodes (on by default)
  • -chkkey - Check keys in leaf nodes

The optional parameter -page size equals sector size * 128 (third parameter in InitCtree()). If page size is not entered, a default value of 16 will be used. filename specifies the index file targeted for analysis. The member # refers to the index member number. A physical index file can contain one or more indexes. Each index has a member number (0, 1, 2, 3, etc.). For example, the sample index file custordr.idx provided with the FairCom ODBC Driver contains a total of two indexes. Depending on whether you specify 0 or 1 you will be looking at either the order number index or the customer number index. rflg represents an optional recovery flag switch and is only applicable when compiled with TRANPROC. Any character will enable rflg, which will result in c-tree skipping automatic recovery.

The ctvfyidx utility defaults to ctREADFIL. It uses ctEXCLUSIVE when the ‑excl option is specified. A ctREADFIL open will fail with error 12 and sysiocod ‑8 if any connection has the file open for write access.

Example

Below is an example of launching ctvfyidx along with output showing the results of the index verification.

# ctvfyidx -2048 custmast.idx 0

Index page scan finds entries=4 header=4

Index nodes per level of tree structure - [0: 1]

Internal Index Verify: SUCCESSFUL

TOCIndex