Comparing with the default field mapping

The following field mapping between Old and New templates could be generated:

Figure 1. Example of default field mapping


"Old" template             "New" template

OLD-TYPE-A       ─►        NEW-TYPE-A ❶
  FIELD-A1         ─►          FIELD-A1
  FIELD-A2         ─►          FIELD-A2
  FIELD-A3 ❷

OLD-TYPE-B       ─►        NEW-TYPE-B
  FIELD-B1         ─►          FIELD-B1
  FIELD-B2         ─►          FIELD-B2
                                     FIELD-B3 ❸

OLD-TYPE-C                  REC-TYPE-C ❹
  FIELD-C1                     FIELD-Z1
  FIELD-C2                     FIELD-Z2

With the above field mapping, an Old data set containing one record of each type defined in the Old template:
├─ FIELD-A1 ─┼─ FIELD-A2 ─┼─ FIELD-A3 ─┤  ◄─ OLD-TYPE-A

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

├─ FIELD-C1 ─┼─ FIELD-C2 ─┤               ◄─ OLD-TYPE-C
and a New data set containing one record of each type defined in the New template:
├─ FIELD-A1 ─┼─ FIELD-A2 ─┤               ◄─ NEW-TYPE-A

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

├─ FIELD-Z1 ─┼─ FIELD-Z2 ─┤               ◄─ REC-TYPE-C
would be compared as follows:
  • FIELD-A1 in the NEW-TYPE-A record is compared to FIELD-A1 in the OLD-TYPE-A record.
  • FIELD-A2 in the NEW-TYPE-A record is compared to FIELD-A2 in the OLD-TYPE-A record.
  • FIELD-A3 in the OLD-TYPE-A record is not compared with any field in any record in the New data set. ❷
  • FIELD-B1 in the NEW-TYPE-B record is compared to FIELD-B1 in the OLD-TYPE-B record.
  • FIELD-B2 in the NEW-TYPE-B record is compared to FIELD-B2 in the OLD-TYPE-B record.
  • FIELD-B3 in the NEW-TYPE-B record is not compared with any field in any record in the Old data set.❸
  • The REC-TYPE-C records are not compared because there is no mapping match between the fields in the OLD-TYPE-C record and any record in the New template.❹
Notes:
File Manager 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.
There is no matching FIELD-A3 in the New template NEW-TYPE-A, so this field is not mapped and is not used in the comparison.
There is no FIELD-B3 in the Old template to map to this FIELD-B3 in the New template, so this field is not mapped and is not used in the comparison.
There are no fields named FIELD-C1 or FIELD-C2 in any record type in the New template, so the OLD-TYPE-C record type in the Old template is not paired with a record type in the New template.

The New data in the REC-TYPE-C record is reported using the field descriptions in the NEW-TYPE-A record type. This is because the templates do not contain record identification criteria and NEW-TYPE-A is the first record type in the New template with a length matching the length of the REC-TYPE-C record in the New data set.

The Old data is not reported because there is no mapping match between the fields in the OLD-TYPE-C record and any record in the New template. Instead, the message " *** Old data is not mapped to any data *** " is reported.