Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What is the use of comp2 ? Where can we use it with example ?




414
views
asked mar September 6, 2014 01:21 PM  

What is the use of comp2 ? Where can we use it with example ?


           

1 Answers



 
answered By Mswami   0  

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).

flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  3 people following this tag

  Question tags

cobol × 1

Asked 2 years and 3 months ago ago
Number of Views -414
Number of Answers -1
Last updated
3 years and 3 months ago ago

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!

Alert