Global indexes

Global indexes

Overview

The indexes that are created by Adabas Audit Data Retrieval when a list is read in are list-based indexes. Each of these indexes allows a search in a specific list generation.

Adabas Audit Data Retrieval is also able to create so-called global indexes, which are generated on the basis of list-based indexes (see "Index types").

A global index is a list-independent index, which contains the hit lists of several index generations. Global indexes enable you to search for list generations.

Creating global indexes is optional. Create global indexes if you have to find lists via indexed contents.

For which indexes are global indexes created

The creation of global indexes is triggered via the structure information in the ALOG dataset or the index definition (Index Level = 0).

The processing is controlled via processing instructions at folder level (see "Processing instructions for global indexes").

Validating definitions for global indexes

Definitions are validated as follows for global indexes:

  1. Adabas Audit Data Retrieval checks at reading-in time that the list is assigned to a folder.
  2. B97GLOBL checks that the folder has active processing instructions for a global index.
  3. Adabas Audit Data Retrieval checks at search time that the query mask defined by the layout definition is valid.

    Layout is a required field in the processing instructions of the folder.

Important: Use the same owner

The same Owner must continuously be used in all definitions which are used by a global index! The Owner can also continuously be blank in all definitions.

Of course, global indexes of different owners can also be stored in the same global index database.

GLOBAL Spool

The global indexes are stored in the spool files of the type GLOBAL. Each global index contains the data of an index name. The indexes can originate from the same or different lists.

Each global index only contains data of a fixed period. This limits the amount of data which has to be processed during the update. A new global index is created for this index name after the expiration of this period. This time period is determined in the processing instructions (see "Processing instructions for global indexes").

Updating the global index

The global index update is carried out via the batch utility B97GLOBL. The requests for this utility are administered in the table of the internal global index records (IGL):

  • When the new lists are read in, a request is generated for each newly created index with the index level 0, so that the respective hit list is taken over in the corresponding global index.
  • When the lists are expired, a request is generated for each corresponding index with the index level 0, so that the respective hit list is removed from the corresponding global index.

You can display the internal global index records (IGL) under Option 3 - UTILITIES.

Example

The following illustration shows the local index generations of a list, which are stored in the INDEX spool. The list is read in anew on a daily basis, and a new index is created daily.

The global indexes are stored in the GLOBAL spool. In the example, the creation of a global index started at the beginning of 2008. The processing instructions determine that a new global index is created for every quarter.

The illustration shows how the hit list of the index generation, which was created on August 26, is sorted in the third quarter by B97GLOBL.

Global index

Creating definitions for a global index

These definitions are required, so that global indexes can be created from the local indexes:

  1. Create a query mask (Layout) with input fields (Option 2.6).

    You must create a layout definition with appropriate subordinate layout definitions.

  2. Create a folder definition (Option2.4).
  3. Define a processing instruction for the global index for this folder (Option 2.4, line command G).

    Enter the name of the user-defined query mask (Layout name definition) in the processing instruction, which you have created in Step 1.

  4. Assign the corresponding list to this folder (Option 2.4, line command L).
  5. Create a folder group (Option2.5).
  6. Assign this folder group to the folder which you created in Step 2 (Option2.5, line commandF).

    A folder group allows a global search spanning several folders. A folder group can, for example, represent a subject group. If the global search in your system is always carried out at folder level, create a folder group for each folder.

  7. If you are using index definitions, enter the value 0 (=global) in the Index Level field (Option2.1, line commandIX).

Updating the global index

  1. Read the list(s) in anew in order to create new indexes.

    Check (e.g. under Option 3.1) whether an internal global index record (IGL) has been created for each of the concerned index generations (definition has index level 0).

    PE97IL05 --------------------------------------------- Row 1 of 2
    Command ===> ________________________________________________ Scroll ===> PAGE

    Display Internal Global Index Records Selection : READER

    S - Select D - Delete R - Reset error flag

    Sel Date Time Form Extension Report Mi Md Ok Er
    Owner Folder Index Name RC IC
    02/22/2008 13:25:58 REJ TRADE Y N N N
    CUST001 REJ-TRADE ORDER 0000 0000
    -------------------------------------------------------------------------------
    02/22/2008 13:25:58 REJ TRADE Y N N N
    CUST001 REJ-TRADE CUSTOMER 0000 0000
    -------------------------------------------------------------------------------
    ******************************* BOTTOM OF DATA ********************************







    These IGLs have this status:

    Marked for Insertation : YES Successfully Processed : NO
    Marked for Deletion : NO In Error : NO

  2. Run the batch utility B97GLOBL.

    Expected result:

    The hit lists of the indexes concerned are inserted in the corresponding global indexes.

    Verification:

    The IRMPROT log of B97GLOBL displays that the indexes were processed.

+---------------------------------------------------------------------------------+
| ... |
| START FOR GLOBAL : ordnername |
| INDEX : CUSTOMER# |
| OWNER : ownername |
| |
| START : 01.04.2008 END : 30.06.2008 / (IGL) INSERT : 00001 |
| DELETE : 00000 |
| |
| |
| INDEXES EXPECTED : 000000101204 GLOBAL INDEXES EXPECTED : 000000000000 |
| SELECTED : 000000101204 GLOBAL INDEXES SELECTED : 000000000000 |
| IGNORED : 000000100440 GLOBAL INDEXES DELETED : 000000000000 |
| INSERTED : 000000000764 GLOBAL INDEXES INSERTED : 000000000764 |
| ... |
+---------------------------------------------------------------------------------+

In addition, another status is now displayed for the internal global index records (IGL) under Option 3.n.

Marked for Insertation : YES Successfully Processed : YES
Marked for Deletion : NO In Error : NO

Note on search spanning several indexes

Note the following for searches spanning several indexes:

  • The search in a global index is list-based. This search delivers hits if the search terms occur in the same list.
  • The search in indexed lists is page-based (or item-based). This search delivers hits if the search words occur on the same page (or in the same item).

It is thus quite possible that a global index search returns a list as a hit, but that the subsequent search in the indexed list does not find any hits.