Multiple choice technology mainframe

How many bytes does a S9(7) COMP-3 field occupy ?

  1. 7 bytes

  2. 6 bytes

  3. 5 bytes

  4. 4 bytes

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A COMP-3 (packed decimal) field stores two digits per byte, with the last half-byte (nibble) reserved for the sign. The formula for size in bytes is (N + 1) / 2 rounded up. For S9(7), (7 + 1) / 2 = 4 bytes.