what is the use of comp2 ? where can we use it with example ?

Answers were Sorted based on User's Feedback



what is the use of comp2 ? where can we use it with example ?..

Answer / smartboy

COMP-2 has double precision. Generally used in scientific
data calculations.

USAGE COMP-2 EXAMPLE.
A very simple practical example can be
If DB2 decleration of column is DOUBLE then we have to use
corresponding COBOL host variable as COMP-2
For float data type use COMP-1

Is This Answer Correct ?    13 Yes 0 No

what is the use of comp2 ? where can we use it with example ?..

Answer / kumar

Internal representation of COMP 2 data type is Hexadecimal
requires double word for the data item to store. Used for
accurate calculations ( more precessions )

Is This Answer Correct ?    3 Yes 0 No

what is the use of comp2 ? where can we use it with example ?..

Answer / srinivas yadav

It is used to reduce the Momery space.
comp2:
1)The data stored in the form of Hexa-decimal format.
2)The no. of bytes stored as s9(1)to s9(18)is 8 bytes of
memory.
3)It takes more precession values.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is tne need to use sub programs in Cobol?

3 Answers   HSBC,


i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?

1 Answers   HCL,


i have the job which has written updated 100 records into the table and for 101th record it got abended and i want to start the job again and should wirte from 101th record not from 1st record..how to do it..?

6 Answers  


how we can edit records in vsam data set and non vsam data sets

2 Answers   ACS,


How are the next sentence and continue different from each other?

0 Answers  






If you are current on the owner of a set, what is the difference between obtain next and obtain first?

0 Answers  


what is dynamic array in cobol? what is the difference b/w array and table in cobol?

2 Answers  


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


How To Separate The Numerics From An Alphanumric Data Item Which Contains Both Alphabates And Numerics ?

4 Answers  


Explain about different table spaces.

0 Answers  


can we use COPY statement in w-s section? how?

3 Answers  


How to covert given string into ASCII value in COBOL/MF COBOL

3 Answers   CTS, IBM, iFlex,


Categories