|
>> I'm hijacking this reply to report that even the ILE compiler still converts binary to packed internally. You only had to ask - I could have told you that without you having to hack the object! The reason is simply that COBOL rules state that the value contained within the variable must be constrained to the size of the picture clause. If you have a Pic S9(2) Binary then according to ANSI rules the max value is 99 whereas the actual binary range goes to three digits. The compiler therefore generates moves to packed fields to ensure that any excess is truncated. Sadly this was an area in which ANSI was vague at best and contradictory at worst so many compilers did not implement this "filtering". We added support way back (NOTRUNC?) in the OPM compiler to enable folks to get past this and speed up binary operations. It wasn't until ILE COBOL that it was fully implemented though and even there I think there is a gap or two. Jon Paris Partner400
As an Amazon Associate we earn from qualifying purchases.
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.