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.  Decimal To Binary

    Posted 10/16/07 03:10 AM

    Originally posted by: SystemAdmin


    Hi all,

    I have a requirement to convert decimal number to binary.

    Is there any in-built function for that??

    I'm using Mercator 6.7 version.

    Please suggest how to implement this.

    Thanks,
    Deepthi
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Decimal To Binary

    Posted 10/16/07 04:03 AM

    Originally posted by: janhess


    You could move it to a binary field defined in the type tree. The conversion is automatic.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Decimal To Binary

    Posted 10/16/07 05:49 AM
      |   view attached

    Originally posted by: SystemAdmin


    Hi Janhess,

    Thanks for your reply.

    I've also tried in the same way.

    But it's presentaion not correct. Output is coming as junk character.

    When tried to convert that data to decimal it's coming correctly.

    Output Item properties:

    Item Subclass : Number
    Interpret As: Binary
    Presentation:Integer
    Length: 4

    Please find attached the map and type tree created for the same.

    Thanks,
    Deepthi
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender

    Attachment(s)



  • 4.  Re: Decimal To Binary

    Posted 10/16/07 05:59 AM

    Originally posted by: janhess


    The output will look like junk if you view it in a text editor. You need to look at it in hex. What you are producing is correct. In hex it is 05 00 00 00.
    If you want the byte order changing to 00 00 00 05 then change the Byte Order in the type tree to Big Endian.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Decimal To Binary

    Posted 10/17/07 01:39 AM

    Originally posted by: SystemAdmin


    Hi Janhess,

    Thanks for all your help.

    My requirement is like if 5(Decimal) is input, output should be 101(Binary)

    Is there any way to display 101 in the output??

    Thanks,
    Deepthi
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 6.  Re: Decimal To Binary

    Posted 10/17/07 04:11 AM

    Originally posted by: janhess


    use frombaseten(Decimal,2)
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender