uCosminexus Service Platform, Basic Development Guide

[Contents][Glossary][Index][Back][Next]

6.5.2 Extracting a Substring from a String

Extracts a substring from a string of a single mapping source.

Organization of this subsection
(1) Function used
(2) Setup procedure

(1) Function used

To extract a substring from a string of a single mapping source, you use the acquire substring function. The following figure shows an example that uses the acquire substring function.

Figure 6-3 Usage example of the acquire substring function

[Figure]

(2) Setup procedure

To extract a substring from a string of a single mapping source:

  1. From the palette, choose the acquire substring function (substr), and deploy it in the mapping viewer.
  2. Set up a mapping line.
  3. Use one of the following methods to open the Acquire Substring dialog box.
    • Right--click the acquire substring function, and choose Setting.
    • Double--click the acquire substring function.
    The Acquire Substring dialog box opens.
    For details about the Acquire Substring dialog box, see the manual Cosminexus Service Platform Overview.
  4. When a transformation-source node is specified in Input, to specify a condition for the transformation-source node and map it only when this condition is satisfied, click Set Node Condition.
    The Set Node Condition dialog box opens.
    For details about how to set a node condition, see 6.7 Specifying Node Conditions. For details about the Set Node Condition dialog box, see the manual Cosminexus Service Platform Reference.
  5. Specify the string to be extracted.
    • To specify the extraction range from the beginning of the string
      Choose the Specify range from left side radio button and specify in Start position the position of the start character of the string to be extracted. To specify the character count of the string to be extracted, specify a character count in Count. To extract a string from the start character specified in Start position to the end of the string, choose the Acquire from start position to end of string check box.
    • To specify the extraction range from the end of the string
      Choose the Specify range from end radio button and specify in Start position the position of the start character of the string to be extracted. To specify the character count of the string to be extracted, specify a character count in Count. To extract a string from the start character specified in Start position to the beginning of the string, choose the Acquire from start position to beginning of string check box.
    • To divide a string into two parts and specify either the beginning or ending part
      Choose the Specify a substring radio button and specify in Substring the character (string) to use for dividing the string in the mapping source. To extract the string that extends between the beginning character and the character (string) specified in Substring, specify Pre in Acquired Part. To extract the string that extends between the character (string) specified in Substring and the end, specify Post in Acquired Part.
  6. Click OK.