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.  Reference modification and Length of substring

    Posted 04/08/16 10:37 AM

    Originally posted by: SJacob


    Hi,

    I have a scenario where I have 1 input item, total length 60.

    Is there a way to find the number of characters, in my input item, starting position 41 until 60 ?

     

    Thank you.

     


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


  • 2.  Re: Reference modification and Length of substring

    Posted 04/08/16 11:16 AM

    Originally posted by: Ejay


    Hi,

     

    If i get it right you Max item size is 60 so your data size could be Min 0 to Max 60 .

    If you use a SIZE function you can count your total number of character , then subtracted to the position you want to count from will give you the number of char after the decided position

    In my example  Min is 0 / Max is 10 and we want to know how many character we have after the 6th position  So how many char between  6th and 10th position 

    Data is "mydata123 ( 9 char )

    Using Function like =NUMBERTOTEXT(SIZE(1in)-SIZE(LEFT(1in,6)))

    NUMBERTOTEXT(SIZE(1in) count the total data size

    SIZE(LEFT(1in,6))) return the number of char from the begin of the data the the wanted position to subtract

    The map with return 3 as result as there is 3 character remain after position 6 .

     

    Hope this help

    EJ

     


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


  • 3.  Re: Reference modification and Length of substring

    Posted 04/08/16 03:56 PM


  • 4.  Re: Reference modification and Length of substring

    Posted 04/11/16 03:28 AM

    Originally posted by: paul.brett


    From the description given, I am assuming you want to ignore any 'non-data' (i.e. spaces) other wise, the answer given is always going to be the same, and could be determined during the map design phase and hard-coded.

    Perhaps you want to use the TRIMRIGHT() function in there, to remove all trailing spaces, and it will then give the the size of the DATA in the field, not the pad characters.

    Thank-you.

    Paul

    Follow me on Twitter


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