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.  Format String Needed

    Posted 03/02/07 02:10 AM

    Originally posted by: SystemAdmin


    Hello! Looking for the format string so that a zoned decimal output field will show a zone punch symbol for both positive and negative numbers.

    Currently using the default string when calling the TONUMBER function only shows the zone punch symbol for negative numbers.

    Test data follows.

    The input amount field is currently a 15 position left justified character field with explicit decimal point and negative sign, -, if a negative number, no + sign if a positive number.

    The amount starts right after the CCYY-MM-DD date field. The second decimal position, if a 0, is not displayed in the amount field.

    2006-03-17-64.8 This amount is actually -64.80
    2006-03-17-53.56 This amount is -53.56
    2006-05-0464.8 This amount is actually 64.80
    2006-05-041.53 This amount is 1.53

    The output field that the amount is mapping to is Number - Character - Zoned, 15 position maximum, right justfied, padded with 0 and 2 implied decimal places.

    The current output mapped from the above input is as follows.

    20060317 00000000000648}
    20060317 00000000000535O
    20060504 000000000006480
    20060504 000000000000153

    The current rule is as follows.

    =TONUMBER(TRIMRIGHT(P_PYPADAMT Column:GIBS_PYMT_TBL_In))

    The TONUMBER function, per the help documentation, uses the default format string if none is specified, the default is "{L-####}" per the help.

    This shows the zone punch correctly for the two negative amounts above
    648} and 535O which is fine.

    Looking for the format string to add to the rule that would show the positive zone punch symbol in addition to the negative.

    Therefore 64.8 should display as 648{ and 153 should display as 15C on the output file.

    Having a hard time trying to understand the format string help in the Function Reference, using XP 6.7.1 version.

    Would greatly appreciate any help or recommndations in order to get the necessary output zone punch format for both negative and positive numbers and not just negative as the default format displays now.

    Thanks!

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


  • 2.  Re: Format String Needed

    Posted 03/04/07 11:56 AM

    Originally posted by: SystemAdmin


    I tested the following number format in V8.1 and it works for me using the tree format you described:

    "{L+-####}"

    My tests showed

    1.53 as 15C
    -12 as 120}
    56.51 as 565A
    53.56 as 535F
    -2.4 as 24}
    64.8 as 648{

    (all the answers had leading 0's). Note: my tests had the value hard coded into the first parameter of the TONUMBER() function ... was just easier for me to do that way.

    Hope it helps ....

    Yvonne Ricard
    Resistance is NOT futile.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Format String Needed

    Posted 03/04/07 03:03 PM

    Originally posted by: SystemAdmin


    Hello Yvonne! Thanks for the feedback today.

    The string you indicated worked fine. While testing have actually found a little easier change.

    This saves all of about five seconds of typing time. The change was to the type tree for the zoned output field, just had to change the Sign property from No to Yes, apparently positive signs are implied, negatives are explicit with zone punch.

    Changing the sign property now displays the zone punch in the right most position.

    Not sure if any performance time efficiency is gained from a type tree property compared to a rule, would assume some, possibly on a large volume of data and the rule does not have to be evaluated any more than necessary.

    Possibly you can speak to that when you have a chance but in any event now have two ways to make this work.

    Thanks!

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


  • 4.  Re: Format String Needed

    Posted 03/05/07 01:40 PM

    Originally posted by: SystemAdmin


    Sometimes I get caught up in what someone asks rather than if that is the best way they should do it. I eyed those settings when I created the test tree but decided against playing with them. I agree with you that the tree is a better place for doing what you want. A function call is extra work and also mixes data definition with the actual data which we want to stay away from if we can.

    Yvonne Ricard
    Resistance is NOT futile.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange