      IDENTIFICATION DIVISION.
      PROGRAM-ID. 069B.
      DATA DIVISION.
      WORKING-STORAGE SECTION.
      
      01 INP PIC X(100).
      
      01 WK-INP.
      	03 WK-TBL PIC X(1) OCCURS 100 TIMES.
         
      01 IDX   PIC 9(3).
      01 IDX2  PIC 9(3).
      01 IDX3  PIC ZZ9.
      01 OUT PIC X(10).
      
      PROCEDURE DIVISION.
      ACCEPT INP.
      MOVE INP TO WK-INP.
      
      PERFORM UNTIL WK-TBL(IDX) = SPACE
      	ADD 1 TO IDX
      END-PERFORM.
      
      COMPUTE IDX2 = IDX - 1.
      COMPUTE IDX3 = IDX - 3.
  
      DISPLAY WK-TBL(1) FUNCTION TRIM(IDX3) WK-TBL(IDX2).
      STOP RUN.