IDENTIFICATION DIVISION.
       PROGRAM-ID.   SAMPLE1.
       AUTHOR.  GROCER.
       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT CUSTOMER-FILE
               ASSIGN TO "C:\PCOBWIN\CIS12FST\C12FIRST.DAT".
           SELECT CUSTOMER-REPORT
               ASSIGN TO PRINTER.
       DATA DIVISION.
       FILE SECTION.
       FD  CUSTOMER-FILE
           DATA RECORD IS CUSTOMER-RECORD.
       01  CUSTOMER-RECORD.
           05  CUSTOMER-ID                  PIC X(4).
           05  CUSTOMER-NAME                PIC X(20).
           05  CUSTOMER-STREET              PIC X(20).
           05  CUSTOMER-CITY                PIC X(15).
           05  CUSTOMER-STATE               PIC X(2).
           05  CUSTOMER-ZIP                 PIC X(5).
           05  FILLER                       PIC X(10).
       FD  CUSTOMER-REPORT
           DATA RECORD IS PRINTZ.
       01  PRINTZ.
           05  FILLER                       PIC X.
           05  CUSTOMER-ID-PR               PIC X(4).
           05  FILLER                       PIC X(2).
           05  CUSTOMER-NAME-PR             PIC X(20).
           05  FILLER                       PIC X(2).
           05  CUSTOMER-STREET-PR           PIC X(20).
           05  FILLER                       PIC X(2).
           05  CUSTOMER-CITY-PR             PIC X(15).
           05  FILLER                       PIC X(2).
           05  CUSTOMER-STATE-PR            PIC X(2).
           05  FILLER                       PIC X(2).
           05  CUSTOMER-ZIP-PR              PIC X(5).
           05  FILLER                       PIC X(3).
       WORKING-STORAGE SECTION.
       01  INDICATORS.
           05  END-OF-FILE                  PIC XXX      VALUE "NO ".
       PROCEDURE DIVISION.
       MAIN-PROGRAM.
           PERFORM A-100-INITIALIZATION.
           PERFORM B-100-PROCESS-FILE.
           PERFORM C-100-WRAP-UP.
           STOP RUN.
       A-100-INITIALIZATION.
           OPEN INPUT CUSTOMER-FILE
                OUTPUT CUSTOMER-REPORT.
       B-100-PROCESS-FILE.
           READ CUSTOMER-FILE
               AT END
                  MOVE "YES" TO END-OF-FILE.
           PERFORM B-200-PROCESS-RECORD
               UNTIL END-OF-FILE = "YES".
       B-200-PROCESS-RECORD.
           MOVE SPACES TO PRINTZ.
           MOVE CUSTOMER-ID TO CUSTOMER-ID-PR.
           MOVE CUSTOMER-NAME TO CUSTOMER-NAME-PR.
           MOVE CUSTOMER-STREET TO CUSTOMER-STREET-PR.
           MOVE CUSTOMER-CITY TO CUSTOMER-CITY-PR.
           MOVE CUSTOMER-STATE TO CUSTOMER-STATE-PR.
           MOVE CUSTOMER-ZIP TO CUSTOMER-ZIP-PR.
           WRITE PRINTZ
               AFTER ADVANCING 1 LINE.
           READ CUSTOMER-FILE
               AT END
                  MOVE "YES" TO END-OF-FILE.
       C-100-WRAP-UP.
           CLOSE CUSTOMER-FILE
                 CUSTOMER-REPORT.