Rational Developer for System z

Overlay transform

The Overlay transform generates a new string which is the result of overlaying the string contained in the source element with another specified string.

To specify the values for a Overlay transform:

  1. Verify that the type of the transform that is selected in the mapping routine area is Overlay.

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

  3. In the General tab, type in a value for each input field:

    Overlaid string
    The string into which the overlaying text is written:
    • You cannot edit this field.

    • The mapping editor sets this field to the name, enclosed in angle brackets <>, of the source element that you selected for the mapping (for example, <strCustomerPhoneNumber>).

    • The mapping editor does not include the message name or structure name to which the field belongs, because that information is apparent from the context.

    String to place on overlaid string
    For this field you can specify either a second source element or a literal string:
    • If you specify a second source element then the Overlay transform becomes part of a two-to-one mapping. To specify a second source element:

      1. In the Outline view, in the mapping routine area, drag a second source element to the transform.

      2. In the Properties view, the mapping editor sets the field String to place on overlaid string to the name, enclosed in angle brackets <>, of the second source element that you selected (for example, <strNewAreaCode>).

    • If you specify a literal string then the Overlay transform becomes part of a one-to-one mapping.

      To specify a literal string type the string, without single quotes (for example, 555), into the input field String to place on overlaid string.

    Overlay index
    The index of the first character to be overwritten in the overlaid string. The lowest valid index is 1.
    Overlay length
    The number of characters to be overwritten in the overlaid string (such as 3).
    Tip: If an error icon Error appears at the left of an input field, you can display a description of the error by hovering the mouse pointer icon over the error icon.

At runtime:

  1. The runtime environment reads the contents of the source element (a string) and overlays this string with the string specified by the second parameter of the transform, as directed by the values of the overlay index and the overlay length.

    For example:
    • String in the source element (string to be overlaid): '919-555-2222'.
    • String to place on overlaid string: '444'.
    • Overlay index: 1.
    • Overlay length: 3

    The resulting string is: '444-555-2222'

  2. The runtime environment stores the resulting string into the target element.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)