Using User Index APIs

A user index is an object that allows search functions for data in the index and automatically sorts data based on the value of the data. User indexes are permanent objects in the user domain or in the system domain. They have an object type of *USRIDX and a maximum size of 1 terabyte (1 099 511 627 776 bytes). They help streamline table searching, cross-referencing, and ordering of data. In general, if your table is longer than 1000 entries, an index performs faster than a user-sorted table.

You can use user indexes to:

User index entries cannot contain a pointer. You can save and restore all the data in an index. You can also save and restore user indexes to another system. For more information about user index considerations, see User index considerations.

In addition to the user index APIs, you can work with user indexes through the following:

For detailed descriptions of the MI instruction fields and the formats of those fields, see the IBM® i Machine Interface topic collection. For details about the DLTUSRIDX command, see the Control language topic collection.


[ Back to top | Object APIs | APIs by category ]