Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
What are the type of comp usage?
Editorial / Best Answer
Answered by: Gayathri
COMP Usage is used for data items of numeric type. There are 4 types of COMP usage.
1.COMP : Used only for integers.Either half word or full word .
2.COMP -1 :Used for floating points.Internal representation is hexa decimal.full word is used.No PIC Clause .
3.COMP -2 : Similar to COMP-1.Only difference is double word(8 bytes )is used
4.COMP -3 :Interenal representation is decimal.Each character is assinged to half byte.The sign bit is assinged to right most bit. The no.of bytes required for n characters is (n/2) + 1 (rounding down)
Related Answered Questions
Related Open Questions