Copying with the default field mapping

A field mapping between “From” and “To” templates could be generated as:

Figure 1. Example of default field mapping

“From” template             “To” template

REC-TYPE-A         ─►        NEW-TYPE-A  1 
  FIELD-A1         ─►          FIELD-A1
  FIELD-A2         ─►          FIELD-A2
  FIELD-A3  2 

REC-TYPE-B         ─►        NEW-TYPE-B
  FIELD-B1         ─►          FIELD-B1
  FIELD-B2         ─►          FIELD-B2
                               FIELD-B3  3 

REC-TYPE-C   4                 REC-TYPE-C  5 
  FIELD-C1                     FIELD-Z1
  FIELD-C2                     FIELD-Z2

Given an input data set that consists of three records (one of each type defined in the “From” template), like this:
├─ FIELD-A1 ─┼─ FIELD-A2 ─┼─ FIELD-A3 ─┤  ◄─ REC-TYPE-A

├─ FIELD-B1 ─┼─ FIELD-B2 ─┤               ◄─ REC-TYPE-B

├─ FIELD-C1 ─┼─ FIELD-C2 ─┤               ◄─ REC-TYPE-C
then copying the input data set would result in an output data set like this:
├─ FIELD-A1 ─┼─ FIELD-A2 ─┤               ◄─ NEW-TYPE-A  2 

├─ FIELD-B1 ─┼─ FIELD-B2 ─┼─ FIELD-B3 ─┤  ◄─ NEW-TYPE-B  3 

├─ FIELD-C1 ─┼─ FIELD-C2 ─┤               ◄─ REC-TYPE-C  4 

Notes®

 1 
Z Data Tools pairs record types by matching field names within the record types; the names of the record types (level-01 group items, in the copybooks) are not important.
 2 
There is no matching FIELD-A3 in the “To” template NEW-TYPE-A, so this field is not copied to the output data set.
 3 
There is no FIELD-B3 in the “From” template to map to this FIELD-B3 in the “To” template. The field is inserted in the output data set; its value is initialized according to the field create attributes (if they exist) in the “To” template, or to zero (if it is a numeric field) or blanks (if it is an alphanumeric field).
 4 
There is no record type in the “To” template containing fields named FIELD-C1 or FIELD-C2, so the REC-TYPE-C record type in the “From” template is not paired with any record type in the “To” template (even though the “To” template contains a record type named REC-TYPE-C). The REC-TYPE-C record from the input data set is copied intact to the output data set. To stop this record from being copied, you need to edit the “From” template and deselect the REC-TYPE-C record type.
 5 
The REC-TYPE-C record type definition in the “To” template is unused, and has no effect on the copy.