Example using Alternate Indexes

The ability to view a Data Table with a different key or organization or search method using an Alternate Index can be accomplished in one of two ways:

  • through a permanent definition (one that is stored on the tableBASE library)
  • through a temporary definition (an alternate that has been invoked with a definition supplied at the time of invocation). A permanent Alternate Index may be Opened (OR/OW), or invoked using the IA command; a temporary Alternate Index must be Invoked using IA.

The example uses a sample table called, “EXAMPLE” that is supplied with the product. There are two types of alternate indexes, a permanent alternate index, and a temporary alternate index (see Figure 108).

Temporary Alternate Index
Figure 108. Temporary Alternate Index

The open mode (OR/OW) of the Data Table or Alternate View is not significant with respect to the examples. However, if you intend to update the changes to the library you must open the Data Table for write using the OW command.