Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Packed Decimal

$
0
0

Packed-decimal is a feature of standard COBOL; see e.g. ISO/IEC 1989:2002 (the 2002 version of the international COBOL standard) item 13.16.58.3 #10. It's not present simply for mainframe compatibility; it's a required part of the standard language.

Packed-decimal support has been in the COBOL standard since 1985, and before standardization as the (still-supported) COMPUTATIONAL-3 (aka COMP-3) usage, which was introduced by IBM but widely supported by other vendors. It dates back to the 1960s.

It's widely used in COBOL programs. As a member of the BCD (Binary-Coded Decimal) family of numeric encodings, it uses radix 10 to represent integers and fixed-point rationals. That means it has the property of rounding and truncating precision just as decimal numbers do with pen-and-paper arithmetic. That's very important for financial applications, which have both practical and legal reasons for adhering to decimal arithmetic.

Various online references discussing BCD have more information.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



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