cobol1.hlp (Topic list)
INSPECT (↑ Statements)
 Key                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Verb:         INSPECT
 
  Function:     Counts, replaces, or converts occurrences of a
                character or group of characters in a data item.
 
  Syntax:       Which format?   TALLYING   REPLACING  CONVERTING
                               TALLYING REPLACING
 
     ─INSPECT identifier-1 TALLYING─────
 
        ┌──────────────────────────────────────────────────────────┐
        │                ┌─────────────────────────────────────────┐
        │                │            ┌──────────┐                 │
        ▼                ▼            ▼          │                 │
     ──identifier-2 FOR─┬─CHARACTERS─┬──────────┬─────────────────┬─
                         │            └─phrase-1─┘                 │
                         │                                         │
                         │           ┌───────────────────────────┐ │
                         │           │                ┌──────────┐ │
                         │           ▼                ▼          │ │
                         ├─ALL─────┬─┬─identifier-3─┬─┬──────────┬─┘
                         └─LEADING─┘ └─literal-1────┘ └─phrase-1─┘
 
  where phrase-1 is:
 
     ──┬─BEFORE─┬─┬───────┬─┬─identifier-4─┬──
        └─AFTER──┘ └INITIAL┘ └─literal-2────┘
                                    -♦-