IBM Information Management System (IMS)

 View Only

 Does IMS use an algebraic or logical comparison when deciding where to insert a dependent segment with a key field defined with SEQ,U?

Don Leahy's profile image
Don Leahy posted Thu June 19, 2025 10:41 AM

We have a DEDB with a direct dependent segment that typically has many occurrences.  The segment has a key field defined as SEQ,U in the DBD.  It uses TYPE=P.

We are experimenting with the idea of using a negative number for the key, but IMS seems to ignore the sign of the field.  As a result, a segment with key  x'0002003011303013214035371D' is inserted after a segment with  x'0002002111902324021906632D'   This makes sense if the comparison is logical not algebraic (which would take the sign into account).

Thanks.  We are not married to this idea; if IMS does indeed use a logical comparison then we will try something else. 

Don Leahy's profile image
Don Leahy

We are not pursuing this approach any more.  The intent was to store the segments in descending date/time sequence.  We can achieve this by converting the key to its 9s complement before the ISRT call.   This is just a proof of concept for us; the objective is to speed up direct dependent segment ISRTS when the twin chain is long.