Larry C. answered 09/17/19
Computer Science and Mathematics professional
While the details might vary depending on the CPU type, those below usually hold true on most.
COMP - the variable holds integer values which are stored internally as binary data. The number of bytes of binary storage used depends on the PICTURE clause: PIC 9 to PIC 9(4) - 2 bytes, 9(5)-9(9) 4 bytes and 9(10)-9(18) 8 bytes.
COMP-2 - this is actually a larger version of COMP-1 (which holds floating-point values in 8 bytes of storage) but takes up 16 bytes to hold larger digits of precision.
COMP-3 - this holds packed-decimal data which uses 1 byte of storage for every 2 digits in the PICTURE clause plus a nybble to hold the sign. Unlike COMP values, they can have a decimal point which is indicated by a V in the PICTURE.