The indexing system provides a variety of information in the dictionary record of an indexed field.   Depending on the type of indexing, different information is maintained.   You will have to edit the dictionary record of every field in the table that was indexed.  Use the System Editor for this.  The edits are described below:

BTree Dictionary Cleanup

Field 6 of the dictionary record tells the system whether or not this field has a Btree index. If there is a 1 in this field, the field has had a Btree index applied.  If there is 0 in this field, no BTree index is active.

For example, to remove the Btree index indicator for FNAME in the CUSTOMERS dictionary, do the following:

  1. From the System Editor, edit the FNAME row in the DICT.CUSTOMERS table.

  2. Change Field 6 from a 1 to a 0, to indicate that no BTree index is active.

  3. Save the row.

Do the same process for the LNAME row in the DICT.CUSTOMERS table, to indicate that the BTree index on LNAME has been removed.

Cross Reference Dictionary Cleanup

When a Cross Reference index is placed on a field, a symbolic field is created to maintain the index. This field can be identified by the _XREF suffix.  There is also a pointer in the field's dictionary pointing to this field, which must be deleted as well.  

To cleanup the dictionary for the CUSTOMER_NAME cross reference index, do the following:

  1. Delete the CUSTOMER_NAME_XREF field from DICT.CUSTOMERS.  From the System Editor and at the Exec: line, type:

    run delete_row 'DICT.CUSTOMERS','CUSTOMER_NAME_XREF'.
  2.  A pointer to CUSTOMER_NAME_XREF exists in the CUSTOMER_NAME field of DICT.CUSTOMERS.   This pointer is in Field 22.  Edit the CUSTOMER_NAME field in DICT.CUSTOMERS.  In Field 22, you should see the text CUSTOMER_NAME_XREF.  Delete this text (don't delete any carriage returns, just the text!) and save the record.

This completes the procedure for removing cross reference information from a dictionary.

Relational Index Cleanup

Although not illustrated in this example, relational indexes also need dictionary cleanup.  Relational indexes use several fields in the dictionary record to store their control information.  To cleanup the dictionary for a relational index, do the following:

  1. In the record that serves as the target of the relational index, change the 1 on line 25, which tells the system that this field's data is protected, to a 0.

  2. Line 24 contains the name of the relational index; this should be deleted.

  3. To completely remove the relational index, the dictionary of the source file must also be edited. In that dictionary, the source field will have the name of the related field on line 23. Delete this line.

  4. Save the records and exit.

  • No labels