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 DEPENDS data items are unchanged, the DATABridge Client uses a normal update.
- If only one DEPENDS data item is changed, the update is completed as follows—the items that are common to both images are updated first (redundant updates are suppressed if the ds_options bit DSOPT_Use_bi_ai is set). Then, the new entries are inserted if the DEPENDS item increased, or the deleted entries are deleted if the DEPENDS item decreased.
- If more than one DEPENDS data item changes, the update is handled as a DELETE of the BI followed by an INSERT of the AI, meaning that all entries created from the record are replaced.
|