• Font Size
  • S
  • M
  • L

Search via FAQ No.


  • No : 30536
  • Open Date : 2019/09/05 16:00
  • Print
NEW

[DataSpider Servista] In Mapper, I want to specify bytes from the middle of a string and partially cut it out, but how do I do this.

From 13th to 18th bytes of the string, it contains an ID and I would like to use the ID in a subsequent process.
In Mapper, I want to specify bytes from the middle of a string and partially cut it out, but how do I do this.
Category : 

Answer

Using logic such as [Left String (bytes)] and [After Specified Character], you can specify bytes from the middle of a character string and obtain the expected data.

Sample data
 xxxxxxxxxxxxIDDATAxx

  1. In the Mapper, cut 12 bytes using [Left String (bytes)] and substitute it to a variable.
  2. Prepare another Mapper and add the following:
  • Specify the variable acquired in Step 1 using [After Specified Character] and acquire the bytes after 13 bytes
  • Cut 6 bytes from the data acquired in the above using [Left String (bytes)]
Result data:

 IDDATA
  
Please refer to the following DataSpider Servista Help for details about each logic:
 

  • [Mapper]-[Document Mapper]-[Mapper Logic Guide]-[String]- Left String (bytes)

https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/mapper/document/logic/leftByte.html

  • [Mapper]-[Document Mapper]-[Mapper Logic Guide]-[String]- After Specified Character

https://www.hulft.com/help/en-us/DataSpider/dss42sp2/help/en/mapper/document/logic/substringAfter.html
 

 
Version Information
Ver.4.1、Ver.4.0、Ver.3.2