LANSA Composer includes a number of examples of Transformation Maps that illustrate selected features and techniques.
If the examples are not present in your LANSA Composer system, you can locate and import all or selected examples from the supplied DX_MASTER_EG.dxexport import file. This file should be present in your LANSA Composer client installation in the DXImports folder, for example: C:\Program Files\LANSA Composer\X_WIN95\X_LANSA\X_LIC\EXECUTE\DXImports
The following example Transformation Map us supplied with this version of LANSA Composer:
Name | Description |
|---|---|
| Transformation map using a simple output |
Here are some suggestions on how to get the most out of the example Transformation Maps:
MapForce version 2015, release 3 (2015R3) introduced support for a new type of "simple output" component.
LANSA Composer supports this type of component, allowing your map to return a string value to a LANSA Composer Processing Sequence.
You could use this ability to perform simple interrogations of all file types supported by MapForce or to perform validations or other manipulations of an input file or database and return a result that your Processing Sequence can then use in further processing.
In MapForce, you add a simple output component to your mapping using the Insert Output command from the Insert menu:

Then provide a name for the component:

You can then map a value to it as required. The illustration below is taken from the supplied example Transformation Map EXAMPLE_MAPOUT1. It builds a comma-separated list of the part numbers contained in the Tutorial Order xml file and returns it in the simple output component.

When you include the Transformation Map in your processing Sequence, the output value is available for you to map to a Processing Sequence variable of your choice. Your Processing Sequence can then process the result in whatever way is required.
The supplied example Processing Sequence EXAMPLE_CSV02 illustrates receiving the output from a Transformation Map simple output component. Because the example map builds a comma-separated list of values, the Processing Sequence then uses the PARSE_CSV activity to parse and extract the list of returned values.
LANSA Composer only supports Transformation Maps that use a single output or target component. Therefore, if you are using a simple output component, then it must be the only output or target component in the map. You cannot, for example, also map data to an output file or database. (You can, however, create and execute a second map to perform the further mappings, as required.) |