what is the use of comp2 ? where can we use it with example ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Suppose i want to declare a binary comp fild of 7 byte .how to write?
What is the difference between working storage copybook and linkage section copybook?
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
How to read the last 100 records from a COBOL file. The file contains N number of records.
When search all is used in cobol program without sorted input data?
6 Answers CGI, Principal Finance,
What is the linkage section?
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
Read a flat file and write last but one (I have n records in a file I have to write n-1th) record in another flat file. Could you please provide me the code in COBOL?
I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.
What rules are to be followed while using the corresponding options?
What is the difference between performing a SECTION and a PARAGRAPH?
How do you define a sort file in JCL that runs the COBOL program?