Data Transformation Engine Design Studio Tutorial

Chapter 3 - Modifying the Mail.mms Map Source File Entering Map Rules
Design Studio Tutorial
94
Mapping to the FullName Field
Map the First, Middle, and Last Name Fields from the ContactsIn input card to
the FullName Field in the LabelsOut output card.
Remember that the Middle Name Field is optional and does not have to appear
in the data. If the contact record does not have a middle name, the Middle Name
Field should not be mapped.
Use a map rule that verifies that Middle Name Field is present. If Middle Name
Field is present, map it to the Full Name Field. If Middle Name Field is not
present, do not map it.
Functions Used in Map Rule
This map rule uses two functions:
PRESENT
IF
All functions are documented in detail in the Mercator Help and the Functions and
Expressions Reference Guide. The functions must be used with the proper
command syntax notation, as described in the Command Syntax Notation section
on page 15.
PRESENT Function
The PRESENT function checks for the presence of an object. If the object is
present, the function returns TRUE. If the object is not present, the function
returns FALSE. The syntax of the
PRESENT function is:
PRESENT (
object_to_look_for
)
IF Function
This function evaluates a conditional expression, returning one value if true,
another if false.
There are three arguments in the
IF function. The first argument is a condition. If
it is TRUE, the second argument is performed. If it is FALSE, the third argument is
performed. The syntax of the
IF function is:
IF (
test_this
,
result_if_true
[,
result_if_false
])