# i (index) processing code

The i processing code is stored in the
correlative (attribute 8) of the file-defining items to maintain index
keys. The root FID (VME only) is inserted by the system and must not
be altered.

| System Processors | N/A |
| --- | --- |
| Code Type | File Defining |
| Dictionary Attributes | Correlative |

## Syntax

```
i{sub.code}{root.fid} a.code
```

## Parameter(s)

| sub.code | C | Indicates a case-sensitive index. |
| --- | --- | --- |
| N | Indicates a numeric index. | |
| root.fid | Beginning (FID) address of the index. | |
| a.code | Defines the method by which the index keys are generated. It must be a valid a processing code and reference at least one attribute count within the file. Translates should only be used in accordance with the s (subindex) processing code. | |

## Description

When an index is created using
the create-index command, the system inserts the i code in attribute 8 of the file-defining item along with
the root FID and the a processing code.

If data is present and the index processing code is added directly
to the file-defining item, the pre-existing items are not added to
the index until they are filed. Any *new* items or pre-existing
items that are subsequently filed are automatically added.

If
data is present and the create-index command is
issued, the file-defining item is automatically updated with the index
processing code and added to the index. During the creation of the
index, a counter displays on the screen indicating the number of items
added to the index.

Warning: Never delete an index
processing code directly from the file-defining item. This is the
equivalent of deleting a D-pointer, in that the space for the index
is not returned to the overflow table. Also, never alter a pre-existing
root FID in an index, as this can cause data corruption.

---
Source: https://d3codex.com/processingcodes/i-index-processing-code/ - part of the D3Codex reference.
