COMP and COMP-3?

  • COMP (Binary Storage): Data stored in pure binary format. Faster for arithmetic operations.
  • COMP-3 (Packed Decimal): Data stored in packed format (2 digits per byte). Saves space, often used in financial apps.

Example:

01 A  PIC 9(4) COMP.     *> Binary storage
01 B  PIC 9(4) COMP-3.  *> Packed decimal storage

Comments

Leave a Reply

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