Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

18 digit limit 1

Status
Not open for further replies.

Yoseph

Programmer
May 17, 1999
8
US
Does anybody know if I.B.M. is planning on eliminating the 18 byte numeric limitation?
 
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>

 
Unfortunately, my release of COBOL DOESN'T allow the following statement.<br>
<br>
<br>
num pic 9(13)v9(6)
 
What version of COBOL are you using? Also, are you getting a compile error?
 
may be losing it here, but you may need a full stop??? at the end???
 
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>

 
The 18 digit limit will be changed to 31 in the next COBOL standard.
 
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>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top