You can use the RCDFMT parameter to select records of a certain record format to copy. Note that you can use this parameter on the CPYF command only.
When you copy from a logical file to a physical file and the logical file has more than one record format, you must specify a record format name unless you specify FMTOPT(*NOCHK). If you use FMTOPT(*NOCHK), then you can specify RCDFMT(*ALL) to copy all from-file record formats to the to-file. The command uses this record format name to select records to copy.
CPYF FROMFILE(DSTPRODLB/ORDFILL) + TOFILE(DSTPRODLB/INVOICE) RCDFMT(ORDHDR) + MBROPT(*ADD)
When you copy from a logical file that has more than one record format to a device file, you can specify either a single record format to be used or specify RCDFMT(*ALL) to copy using all the record formats. If the record formats have different lengths, the command pads the shorter records with blanks.