Extracting and loading DEDB databases with sequential dependent segments

Sequential dependent (SDEP) segments are stored in the sequential dependent part of the DEDB area in the chronological order in which they were inserted without regard to the root or unit of work (UOW) that contains the root. The SDEP segment is then retrieved in a last-in first-out (LIFO) sequence by DL/I calls. Hence, when they are viewed, SDEP segments under a single root are in reverse of the insertion sequence.

Example database after inserting six SDEP segments under two different roots:

CUSTROOT  ..00000001 CUSTROOT SEGMENT
CUSDEPSG  .. 5TH SEGMENT INSERTED
CUSDEPSG  .. 4TH SEGMENT INSERTED
CUSDEPSG  .. 1ST SEGMENT INSERTED
CUSTROOT  ..00000010 CUSTROOT SEGMENT
CUSDEPSG  .. 6TH SEGMENT INSERTED
CUSDEPSG  .. 3RD SEGMENT INSERTED
CUSDEPSG  .. 2ND SEGMENT INSERTED

The design of the SDEP segments allows for better performance when inserting SDEP segments or when processing the SDEP segments using the Sequential Dependent Scan or Sequential Dependent Delete Fast Path utilities. However reading the sequential dependent segments via DL/I calls is slower.

Sample result of the sequential scan utility:

1ST SEGMENT INSERTED
2ND SEGMENT INSERTED
3RD SEGMENT INSERTED
4TH SEGMENT INSERTED
5TH SEGMENT INSERTED
6TH SEGMENT INSERTED

The SDEP segments can only be deleted by deleting their root segments or by using the IMS Fast Path Sequential Dependent Delete Utility. Since IMS only allows sequential dependent segments to be inserted and not replaced, care must be taken when loading DEDB databases with SDEP segments to avoid duplicate segments being created.

To avoid duplicating SDEP segments, the Fast Path Sequential Dependent Delete Utility can be run to remove the existing SDEPs. When running this utility you need to consider the following:

  • Prior to running the Utility, you may want to run the Fast Path Sequential Dependent Scan utility to read the SDEPs to be deleted.
  • The Sequential Dependent Delete utility removes the SDEPs from the earliest SDEP inserted until a point you specify. There is no way to specify individual root segment sequential dependents, so be aware you may be deleting other user's data.
Note: For more information on the Fast Path Sequential Dependent Scan and Sequential Dependent Delete Utilities, please refer to the IMS Utilities Reference: Database and Transaction Manager.