 IDENTIFICATION DIVISION.
 PROGRAM-ID. INSPCTSTMT.
 PROCEDURE DIVISION.
    INSPECT SOMEDATA1 
       TALLYING SOMECOUNTER1 FOR
          CHARACTERS AFTER INITIAL 'A'
          ALL 'B' BEFORE INITIAL 'A'
       REPLACING
          CHARACTERS BY 'C' AFTER INITIAL 'A'
          FIRST 'B' BY 'C' BEFORE INITIAL 'A'.