Creating data transformation maps

Data transformation maps are used to transform a document from its current format into another format. Often, an existing data transformation map can be used with conditional mapping commands to produce similar documents with minor variations, but if there is no similar data transformation map, a new map must be created.

The following steps describe how to create a new data transformation map.

  1. Open the Data Transformation Maps list window by clicking the Mapping button in Data Interchange Services client, then clicking the Data Transformation Maps tab.
  2. Click the New button on the Data Transformation Maps list window. The Create a Data Transformation Map - Map Name wizard appears.
  3. Enter the name of the map and a description, then press the Next button.
  4. Indicate whether the map will be source- or target- based, then click Next. In general, it is better to make the map source-based. The map must be target-based if the target document definition contains hierarchical loops and you need to use the special hierarchical loop mapping command (HLLevel()) to create the hierarchical loops. You may also want to make the map target-based if you are very familiar with the target document definition and not very familiar with the source document definition. Source-based maps usually result in more efficient translation of a document.
  5. Select the syntax type of source document definition, then click Next.
  6. Select the name of the dictionary that contains the source document definition, then click Next.
  7. Select the name of the document definition, then click Next.
  8. Specify the syntax type of target document definition, then click Next.
  9. Select the name of the dictionary that contains the target document definition, then click Next.
  10. Select the name of the target document definition, then click Next.
  11. On the Confirmation page, ensure that the information displayed is correct, then click Finish. The map information you entered is saved to the database, the wizard closes, and the Data Transformation Map editor opens.
  12. Click the Comments tab, and type any information you have about the map into the Comments field.
  13. Click the Details tab. In the Details page, perform the mapping tasks necessary to create the mapping commands that instruct the translator component of WebSphere Partner Gateway how to translate the document. At this point, use the various available mapping techniques to create a map. This might include a "drag and drop" from a source field to target field, or the specification of an "assignment command" to set a target field to a specific value. Other mapping commands and mapping functions can be use to format data, convert data from one value to another, or qualify the movement of data based on the content of the source message. "Conditional statements" can be used to provide alternate courses of action for the translator component.
  14. Click the Save button when you are finished. Data Interchange Services client saves the map to the database. It is recommended that you periodically click the Save button to save your changes to the database while you are mapping. The first time a map is saved after mapping commands and comments have been entered, the save process may take a while, especially when the map is based on a large EDI document definition. This is because every node displayed in the Mapping Command page is saved to the database this one time. Subsequent saves will only save changes to the map.
  15. Click File > Close to close the editor when you are finished creating the map.

Copyright IBM Corp. 2003, 2005