IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Multibyte characters mapping

    Posted 12/31/15 03:21 AM

    Originally posted by: yeswtx


    Hello,

    I have few multi-byte data (more than 2 bytes onwards) as below:-

    乙基éçàé

    I need to map single space as replacement of these in the output field.

    Appreciate for any suggsstions.

     

    Thanks.

     


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Multibyte characters mapping

    Posted 12/31/15 06:17 AM
      |   view attached

    Originally posted by: paul.brett


    So, for an input field such as:

    This is a 乙基éçàé test
    

    ...you want the output to be:

    This is a   test
    

    ..yes?

    My first thought was LEAVEALPHANUM() but this would not put a space in place of the dropped characters.

    Please review the enclosed map for one such method of doing this.  It uses a file called Allowed.txt, which specifies which ASCII characters are allowed in the field, and discards all others.

    Let me know if this helps your project.

    Thank-you.

    Paul

    Follow me on Twitter


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender

    Attachment(s)

    zip
    RemoveNonAscii.zip   3 KB 1 version


  • 3.  Re: Multibyte characters mapping

    Posted 12/31/15 06:20 AM

    Originally posted by: paul.brett


    Should you need to, you can call my map as a RUN() function from your map:

    =RUN("Test1.mmc",ECHOIN(1,CPACKAGE(StuffToBeMapped),"NATIVE")+" -OE2")

    Thank-you.

    Paul

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Multibyte characters mapping

    Posted 01/04/16 03:52 AM

    Originally posted by: paul.brett


    Yes, a slight alteration to the 'allowed' detection is needed.  In functional map 'F_EachChar', change:

    =IF(FIND(In1,In2)>0,In1,"#")

    to

    =IF(FIND(CTEXT(In1,"NATIVE"),In2)>0,In1,"#")

    ....and that should do it.

    Thank-you.

    Paul

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 5.  Re: Multibyte characters mapping

    Posted 01/04/16 05:31 AM

    Originally posted by: yeswtx


    Thanks Paul, looks like I get now what is required.

    was using CONVERT with SUBSTITUTE + tree element restriction earlier but it was not 100%.

    by the way is there any other way (using functions) we achieve this?

    I shall use this for tests, will get back in case still something on this,

    Thank you very much.


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange