From: Fred M. <fr...@mo...> - 1999-12-15 10:39:47
|
Boris Kortiak wrote: > I think BCD stands for binary coded decimal and the IBM implementation produces a binary number aligned to some boundary (byte, word, &c). It is not a packed format. Sorry, it _is_ a packed format and not a binary format. The only difference in the PICTURE string is the presence or absence of the sign indicator S. With the S it's a packed decimal field, without it's a BCD field. Alignment is, as with packed decimal fields, at byte boundaries. Alignment is just another story. Nearly all types of COBOL fields are aligned on byte boundaries. The SYNCHRONIZED clause for binary fields indicates alignment on other boundaries. Binary integer fields of 16 bit are aligned on halfword boundaries, bynari integer fields of 32 and 64 bits on word boundaries. A word here means a 32 bit word. Floating points of 32 bits are aligned on word boundary, floating points of 64 bit are aligned on double word boundary. > > > As an aside BCD is part of EBCDIC: Extended Binary Coded ... That is Extended Binary Coded Decimal Interchange Code. Regards, Fred Mobach |