We need to adopt a conversion rule to convert the source field value into target filed value.
Pls find the CR and give necessary inputs.
For numeric fields, the conversion rule is the following:
-> Leading zeros are replaced by blanks in the flat file
-> Negative sign is added to the extreme right of the output field
-> A point and two decimals places are added if not present
in the input
-> All numeric input fields are output as char fields and
( In which ever format the input is, output must be as given below).
input --> output
123.45 --> 123.45
123.45- --> 123.45-
00000123.45 --> 123.45
00000123.45- --> 123.45-
00000123 --> 123.00
00000123- --> 123.00-
Thanks and Regards,
Patrick Koehnen replied
a lot of your cases can be done with the standard function FormatNum.
Give as parameter #.00
- remove leading zeroes
- add .00 if not existing
- in case for example 3.456 it will round to 3.46 (is this ok?)
Missing is the "-" sign. Is it always at the last char of the input?
And could you have alpha chars or empty inputs?