Creating a duplicate to-file member
You can create duplicates to-file members without doing the copy file action again. When your application requires an exact duplicate of the records in the to-file member (if either the from-file is empty or contains data), an alternative solution is to use the Clear Physical File Member (CLRPFM) command:
CLRPFM FILE(X) MBR(XYZ) CPYF FROMFILE(Y) TOFILE(X) TOMBR(XYZ) + MBROPT(*ADD)Because MBROPT(*ADD) is specified, the CPYF command completes normally even if there is no data in file Y. MBR(XYZ) in file X contains an exact duplicate of the records in the member in file Y.
Parent topic:
Copying files: Basic functions