Call sequence of Data Capture exit routines

A Data Capture exit routine is invoked once per segment update for each segment for which the Data Capture exit routine is specified. Data Capture exit routines are invoked multiple times for a single call under certain conditions.

This topic contains Product-sensitive Programming Interface information.

The conditions in which a Data Capture exit routine is invoked multiple times for a single call include:

When multiple segments are updated in a single application program call, Data Capture exit routines are invoked in the same order in which IMS physically updates the segments:

  1. Path inserts are executed top-down in DL/I. Therefore, a Data Capture exit routine for a parent segment is called before a Data Capture exit routine for that parent's dependent.
  2. Cascade deletes are executed bottom-up. All dependent segments' exits are called before their respective parents' exits on cascade deletes. IMS physically deletes dependent segments on cascade deletes only after it has validated the delete rules by following the hierarchy to the lowest level segment. After delete rules are validated, IMS deletes segments starting with the lowest level segment in a dependent chain and continuing up the chain, deleting the highest level parent segment in the hierarchy last. Data Capture exit routines specified for segments in a cascade delete are called in reverse hierarchical order.
  3. Path replaces are performed top-down in IMS. In Data Capture exit routines defined against segments in path replaces, parent segments are replaced first. All of their descendents are then replaced in descending hierarchical order.

When an application program does a cascade delete on logically related segments, Data Capture exit routines defined on the logical child are always called before Data Capture exit routines defined on the logical parent. Data Capture exit routines are called even if the logical child is higher in the physical hierarchy, except in recursive structures where the delete results in the deletion of a parent of the deleted segment.