When the HP-3000 compatibility option is enabled, the Kobol compiler accepts the EXAMINE statement.
The TALLY special register is also supported.
The EXAMINE statement provides the ability to tally or
replace occurrences of single characters or sequences of characters in
a data item.
EXAMINE identifier-1 TALLYING
{ UNTIL FIRST }
{ ALL } literal-1
{ LEADING }
[ REPLACING BY literal-2 ]
EXAMINE identifier-1 REPLACING
{ UNTIL FIRST }
{ ALL } literal-1 BY literal-2.
{ LEADING }
{ FIRST }