|
|
Archives of the TeradataForum
Message Posted: Thu, 20 Apr 2006 @ 09:18:32 GMT
Subj: | | Re: COMP-3 |
|
From: | | Christie, Jon |
COBOL PIC S9(11)V99 COMP-3 is indeed - at least on IBM mainframes - 7 bytes long. It's usually called "packed decimal." When IBM packed
decimal is passed to the Teradata DBS, it is converted to the decimal data type. Decimal with 13 digits (decimal(13,2)) is stored in 8 bytes.
It goes like this:
1 to 2 digits -> 1 byte
3 to 4 digits -> 2 bytes
5 to 9 digits -> 4 bytes
10 to 18 digits -> 8 bytes
| |