Content-length: 3610 Content-Type: text/html; charset=UTF-8
Midrange Information, Tips and Techniques
by Brian Coy
New with V3R6: MBROPT(*UPDADD)
As of V3R6, the value *UPDADD is acceptable for the MBROPT (member option) parameter of the CPYF (Copy File) command.
To review, *ADD means that the records of the "from" file (the files being copied) are added to the end of the "to" file (the file to which records are being copied). *REPLACE means that the "to" file is cleared, and the records of the "from" files replace the records of the "to" file.
You may use *UPDADD if the "to" file is uniquely keyed. When a record of a "from" file has the same key field values as a record of the "to" file, the "to" file record is updated. If a "from" file record does not match any record in the "to" file, the record is added to the end of the "to" file.