RE: How data names with comp1 usage is stored in memor...
USAGE COMP-1 : Data is stored as single precision floating point in 4 bytes.Difference between COMP-1, COMP-2, COMP-3 and COMP :COMP-1 data is stored as single precision floating point using 4 bytes of memory.COMP-2 data is stored as double-precision floating point using 8 bytes of memory.COMP-3 data is stored in Packed Decimal format. The number of bytes occupied depends on the size of the field specified in the PICTURE clause.The formula for finding the number of bytes needed to store the data is INTEGER((n/2) + 1) where 'n' is the size of the field. (Note: If SIGN SEPARATE clause is specified, one more byte is needed to store the sign).COMP : data is stored in binary format.For USAGE COMP-1 or USAGE COMP-2 picture clause is not to be given whereas for COMP and COMP-3 picture clause is to be given.