>On IBM mainframes, COMP-3 is packed decimal format, which means each digit occupies one nibble (half-byte), with a slack nibble added to make the overall field size end on a byte boundary.
Plus the sign nibble, so a five-digit number actually occupies 6 nibbles=3 bytes, but a 6-digit occupies 7 nibbles+one slack=4 bytes.