Position after ISRT
After you add a new segment occurrence to the database, current position immediately follows the new segment occurrence.
GN
call would retrieve segment D111. ISRT Abbbbbbb(AKEYbbbb=bA1)
Bbbbbbbb(BKEYbbbb=bB11)
Cbbbbbbb
If you are inserting a segment that has a unique key, IMS places the new segment in key sequence. If you are inserting a segment that has either a non-unique key or no key at all, IMS places the segment according to the rules parameter of the SEGM statement of the DBD for the database. the topic "ISRT Call" in IMS Version 15.3 Application Programming APIs explains these rules.
If you insert several segment occurrences using the D command code, current position immediately follows the lowest segment occurrence that is inserted.
ISRT Abbbbbbb(AKEYbbbb=bA1)
Bbbbbbbb
*D
Cbbbbbbbb
You do not need the D command code in the SSA for the C segment. On ISRT
calls,
you must include the D command code in the SSA for the only first segment you are inserting. After
you issue this call, position immediately follows the C segment occurrence with the key of C141.
Then, if you issue an unqualified GN
call, IMS
returns segment E11.
If your program receives an II status code as a result of an ISRT
call (which
means that the segment you tried to insert already exists in the database), current position is just
before the duplicate of the segment that you tried to insert.
