- COMP is 2 bytes.
- COMP is used for Binary Representation it allows only S and 9.
- COMP stores the data in the binary format.
- With COMP fields, you have to drag out a calculator and convert the hex value to find out the true value that is being used in a program.
- Memory usage is,
- COMP-3 is 8 bytes.
- Comp-3 is used for Packed Decimal values it allows S 9 V mostly it is useful for Decimal Calculation Values.
- COMP-3 stores the data in the BCD(Binary Coded Decimal)format.
- It is used to avoid rounding issues that occur when binary numbers are used to represent decimal fractions.
- This is particularly vital in systems that method massive volumes of economic transactions/amounts
- Memory usage is
- Banking, Credit cards, etc.
Other cobol usages :
- The usage clause specifies how the data item being stored internally .If no usage clause specified , the default usage clause would Usage is display