Handling Unflattened OCCURS DEPENDING ON Clauses
To handle a changing depends item, the DATABridge Client uses before‑image/after‑image (BI/AI) pairs for data sets that have items with OCCURS DEPENDING ON clauses that are not flattened.
First, the DATABridge Client checks the old and new values of the DEPENDS data item to determine how to execute the modify. The modify is handled in one of the following ways:
- If the value of the DEPENDS data item is unchanged, the DATABridge Client updates the corresponding rows in the secondary tables as usual. (Redundant updates are suppressed if the ds_options bit DSOPT_Use_bi_ai is set.)
- If the value of the DEPENDS data item increases from m to n, the first m items are updated normally. The newly added items (m+1 through n) are inserted into the secondary table.
- If the value of the DEPENDS data item decreases from m to n, the first n items are updated normally. Items that are no longer present (n+1 through m) are deleted from the secondary table.