ANSWERS: 1
  • Packed Decimal: Packed Decimal is also called as COMP-3, Computational-3. In packed decimal, sign is stored separately as the hex value in the last nibble(4 bits) of the storage. COBOL Comp-3 is a binary field type that puts ("packs") two digits into each byte, using a notation called Binary Coded Decimal, or BCD. This halves the storage requirements compared to a character, or COBOL "display", field. Comp-3 fields are denoted as : PIC S9(5) comp-3. Example to show the bytes reserved: PIC S9(7) COMP-3. Byte size = (7 + 1) / 2 = 4 PIC S9(5)V99 COMP-3. Byte size = (5 + 2 + 1) / 2 = 4 PIC 9(7) COMP-3. Byte size = (7 + 1) / 2 = 4 Zoned Decimal: As a default, sign is over punched with the numeric value stored in the last bite.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy