In COBOL, what is the difference between the COMP and COMP-3 data types?

  • COMP is a binary format, while COMP-3 is a packed decimal format
  • COMP is the only numeric data type in COBOL
  • COMP is used for characters, while COMP-3 is for numbers
  • COMP-3 is an obsolete data type
The primary difference between COMP and COMP-3 in COBOL lies in their representation. COMP uses a binary format, while COMP-3 uses a packed decimal format, allowing for efficient storage of numeric data with a varying number of digits.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *