Pack a number into COMP-3 hex, or unpack dump bytes back to a value. See the sign nibble, digit layout, and byte length. For PIC sizing without packing, use the PIC storage calculator.
How to use it
COMP-3 packed decimal converter
Unpacked value
20261112
COMP-3 layout
Two digits per byte; the last half-byte is the sign (C +, D −, F unsigned). Byte length is ceil((digits + 1) / 2). Need PIC sizing only? Use the PIC storage calculator.
Need this at work?
Free account saves tutorial progress. The jobs board lists openings that ask for JCL.
Unsigned date 20261112 packs to five bytes:
02 02 61 11 2FThat is digits 020261112 with sign F — the same shape File-AID often labels as something like 5/PS when the field is packed.
COMP-3 squeezes two digits into each byte, like sharing bunk beds. The last half-bed is reserved for a tiny plus/minus flag. Hex is just the flashlight view of those packed beds.
Encoding follows IBM packed-decimal / COMP-3 conventions: digit nibbles high-order first, trailing sign nibble C/D/F (with tolerant unpack of alternate positive codes).