Using an inverted hierarchy


BMC AMI Fast Path Indexer for IMS supports an inversion of hierarchy up to the root segment for retrieval processing.

BMC AMI Fast Path Indexer for IMS does not physically invert the hierarchy for an alternate processing sequence method. It does not add extra pointers to the primary DEDB or any associated indexes. To indicate to BMC AMI Fast Path Indexer for IMS that you want to use an alternate processing sequence, you must use the PROCSEQ keyword. A retrieval can proceed no further than the root.

The inversion of hierarchy feature is not unique to BMC AMI Fast Path Indexer for IMS; IMS also inverts the hierarchy when you include the PROCSEQ keyword on the PCB. However, IMS does not view the PROCSEQ keyword located on the primary DEDB as the true PROCSEQ and does not invert the SENSEG statements that follow the PCB. You must code the SENSEG statements in the original processing sequence order.

When you indicate an alternate processing sequence by using an unqualified GET NEXT (GN) call, BMC AMI Fast Path Indexer for IMS begins at the target segment and processes in reverse order (from the left) until it reaches the root segment. Primary DEDB with an inverted hierarchy illustrates an inverted example of the primary DEDB.

Primary DEDB with an inverted hierarchy

GUID-2000C013-F024-41CF-9BE8-4EE1B5F716D9-low.png

When using an inverted hierarchy, BMC AMI Fast Path Indexer for IMS works in a way similar to the way that IMS works: it begins at the Instructor segment, proceeds to the Location segment, then proceeds to the Course segment. BMC AMI Fast Path Indexer for IMS proceeds along a hierarchical path of the target segment only, up to the root segment when you issue an unqualified GN call.

The PSB shown in the following figure illustrates a PCB for a full-function database that is inverted:

PCB    TYPE=DB,PROCSEQ=DIVSI2,DBDNAME=FULLFUNC,
       KEYLEN=24,PROCOPT=A
SENSEG NAME=INSTR,PARENT=0
SENSEG NAME=LOCN,PARENT=INSTR
SENSEG NAME=COURSE,PARENT=LOCN
SENSEG NAME=STUDENT,PARENT=LOCN

The PSB shown in the following figure illustrates a PCB for a primary DEDB that will be inverted by BMC AMI Fast Path Indexer for IMS:

PCB    TYPE=DB,PROCSEQ=DIVSI2,DBDNAME=DIVSSD,
       KEYLEN=24,PROCOPT=A
SENSEG NAME=COURSE,PARENT=0
SENSEG NAME=LOCN,PARENT=COURSE
SENSEG NAME=INSTR,PARENT=LOCN
SENSEG NAME=STUDENT,PARENT=LOCN

The segment search argument (SSA) shown in the following figure could be used with a full-function database or a BMC AMI Fast Path Indexer for IMS database:

Segment search argument (SSA) for an inverted database

GU  INSTR  *---(SRCVALU    EQ0000070000)
    LOCN   *---(LOCNCD     EQDDDDD)
    COURSE *---(COURSE#    EQ00005)

Using the inverted hierarchy illustrated in Primary DEDB with an inverted hierarchy, your application program cannot access the Prerequisite segment because this segment is located beyond the original root segment. Therefore, the SSA shown in the following figure is invalid. The call would return an AC status code.

GU  INSTR     *-(SRCVALU  =80000)
    LOCN      *-(LOCNCD   =AAA)
    COURSE    *-(COURSE#  =12345)
    PREREQ    *-(PREREQ#  =23456)

Like an unqualified GET UNIQUE (GU) call, an unqualified GN call cannot proceed beyond the root segment. An unqualified GN call will retrieve only those segments that are in a direct line from the target segment to the root segment.

Using the inverted hierarchy illustrated in Primary DEDB with an inverted hierarchy, if you issued another unqualified GN call, the next Instructor segment would be retrieved.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Fast Path Indexer for IMS 4.1