Rational Developer for System z

Specifying a condition for a mapping

The Condition tab of the Properties view allows you to specify a condition to determine whether a mapping is to be performed.

To specify a condition for a mapping:

  1. In the mapping routine area of the mapping editor, or in the Outline view, select the transform of the mapping for which you want to specify a condition. The properties of the transform are displayed in the Properties view.

  2. In the Properties view, select the Condition tab.

  3. Select the check box Apply a condition to the transform. This action enables the condition.

  4. In the Condition input area, type the ESQL condition that you want to use for the mapping (see ESQL reference).

    • ESQL validation:

      The ESQL expression that you type into the Condition input field is checked for ESQL validity as you type it in. If an error is found then an error icon Error appears at the left of the input field.

      You can display a description of the error and a list of valid alternatives by hovering the mouse pointer icon over the error icon.

    • Content assist:

      The content assist menu is a context-sensitive list of references to those ESQL operations and functions that are valid given the current location of the input cursor.

      The content assist menu also contains quick references to the source messages and target messages in the current mapping routine and their elements.

      To use the content assist menu:

      1. When the input cursor is visible in the Condition input field press Ctrl-Space to open the content assist menu.

      2. If you have not already done so move the input cursor to the location in the Condition input field at which you want to insert something.

      3. In the content assist menu double-click the operator, function, or message element that you want to insert at this point in the expression.

      The item that you selected is added to the ESQL expression.

  5. Press Enter.

To disable a condition, clear the check box Apply a condition to the transform.

At runtime:

  1. When the runtime environment begins to process the mapping, the runtime environment sees that a condition is present and evaluates the condition.

  2. If the condition resolves to Boolean true, then the runtime environment performs the mapping.

  3. Otherwise the runtime environment skips the mapping and goes on to process the next item.


Feedback