VMS Help
COBOL, PROCEDURE_DIVISION, INSPECT, 4format CONVERTING

 *Conan The Librarian

  The INSPECT statement counts or replaces occurrences of single
  characters or groups of characters in a data item.

  Format 4 -

  INSPECT src-string CONVERTING

      compare-chars TO convert-chars

                    [ { BEFORE } INITIAL delim-val ] ...
                    [ { AFTER  }                   ]

  1 - src-string

  is the identifier of a group item or an elementary data item with
  DISPLAY usage.  INSPECT operates on the contents of this data item.

  2 - delim-val

  is the character-string that delimits the INSPECT operation.  Its
  content restrictions are the same as those for compare-val.

  3 - compare-chars

  is the string that contains the individual characters that convert to
  those in convert-chars.  It is the same kind of item as compare-val.

  4 - convert-chars

  is the string that contains the individual characters to which the
  characters in compare-chars convert.  It is the same kind of item
  as compare-val.
  Close     Help