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.  help to remove leading zeros

    Posted 09/21/07 10:05 AM

    Originally posted by: SystemAdmin


    The specs require to send me the first three characters of an element excluding any zeros...how do i get this?
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: help to remove leading zeros

    Posted 09/21/07 10:08 AM

    Originally posted by: john.gibby


    TRIMLEFT(objectname,"0")
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: help to remove leading zeros

    Posted 09/21/07 10:15 AM

    Originally posted by: janhess


    Is the element text or number? If text use left(element,3). Using TRIMLEFT(element,0) will remove the leading 0s.
    If the 0s are missing you could use FILLLEFT ( element , '0' , 3).
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: help to remove leading zeros

    Posted 09/21/07 11:33 AM

    Originally posted by: SystemAdmin


    My actual requirement goes as :

    Send The First 3 Characters Of G3916 Excluding Any Zero. If The Value Is Blank Or All Zeros; Then Send 1

    and the field is a number field
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: help to remove leading zeros

    Posted 09/21/07 01:31 PM

    Originally posted by: NancyR


    =IF( ABSENT(value ) | value=0,
    1,
    TRIMLEFT( LEFT( TEXT( value ), 3 ), "0" ) )
    If value is absent or 0,
    map 1,
    ELSE
    convert the number to text, take the first three characters and remove any zeroes
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: help to remove leading zeros

    Posted 09/21/07 03:26 PM

    Originally posted by: SystemAdmin


    WHATS WRONG IN THIS LOGIC ?

    =IF(ABSENT(VALUE) |VALUE =0,1 ,
    TEXTTONUMBER(
    MID (
    TRIMLEFT(
    NUMBERTOTEXT(VALUE)
    ,"0")
    ,1,3)
    ))
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 7.  Re: help to remove leading zeros

    Posted 09/21/07 04:53 PM

    Originally posted by: NancyR


    Why do you think it's wrong? Your MID function should give the same result as LEFT. Also, I did leave off the final TEXTTONUMBER.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender