INSPECT Statement

The INSPECT statement specifies that characters in a data item are to be counted (tallied), or replaced (or both).
  • It will count the occurrence of a specific character (alphabetic, numeric, or special character) in a data item.
  • It will fill all or portions of a data item with spaces or zeros.
  • It will translate characters from one collating sequence to another.