× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think I can see the reason when I think about how a CPU has to handle an
operation such as DIVIDE. The values to be divided are moved in to a
couple of registers and when the operation is performed, it stores the
result in a register. To be certain of the value in the result register,
it's probably initialized to zero--just like I've seen explicitly done in
many programs. In this case the compiler seems to be doing it.

I don't have a copy of the COBOL 85 standard, but as far as the expected
ANSI behavior the latest standard to which I do have a copy lists a Fatal
exception named EC-SIZE-ZERO-DIVIDE specifically for 'Division by zero'.
I'll bet it's in the COBOL 85 standard also. Perhaps that could get IBM's
attention.

---------------Original Message---------------

date: Wed, 3 Oct 2007 15:01:07 +1000
from: Simon Coulter <shc@xxxxxxxxxxxxxxxxx>
subject: Re: [COBOL400-L] FYI: divison by zero and ILE/COBOL
(cross-posted to midrange-l)
. . .
. . .
. . .
Given that there are probably COBOL programs on iSeries that depend
on the current behaviour, and that it's likely the expected ANSI
behaviour, . . . .


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.