COMP-2:This is same as COMP-1, except that the data is represented internally in two words. The advantage is that this increases the precision of the data, which means that more significant digits are available. Similar to COMP-1, The PICTURE Clause cannot be specified for COMP-2 items also. COMP-1 takes 8 bytes of storage.COMP-2 is more precision than COMP-1.
In short, Same as COMP-1 except that data represented internally in two words Increases precision of the data. Picture clause cannot be specified.
Internal representation of COMP 2 data type is Hexadecimal requires double word for the data item to store. Used for accurate calculations(more precisions).
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!