Copying files that contain user-defined types
You can specify CRTFILE(*YES) on the CPYF and CPYFRMQRYF commands when you copy files that contain user-defined types (UDTs). If the from-file is an SQL table, view, or index that contains a UDT, these commands create an SQL table.
You can copy UDTs to other UDTs using FMTOPT(*MAP), provided that you are copying from and to the same (identical) UDT. You can also copy from a non-UDT to a UDT, provided that the source type is compatible. Data mapping is not allowed if you are copying between UDTs that are not identical. Also, data mapping is not allowed if you are copying from a UDT to a non-UDT.
You cannot copy distributed data management (DDM) files that contain user-defined types to System i™ products.
Parent topic:
Copying complex objects
Related information
CPYF command
CPYFRMQRYF command