File types and copying
There are considerations when you copy files of one type to files of another type. When the from-file and to-file are different types (source and data), the following statement is true. For the CPYFRMQRYF command, the from-file is always treated as a data file:
- If the from-file or to-file is a device file (or an inline data file), the copy function will automatically add or delete the source sequence number and date fields for each record copied.
- If the from-file and to-file are database files, specify FMTOPT(*CVTSRC) to perform the operation. The sequence number and date fields are added or deleted as they are for a device file, and the data part of each record is copied without regard to the field definitions in the file record formats. For a source physical to-file, you can use the SRCSEQ parameter to control how sequence numbers are created if you also specified SRCOPT(*SEQNBR).
Parent topic:
Copying files: Basic functions