Answered Questions

  • What are the type of comp usage?

    Star Read Best Answer

    Editorial / Best Answer

    Answered by: Gayathri

    • Sep 4th, 2005

    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)