Reading and displaying a file in Cobol : I am creating a program that is reading in a file which consists of companies and their information. I am new to Cobol so I am having some trouble trying to find where my problem is. So far the program is compiling but the output file is showing the headings and the title with only $00.00, 000, 0.0 for the quote, number of items and the rating. It is not printing the name, number and all the other info including the quote, number of items and the rating. Any ideas on what could be going on? It is supposed to read all the records in my file then display them all, then it is to display the highest quote and the lowest rate and then the avgerage information. 

   

           IDENTIFICATION DIVISION.
           PROGRAM-ID. MOVING-QUOTES.
    
           ENVIRONMENT DIVISION.
           INPUT-OUTPUT SECTION.
           FILE-CONTROL.
    
               SELECT MOVING-QUOTES-FILE ASSIGN TO 'Moving-Quotes.txt'
                    ORGANIZATION IS LINE SEQUENTIAL.
               SELECT MOVING-QUOTES-RESULTS-FILE ASSIGN TO "MOVING.TXT"
                    ORGANIZATION IS LINE SEQUENTIAL.
    
           DATA DIVISION.
           FILE SECTION.
           FD MOVING-QUOTES-FILE.
           01 FS-MOVING-QUOTES-RECORD             PIC X(45).
    
           FD MOVING-QUOTES-RESULTS-FILE.
           01 MOVING-QUOTES-RESULTS-RECORD        PIC X(80).
    
           WORKING-STORAGE SECTION.
           01 WS-MOVING-QUOTES-RECORD.
               05 FILLER                           PIC X(2).
               05 MQR-COMPANY-NAME                 PIC X(15).
               05 FILLER                           PIC X(1).
               05 MQR-COMPANY-PHONE                PIC X(13).
               05 FILLER                           PIC X(1).
               05 MQR-MOVING-QUOTE                 PIC 9999V99.
               05 FILLER                           PIC X(1).
               05 MQR-NUMBER-ITEMS                 PIC 999.
               05 FILLER                           PIC X(1).
               05 MQR-RATING                       PIC 9V9.
    
           01 PRT-MOVING-QUOTES-FILE.
               05 FILLER                           PIC X(2).
               05 PRT-MQR-COMPANY-NAME             PIC X(15).
               05 FILLER                           PIC X(1) VALUE SPACES.
               05 PRT-MQR-COMPANY-PHONE            PIC X(13).
               05 FILLER                           PIC X(5).
               05 PRT-MQR-MOVING-QUOTE             PIC $zz99.99.
               05 FILLER                           PIC X(7).
               05 PRT-MQR-NUMBER-ITEMS             PIC 9(3).
               05 FILLER                           PIC X(15).
               05 PRT-MQR-RATING                   PIC 9.9.
    
              01 PAGE-TITLE.
               05                  PIC X(22) VALUE SPACES.
               05                  PIC X(40) VALUE  'MOVING COMPANY QUOTES'.
               05                  PIC X(18) VALUE SPACES.
               05 PRT-PAGE-NUM     PIC Z9.
    
           01 QUOTE-HEADING-1.
               05                               PIC X(7)  VALUE SPACES.
               05                               PIC X(7)  VALUE 'COMPANY'.
               05                               PIC X(9)  VALUE SPACES.
               05                               PIC X(5)  VALUE 'PHONE'.
               05                               PIC X(21) VALUE SPACES.
               05                               PIC X(9)  VALUE 'NUMBER OF'.
               05                               PIC X(11) VALUE SPACES.
               05                               PIC X(4)  VALUE 'YELP'.
               05                               PIC X(7).
    
           01 QUOTE-HEADING-2.
               05                                  PIC X(8).
               05                                  PIC X(4)  VALUE 'NAME'.
               05                                  PIC X(11) VALUE SPACES.
               05                                  PIC X(6)  VALUE 'NUMBER'.
               05                                  PIC X(9)  VALUE SPACES.
               05                                  PIC X(5)  VALUE 'QUOTE'.
               05                                  PIC X(7)  VALUE SPACES.
               05                                  PIC X(5)  VALUE 'ITEMS'.
               05                                  PIC X(13) VALUE SPACES.
               05                                  PIC X(6)  VALUE 'RATING'.
               05                                  PIC X(2)  VALUE SPACES.
           01 QUOTE-HEADING-3.
               05                                  PIC X(6)  VALUE SPACES.
               05                                  PIC X(9)  VALUE  ALL '-'.
               05                                  PIC X(7)  VALUE SPACES.
               05                                  PIC X(8)  VALUE  ALL '-'.
               05                                  PIC X(7)  VALUE SPACES.
               05                                  PIC X(7)  VALUE  ALL '-'.
               05                                  PIC X(5)  VALUE SPACES.
               05                                  PIC X(11) VALUE  ALL '-'.
               05                                  PIC X(7)  VALUE SPACES.
               05                                  PIC X(8)  VALUE  ALL '-'.
     
                01 WS-SWITCHES-AND-COUNTERS.
               05 WS-EOF                         PIC X       VALUE 'F'.
               05 NUMBER-OF-PAGES                PIC S9(4)   COMP  VALUE 0.
               05 NUMBER-OF-LINES-USED           PIC S9(4)   COMP VALUE 0.
               05 WS-HI-BID                      PIC 9999V99 VALUE 0.
               05 WS-LO-BID                      PIC 9999V99 VALUE 9999.99.
               05 WS-TOTAL-BID-SUM               PIC 9999V99 VALUE 0.
               05 WS-NUMBER-OF-RECORDS           PIC 9(4)    VALUE 4.
               05 WS-AVERAGE                     PIC 9999V99.
    
           01 HI-COMPANY-INFO.
               05 FILLER                           PIC X(6) VALUE SPACES.
               05 SAV-HI-MQR-COMPANY-NAME          PIC X(15).
               05 FILLER                           PIC X(2) VALUE SPACES.
               05 SAV-HI-MQR-COMPANY-PHONE         PIC X(13).
               05 FILLER                           PIC X(2) VALUE SPACES.
               05 SAV-HI-MQR-QUOTE                 PIC $ZZ99.99.
    
           01 LO-COMPANY-INFO.
               05 FILLER                           PIC X(5) VALUE SPACES.
               05 SAV-LO-MQR-COMPANY-NAME          PIC X(15).
               05 FILLER                           PIC X(2) VALUE SPACES.
               05 SAV-LO-MQR-COMPANY-PHONE         PIC X(13).
               05 FILLER                           PIC X(2) VALUE SPACES.
               05 SAV-LO-MQR-QUOTE                 PIC $ZZ99.99.
    
               01 AVG-INFO.
               05                                  PIC X(6) VALUE SPACES.
               05 SAV-AVG                          PIC $ZZ99.99.
    
           01 HI-INFO-HD1.
               05                                  PIC X(8).
               05                                  PIC X(7) VALUE 'HIGH'.
               05                                  PIC X(8).
               05                                  PIC X(5) VALUE 'PHONE'.
               05                                  PIC X(52).
    
           01 HI-INFO-HD2.
               05                                  PIC X(6).
               05                                  PIC X(7) VALUE 'COMPANY'.
               05                                  PIC X(10).
               05                                  PIC X(6) VALUE 'NUMBER'.
               05                                  PIC X(9).
               05                                  PIC X(5) VALUE 'QUOTE'.
               05                                  PIC X(37).
           01 HI-INFO-HD3.
               05                                  PIC X(5).
               05                                  PIC X(9) VALUE ALL '-'.
               05                                  PIC X(8).
               05                                  PIC X(8) VALUE ALL '-'.
               05                                  PIC X(7).
               05                                  PIC X(7) VALUE ALL '-'.
            05                                  PIC X(36).
    
           01 LO-INFO-HD1.
               05                                  PIC X(7).
               05                                  PIC X(3) VALUE 'LOW'.
               05                                  PIC X(13).
               05                                  PIC X(5) VALUE 'PHONE'.
               05                                  PIC X(52).
    
           01 LO-INFO-HD2.
               05                                  PIC X(6).
               05                                  PIC X(7) VALUE 'COMPANY'.
               05                                  PIC X(10).
               05                                  PIC X(6) VALUE 'NUMBER'.
               05                                  PIC X(9).
               05                                  PIC X(5) VALUE 'QUOTE'.
               05                                  PIC X(37).
    
           01 LO-INFO-HD3.
                          05                                  PIC X(5).
               05                                  PIC X(9) VALUE ALL '-'.
               05                                  PIC X(8).
               05                                  PIC X(8) VALUE ALL '-'.
               05                                  PIC X(7).
               05                                  PIC X(7) VALUE ALL '-'.
               05                                  PIC X(36).
    
           01 AVG-INFO-HD1.
               05                                  PIC X(7).
               05                                  PIC X(7) VALUE 'AVERAGE'.
    
           01 AVG-INFO-HD2.
               05                                  PIC X(6).
               05                                  PIC X(9) VALUE ALL '-'.
               05                                  PIC X(65).
              
          PROCEDURE DIVISION.
           0000-MAINLINE.
               PERFORM 1000-START-MOVING-QUOTES
               PERFORM 2000-READ-N-PRINT-MQ
                   UNTIL WS-EOF = 'T'.
               PERFORM 3000-FINISH-UP
               STOP RUN.
    1000-START-MOVING-QUOTES.
               OPEN INPUT MOVING-QUOTES-FILE
                    OUTPUT MOVING-QUOTES-RESULTS-FILE.
    
               PERFORM 8000-READ-MOVING-QUOTES-FILE.
               IF WS-EOF NOT ='T'
                   PERFORM 8020-PRINT-TITLE-AND-HEADINGS.
    
    
           8000-READ-MOVING-QUOTES-FILE.
               READ MOVING-QUOTES-FILE
                   AT END MOVE 'T' TO WS-EOF
               MOVE FS-MOVING-QUOTES-RECORD TO
                    WS-MOVING-QUOTES-RECORD.
    
           8010-CHECK-LINES.
               ADD 2 TO NUMBER-OF-LINES-USED.
               IF NUMBER-OF-LINES-USED > 80
                  PERFORM 8020-PRINT-TITLE-AND-HEADINGS.
    
           8020-PRINT-TITLE-AND-HEADINGS.
               ADD 1 TO NUMBER-OF-PAGES
               MOVE NUMBER-OF-PAGES TO PRT-PAGE-NUM
    
           MOVE SPACES TO MOVING-QUOTES-RESULTS-RECORD
               MOVE PAGE-TITLE TO MOVING-QUOTES-RESULTS-RECORD
               WRITE MOVING-QUOTES-RESULTS-RECORD AFTER ADVANCING 3 LINES
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM NUMBER-OF-PAGES
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM QUOTE-HEADING-1
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM QUOTE-HEADING-2
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM QUOTE-HEADING-3
                   AFTER ADVANCING 1 LINE.
    
           8025-PRINT-HI-LO-HD.
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM HI-INFO-HD1
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM HI-INFO-HD2
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM HI-INFO-HD3
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM LO-INFO-HD1
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM LO-INFO-HD2
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM LO-INFO-HD3
                   AFTER ADVANCING 1 LINE
               WRITE MOVING-QUOTES-RESULTS-RECORD FROM AVG-INFO-HD1
                   AFTER ADVANCING 1 LINE
                                                                  
           WRITE MOVING-QUOTES-RESULTS-RECORD FROM AVG-INFO-HD2
                   AFTER ADVANCING 1 LINE.
    
    
           2000-READ-N-PRINT-MQ.
               PERFORM 8010-CHECK-LINES
               MOVE MQR-COMPANY-NAME TO PRT-MQR-COMPANY-NAME
               MOVE MQR-COMPANY-PHONE TO PRT-MQR-COMPANY-PHONE
               MOVE MQR-MOVING-QUOTE TO PRT-MQR-MOVING-QUOTE
               MOVE MQR-NUMBER-ITEMS TO PRT-MQR-NUMBER-ITEMS
               MOVE MQR-RATING TO PRT-MQR-RATING
               MOVE PRT-MOVING-QUOTES-FILE TO MOVING-QUOTES-RESULTS-RECORD
               WRITE MOVING-QUOTES-RESULTS-RECORD
                   AFTER ADVANCING 2 LINES
               PERFORM 2010-FIND-HI-LO-AVG.
               PERFORM 8000-READ-MOVING-QUOTES-FILE.
    
        2010-FIND-HI-LO-AVG.
               IF (MQR-RATING >= 3.5)
               PERFORM 2011-STORING-VAL-HI
               PERFORM 2012-FIND-HI
               PERFORM 2013-STORING-VAL-LO
               PERFORM 2014-FIND-LO
               PERFORM 2015-GET-SUM
               PERFORM 8000-READ-MOVING-QUOTES-FILE.
    
           2011-STORING-VAL-HI.
               MOVE MQR-MOVING-QUOTE TO WS-HI-BID.
    
           2012-FIND-HI.
               IF (MQR-MOVING-QUOTE > WS-HI-BID)
               MOVE MQR-MOVING-QUOTE TO WS-HI-BID
               MOVE MQR-COMPANY-NAME TO SAV-HI-MQR-COMPANY-NAME
               MOVE MQR-COMPANY-PHONE TO SAV-HI-MQR-COMPANY-PHONE
               MOVE MQR-MOVING-QUOTE TO SAV-HI-MQR-QUOTE.
    
           2013-STORING-VAL-LO.
               MOVE MQR-MOVING-QUOTE TO WS-LO-BID.
    
           2014-FIND-LO.
               IF (MQR-MOVING-QUOTE < WS-LO-BID)
               MOVE MQR-MOVING-QUOTE TO WS-LO-BID
               MOVE MQR-COMPANY-NAME TO SAV-LO-MQR-COMPANY-NAME
         MOVE MQR-COMPANY-PHONE TO SAV-LO-MQR-COMPANY-PHONE
               MOVE MQR-MOVING-QUOTE TO SAV-LO-MQR-QUOTE.
    
           2015-GET-SUM.
               ADD MQR-MOVING-QUOTE GIVING WS-TOTAL-BID-SUM.
    
           2020-READ-N-PRINT-MQR.
               MOVE MQR-COMPANY-NAME  TO PRT-MQR-COMPANY-NAME
               MOVE MQR-COMPANY-PHONE TO PRT-MQR-COMPANY-PHONE
               MOVE MQR-MOVING-QUOTE  TO PRT-MQR-MOVING-QUOTE
               MOVE MQR-NUMBER-ITEMS  TO PRT-MQR-NUMBER-ITEMS
               MOVE MQR-RATING        TO PRT-MQR-RATING
    
               MOVE PRT-MOVING-QUOTES-FILE TO MOVING-QUOTES-RESULTS-RECORD
               WRITE MOVING-QUOTES-RESULTS-RECORD
                   AFTER ADVANCING 2 LINES
               PERFORM 8000-READ-MOVING-QUOTES-FILE.
    
      3000-FINISH-UP.
               DIVIDE WS-TOTAL-BID-SUM BY 12 GIVING WS-AVERAGE
               MOVE WS-AVERAGE TO SAV-AVG
               PERFORM 8120-PRINT-CALC-DATA
               PERFORM 3010-PRT-HI
               PERFORM 3020-PRT-LO
               PERFORM 3030-PRT-AVG
    
               CLOSE MOVING-QUOTES-FILE
                     MOVING-QUOTES-RESULTS-FILE.
    
    
           3010-PRT-HI.
               MOVE HI-COMPANY-INFO TO MOVING-QUOTES-RESULTS-RECORD.
    
           3020-PRT-LO.
               MOVE LO-COMPANY-INFO TO MOVING-QUOTES-RESULTS-RECORD.
    
           3030-PRT-AVG.
               MOVE SAV-AVG TO MOVING-QUOTES-RESULTS-RECORD.
    
           8120-PRINT-CALC-DATA.
               MOVE SPACES TO MOVING-QUOTES-RESULTS-RECORD
               WRITE MOVING-QUOTES-RESULTS-RECORD
                   AFTER ADVANCING 2 LINES.
    
    
    
           
----------------------------------------------
This is my input file record 

  

      Movers         (361)443-3245 22000 30 25
      Move With Us   (361)848-9354 19000 25 39
      Move It        (361)765-9843 13299 20 40
      Texas Movers   (361)888-7623 20000 30 27
      We Haul It     (210)667-2341 50000 50 40
      Carry It       (512)786-9865 45000 40 29
      U Haul         (361)764-0987 35000 30 40
      CC Movers      (361)738-8214 32500 50 33
      Bargain Moving (361)923-4576 28000 45 38
      We Move It All (361)555-8390 35000 50 40
      Awesome Movers (361)888-3454 32500 41 21
      Payless Movers (361)555-0347 19500 30 32

