Editing the field mapping

You can edit the field mapping either when performing a copy or a compare, or by using the Template Workbench panel.

To access the field mapping when performing a copy, you must have specified both a “From” and a “To” template and selected the Edit template mapping option in the “To” panel (see Copying with a copybook or template).

To access the field mapping when performing a compare, you must have specified both an “Old” and a “New” template in the first two panels and selected the 2. Formatted Compare Type and Edit template mapping option in the third panel (see Comparing data sets).

To edit the field mapping from the Template Workbench panel:

  1. On the Template Workbench (option 7) panel, specify a copybook or template that you plan to use for a “From” or “Old” template.

    Although you need to specify this template before you can begin to edit the field mapping, you do not edit the mapping in this template: field mapping information is stored in the template that you specify on the next panel (“To” or “New”).

  2. Enter either an MC (Map from copybook) or an MT (Map from template) command.
  3. On the Map From panel, specify a copybook (if you want to create a new template) or an existing template that you plan to use for a “To” or “New” template.
  4. Enter an EM (Edit mapping) command to edit the field mapping in that template.
Note: Template mapping information is used by both the Compare and Copy Utilities. When using the Template Workbench , the panel labels are those used by the Copy Utility (“From” and “To”).

Regardless of the method used to edit the field mapping, one of the following occurs:

To edit the mapping for a particular record type in the “To” template, type an S in the adjacent Sel column and press Enter.

Z Data Tools displays the Field Mapping panel, showing the existing mapping between the fields in the “To” template record type and fields in the “From” template.