Entering the map rule that references the functional map

Map rules that reference functional maps are entered in the rule cells on the output card of the executable map. Map rules belong in the rule cell of the data object that requires additional data processing. The number of times a functional map is triggered depends on the number of occurrences of the input arguments in the data and the expressions used for each argument.

This section explains how to manually create a functional map. You can also use the " Functional Map Wizard".

For the executable map for mapping the car data (see Example Scenario for Using a Functional Map ), the executable map is CarData. The source data contains fixed records and the goal is to generate an output file containing one delimited record for each fixed record in the source data.

A functional map on the CarRecord(s) data object can generate one CarRecord for each FixedRecord. A suitable name for the functional map can be RecordMap, because the functional map maps one record at a time. In the CarData executable map, the map rule for the CarRecord(s) data object in the output card would contain an equal sign, the name of the functional map, and a set of parentheses:
=ListCars ( )

To map the fixed record input object to the map rule, drag the FixedRecord(s) data object from the input card into the rule cell inside the parentheses. Commit the map rule by pressing the Enter key.

A map rule specifies how to generate that certain output. The map rule on CarRecord(s) specifies how to create each CarRecord. Basically, the map rule specifies "to generate a CarRecord data object, use a functional map named ListCars on a FixedRecord data object." The functional map RecordMap uses the FixedRecord to create a CarRecord.

The functional map ListCars can be created before the executable map. The creation order for the map rule or functional map is not relevant. However, an error occurs at build time when a rule includes a nonexistent map name.