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.  NUMBERTOTEXT returns leading zeros

    Posted 07/14/04 09:04 AM

    Originally posted by: SystemAdmin


    I have an input field defined as number, presentation is integer, size is from 0 to 4 digits, no sign, no separator, pad value is "0", padded to fixed size of 4 digits and right justified.

    The value of the field N is "0283". If I call the function NUMBERTOTEXT(N) then I get the string "0283" back. But I expected to get "283" back as it was in older versions (1.4.2). At the moment I can only get rid of the leading zero when I multiply with 1 like NUMBERTOTEXT(N*1).

    Is there another way how to get the output without leading zeros? Maybe I'm wrong with the data definition, but this is what I get when I upgrade the type tree and the maps from v1.4.2 to v6.7.1.

    Any simple solutions are welcome.

    Kind Regards

    Joerg


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


  • 2.  Re: NUMBERTOTEXT returns leading zeros

    Posted 07/14/04 10:30 AM

    Originally posted by: SystemAdmin


    Jeorg,
    Is your output field number or text? If text, then a solution to dropping the leading zeroes would be to use the TRIMLEFT function with the NUMBERTOTEXT function.
    Ex...
    TRIMLEFT(NUMBERTOTEXT(N,"0"))
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: NUMBERTOTEXT returns leading zeros

    Posted 07/14/04 12:00 PM

    Originally posted by: SystemAdmin


    Joerg,

    Use the FROMNUMBER() function instead. It ignores formatting.

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


  • 4.  Re: NUMBERTOTEXT returns leading zeros

    Posted 07/15/04 01:22 AM

    Originally posted by: SystemAdmin


    Paul,

    thanks for the information.

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


  • 5.  Re: NUMBERTOTEXT returns leading zeros

    Posted 07/15/04 04:54 AM

    Originally posted by: SystemAdmin


    Paul,

    Now I found out, that the decimals are cutted out in the case, that the decimals are zero, e.g. FromNumber(009.0) results in the string "9." instead of "9.0". I never had this problem with NumberToText in version 1.4.2.

    Kind Regards,

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


  • 6.  Re: NUMBERTOTEXT returns leading zeros

    Posted 03/30/17 03:56 PM

    Originally posted by: NICK_R


    Team,

     

    Just as supplementary question to the same topic, the current versions are supporting my default to get rid of the '0's before the number

    Lets say 003 is coming out as 3 if I use NUMBERTOTEXT function.

     

    I want to retain those two zero values and the max size I have is '3'. Any way to handle this retain with out getting rid off ?

     

    NUM BERTOTEXT(003) == 3

    Input Subclass- Number and output subclass- Text

     

    NICK


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


  • 7.  Re: NUMBERTOTEXT returns leading zeros

    Posted 03/31/17 01:51 PM
      |   view attached

    Originally posted by: @vkprasad_WTX


    Hi Nick,

     

    I have attached one PI regarding your requirement so may be it will be useful to you


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

    Attachment(s)

    zip
    Number_Sample.zip   5 KB 1 version


  • 8.  Re: NUMBERTOTEXT returns leading zeros

    Posted 04/03/17 06:45 AM

    Originally posted by: PaulBrettIBM


    Previous example does not work.  Result is '3'.

    Perhaps you should just use a FILLLEFT() function with "0" and 3 as the additional two arguments?

    Thank you.

    Paul

    Follow me on Twitter


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