       IDENTIFICATION DIVISION.
       PROGRAM-ID. SearchAtEnd.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01 TBL.
           05 ITEM PIC X(2) OCCURS 5 TIMES INDEXED BY IX.
       PROCEDURE DIVISION.
           MOVE "AA" TO ITEM(1)
           MOVE "BB" TO ITEM(2)
           MOVE "CC" TO ITEM(3)
           SEARCH TBL
               AT END DISPLAY "MISSING"
               WHEN ITEM(IX) = "ZZ" DISPLAY "FOUND"
           END-SEARCH
           STOP RUN.
