When you specify *ADD, each record copied is added to the end of the existing records in the member.
It is important to note that this is always true, even for keyed files. However, with keyed files, the added records appear to be merged in key sequence when accessed through a keyed access path. When copying from query files, the relative record numbers of the resulting file might not correspond to those in the original file.
When *ADD is specified, the copy completes normally even if the from-file contains no records.
When three files are copied with MBROPT(*ADD) to a database
file that is not keyed, the resulting to-file looks like the following figure:
If you specify MBROPT(*ADD), FROMKEY(1 2), and TOKEY(1 5), four records are added in key field order to the end of FILEDB2.
The added records, however, appear to be merged in the new file when viewed through a keyed sequence access path.
There are several ways to select records for copying . One method is selection by relative record number. Using the preceding example, if you selected records to copy to a third file from FILEDB2 by relative record number, from number 3 through 5, you would copy the records with a key value of 24, 2, and 3, not 4, 5, and 9.