This is an unsigned five-byte number. It is also a five-byte character field. Can be called Zoned Decimal, External Decimal, Display numeric.
1 2 3 4 5
This is the would be the result of packing the above field.
This would be the result of unpacking it again.
1 2 3 4 5
and unpacks to
In hexadecimal notation, each byte appears as two characters, 0-F, which represent all the 256 possible bit-settings of one byte (0-FF).
The half-of-a-byte represented by 0-F is called a "nybble". For a Zoned Decimal format (which is just a convention
) the right-nybble is called the Numeric and the left-nybble is called the Zone, except for the right-most left nybble which is the sign-nybble.
When you use the pack instruction all of the zones are tossed away, which means their original content is irrelevent to the instruction
The right-nybbles are placed side by side and the sign from the Zoned Decimal sign-nybble is placed in the Packed Decimal sign-nybble, which is the right-most right nybble.
On the way back, unpacking, all the Zones are set to F, otherwise everything from the Packed Decimal, including the sign, is distributed in a logical way.
There are no arithmetic instructions for Zoned Decimals. There are for Packed Decimals. Packed Decimals ocupy less storage, in memory and on mass storage media.