Optimization of loading
The statistics for BANANA in the example indicate that only a range of key values, from the middle of the source data set, is required in the data table.
These statistics are shown in Figure 1. Here, the XDTRD exit (described in XDTRD user exit) has been used to skip over any keys that are not in this range.
Adds rejected - Exit shows the number of times
the exit returned a non-zero return code, and is 2 in this case:
1 for when the first record in the source data set was presented,
and the exit requested the load to skip on to the first key in the
intended range, and 1 for when the first key beyond this range was
presented, and the exit requested the load to skip over all remaining
records to the end of the source data set.
In a case like this, you would usually use the XDTAD exit to reject any records that are written with keys outside the intended range. Then the number of Adds rejected - Exit would include the number of such records that had been written to the file.
The number of Adds from Reads contains the number of records that were loaded into the data table plus the two that were rejected. As for all the file and data table statistics, this figure shows the number of attempted, rather than the number of successful, writes.