Quantcast
Viewing all articles
Browse latest Browse all 4356

decimal to Cobol Numeric

Strange results occurring with the attached piece of code.  The CalcPerecntDotNet method is returning mixed results when you divide 100 by the following numbers 13 thru 15, 17 thru 19, 21 thru 24.  FYI, I stopped testing at 100.  The CalcPercentCobol method seems to work correctly.  Also it should be noted that the piece of code that is causing the problem is when I try to move the Decimal field to the Pic 9(03)v99 field using the set command. 

Below I provided the values 13 thru 24

passed valueCalcPercentCobolCalcPercentDotNet
137.69707.54
147.14706.99
156.66706.51
166.256.25
175.88705.73
185.55705.4
195.26705.11
2055
214.76704.61
224.54704.39
234.34704.19
244.16704.01

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>