Page 1 of 1

How to display percentage value in the cobol output file

PostPosted: Thu Dec 29, 2011 8:42 am
by rekhamf
How I can display the percentage value in cobol output file . like = %10.13 ?

Can you please let me know the format of that field to display the percentage value?

Re: How to display percentage value in the cobol output file

PostPosted: Thu Dec 29, 2011 12:04 pm
by dick scherrer
Hello,

Can you please let me know the format of that field to display the percentage value
The format of the field is already in the code. It should be a numeric field with an implied decimal place.

Do you understand how to calculate a % in a program?

I would probably calculate the % to the needed "size" (xxx.xxxxxx or whatever), move the calculated value to an edited field for zero suppression and decimal insertion, and pre-pend or append the "%" character.