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