Hi!
My program is writing to an XML-file.
1. A numeric field with two decimals, f1, is declared pic 9(5)v99.
When writing 42.00 to f1 the result on xml file is <f1>42</f1>. I want both decimal 00 to be on the xml file.
When a decimals is for instance 10 the output for decimals is 1 and if it is 01 the output is 01 . So it is always when the last decimal is 0 they disappear from output.
When declaring f1 pic 9(5).99 is the result <f1>00042.00</f1>. The decimals is ok now but I do not want the leading zeroes.
When declaring f1 pic z(4)9.99 is the result <f1> 42.00</f1>. Now are leading zeroes and decimals ok. But I do not want leading spaces.
How can I have a result like <f1>42.00</f1>?
It should be max 5 numbers before the decimal point and two after. It should be numeric.
Regards
Christina
#netexpress
#COBOL
#XML