SSAs with secondary indexes

If your program uses a secondary index, you can use the name of an indexed field in your SSAs. When you do this, IMS goes directly to the secondary index and finds the pointer segment with the value you specify. Then IMS locates the segment that the index segment points to in the primary database and returns the segment to your program.

To use an indexed field name in the SSA, follow these guidelines:

If you modify the XDFLD of the indexed segment (using the REPL call), you lose any parentage that you had established before issuing the REPL call. The key feedback area is no longer valid after a successful REPL call.

For example, to index the PATIENT segment on the NAME field, the segment must have been defined on the XDFLD statement in the DBD for the medical database. If the name of the secondary index database is INDEX, you specify PROCSEQ=INDEX in the PCB. To issue a qualification that identifies a PATIENT by the NAME field instead of by PATNO, use the name that you specified on the XDFLD statement. If the name of the XDFLD is XNAME, use XNAME in the SSA, as follows:
In the DBD:
XDFLD NAME=XNAME
In the PSB:
PROCSEQ=INDEX for full-function secondary index databases or PROCSEQD=INDEX for Fast Path secondary index databases
In the program:
GU PATIENTb(XNAMEbbb=bJBBROKEbbb)

A qualified GU/GN segment name with SSA using the primary key field for target=root segment is supported when a primary DEDB database is accessed through its secondary index using a PCB with the PROCSEQD= parameter.

A qualified GU/GN segment name with SSA using the primary key field for target=dependent segment is not supported. An AC status code is returned for the qualified Get call when a primary DEDB database is accessed through its secondary index using a PCB with the PROCSEQD= parameter.