I haven't heard of a limitation, of any kind, in IBM COBOL. Your code is what you make it. 8 bytes is sufficient to reference every second of every day from the dawn of time to the present. Assuming you love astrophysics....<br>
Regards.<br>
In the IBM COBOL Language Reference Manual, Second Edition (October 1995), Section 5.3.10.3.2, Numeric Items, the restriction is stated that "The number of digit positions must range from 1 through 18, inclusive."<br>
<br>
I have seen nothing more recent than that about IBM COBOL for MVS.<br>
<br>
FYI: The maximum number of digits that can be handled exactly by any IBM 360/370.. architecture instruction is 31. This would be a packed (COMP-3) field of 16 bytes (31 half-bytes plus one for the sign). <br>
I'd guess that IBM used the 18 digit limit so that it would have the ability to create longer intermediate fields when handling a complex COMPUTE statement. Thane's comment sounds reasonable, assuming that IBM's compiler writers are now able to create higher precision intermediate results in software. It would be great if it were so since the current rules for intermediate values in COMPUTE statements makes the book of Revelations seem crystal clear.
I had meant, in my reply, that we are free from limitations because we create our own. My friend, recently deceased, wrote a program to print all of the prime numbers (a never-ending task). He succeded the moment he died.<br>
<br>
There are no limitations (except one). There will always be a way around the published limitations.<br>
<br>
In memory of Paul Sholl (1954-forever)<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.