COBOL - USAGE Clause - PACKED-DECIMAL



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

COBOL - USAGE Clause - PACKED-DECIMAL

Specified for internal decimal items.
Such an item appears in storage in packed decimal format.

There are 2 digits for each character position, except for the trailing character position, which is occupied by the low-order digit and the sign.
Such an item can contain any of the digits 0 through 9, plus a sign, representing a value not exceeding 18 decimal digits.

The sign representation uses the same bit configuration as the 4-bit sign representation in zoned decimal fields.
For details, see the Enterprise COBOL Programming Guide.

The maximum length of a packed-decimal computational item is 63 decimal digits.

PACKED-DECIMAL may also be specified for date and time items whose FORMAT literal contains only conversion specifiers.
These conversion specifiers must only be able to contain numeric digits.



© Copyright IBM.