Mapping fields (MC or MT)

When you copy data from one data set to another, or compare data in two data sets, you can first provide:
  • A template describing the record structure of the input (Copy) or first (Compare) data set
  • A template describing the record structure of the output (Copy) or second (Compare) data set
You can then describe the relationship between these record structures (known as field mapping). Field mapping can be created and edited from the Template Workbench, using the MC or MT primary commands, or it can be done “on the fly”, within the Copy or Compare Utilities.

Within the Template Workbench and the Copy Utility, the templates are known as the “From” and “To” templates. Within the Compare Utility, they are known as the “Old” and “New” templates. However, the template definitions and field mapping information are independent of any utility and templates intended for use in the Compare Utility can still be created and edited in the Template Workbench.

You specify field mapping information in the “To” (or “New”) template. For each field in the “To” template, the field mapping defines which field in the “From” (or “Old”) template (if any) are copied to or compared with the field in the “To” template.

Before editing field mapping in a “To” template, you need to specify a “From” template, using either the MC (Map from copybook) or MT (Map from template) command.

To use a copybook to create a new “From” template, specify a copybook on the Template Workbench, then enter the MC command.

To use an existing template as the “From” template, specify an existing template on the Template Workbench, then enter the MT command.

After you enter an MC or MT command, File Manager displays the Map To panel, where you can specify a “To” template, and use the EM or GE commands to begin editing its field mapping (see Map To panel).

Related topics