This is a program for my intro cobol course. When i try to run the program i get 'file not found error 13'. My select and assign clause seem to be correct. This is the first cobol program i've written so if u can look at my code and make any suggestions i would appreciate it.
THANK YOU
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. HP8665C.
OBJECT-COMPUTER. HP8665C.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT BULL-CUSTOMER-FILE ASSIGN TO
"C:\BULL-CUSTOMER-FILE.txt".
SELECT BULL-REPORT ASSIGN TO "OUTPUT.Dat".
*
DATA DIVISION.
FILE SECTION.
FD BULL-CUSTOMER-FILE
LABEL RECORDS ARE OMITTED.
01 BR-BULL-RECORD.
05 BR-CUSTOMER PIC X(20).
05 BR-BREED PIC X(20).
05 BR-SALE-DATE PIC X(9).
05 BR-BIRTH-DATE PIC X(9).
05 BR-BULL-WEIGHT PIC 9(4).
05 BR-SALE-PRICE PIC 9(5)V99.
FD BULL-REPORT.
01 CR-CUSTOMER-RECORD PIC X(132).
WORKING-STORAGE SECTION.
01 WS-DATE PIC 9(6).
01 WS-PROCESSING-INDICATORS.
05 WS-END-OF-FILE-INDICATOR PIC X(3).
88 END-OF-FILE VALUE 'NO '.
01 WS-COUNTER PIC 999 VALUE 0.
01 WS-ACCUMULATORS.
05 TOT-TOTAL-SALES PIC 9(5)V99 VALUE 0.
05 TOT-TOTAL-POUNDS PIC 9(4) VALUE 0.
01 WS-DATA.
05 WS-AVERAGE-SALE-PRICE PIC 9(5)V99.
05 WS-AVERAGE-PRICE-POUND PIC 9(5)V99.
01 DL-DETAIL-LINE.
05 FILLER PIC X(22) VALUE SPACES.
05 DL-CUSTOMER PIC X(20).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-BREED PIC X(20).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-SALE-DATE PIC Z9/99/99.
05 FILLER PIC X(2) VALUE SPACES.
05 DL-BIRTH-DATE PIC Z9/99/99.
05 FILLER PIC X(5) VALUE SPACES.
05 DL-BULL-WEIGHT PIC 9(4).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-SALE-PRICE PIC $ZZZZZ.99.
05 FILLER PIC X(20) VALUE SPACES.
01 HD-REPORT-HEADING-COMPANY-1.
05 FILLER PIC X(58) VALUE SPACES.
05 FILLER PIC X(16)
VALUE 'BULL TRADERS INC'.
05 FILLER PIC X(59) VALUE SPACES.
01 HD-REPORT-HEADING-COMPANY-2.
05 FILLER PIC X(57) VALUE SPACES.
05 FILLER PIC X(20)
VALUE 'LAWRENCE COUNTY, MO.'.
05 FILLER PIC X(57) VALUE SPACES.
01 HD-REPORT-HEADING-DATE.
05 FILLER PIC X(62) VALUE SPACES.
05 HD-HEADING-DATE PIC X(6).
05 FILLER PIC X(62) VALUE SPACES.
01 HD-COLLUMN-HEADING-1.
05 FILLER PIC X(22) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'CUSTOMER'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'BULL'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'SALES'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'BIRTH'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(4) VALUE 'BULL'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(7) VALUE 'SALE'.
05 FILLER PIC X(22) VALUE SPACES.
01 HD-COLLUMN-HEADING-2.
05 FILLER PIC X(24) VALUE SPACES.
05 FILLER PIC X(18) VALUE 'NAME'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'BREED'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'DATE'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'DATE'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'WEIGHT'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(7) VALUE 'PRICE'.
05 FILLER PIC X(22) VALUE SPACES.
01 FT-FOOTING-1.
05 FILLER PIC X(23)
VALUE 'TOTAL TRANSACTIONS ARE '.
05 FT-TRANSACTIONS PIC ZZ9.
01 FT-FOOTING-2.
05 FILLER PIC X(13)
VALUE 'TOTAL POUNDS '.
05 FT-POUNDS PIC ZZZ9.
01 FT-FOOTING-3.
05 FILLER PIC X(26)
VALUE 'TOTAL DOLLARS RECIEVED IS '.
05 FT-DOLLARS-RECIEVED PIC $$,$$$.99.
01 FT-FOOTING-4.
05 FILLER PIC X(27)
VALUE 'AVERAGE PRICE PER POUND IS '.
05 FT-AVERAGE-POUND PIC $$$.99.
01 FT-FOOTING-5.
05 FILLER PIC X(22)
VALUE 'AVERAGE SALE PRICE IS '.
05 FT-AVERAGE-SALE PIC $$,$$$.99.
*
PROCEDURE DIVISION.
A000-BULL-REPORT.
PERFORM B100-INITIAL-ROUTINE.
PERFORM B200-PROCESS-RECORDS
UNTIL END-OF-FILE.
PERFORM B300-ENDING-ROUTINE.
STOP RUN.
B100-INITIAL-ROUTINE.
PERFORM C100-OPEN-FILES.
PERFORM C200-INITIALIZE-VARIABLES.
PERFORM Z100-PRINT-HEADINGS.
PERFORM Z200-READ-BULL-RECORD.
B200-PROCESS-RECORDS.
PERFORM C400-CREATE-DETAIL-RECORD.
PERFORM C500-CALCULATE-VALUES.
PERFORM C600-CREATE-OUTPUT.
PERFORM Z200-READ-BULL-RECORD.
B300-ENDING-ROUTINE.
CLOSE BULL-CUSTOMER-FILE
BULL-REPORT.
C100-OPEN-FILES.
OPEN INPUT BULL-CUSTOMER-FILE
OUTPUT BULL-REPORT.
C200-INITIALIZE-VARIABLES.
INITIALIZE WS-COUNTER.
INITIALIZE WS-ACCUMULATORS.
INITIALIZE WS-DATA.
ACCEPT WS-DATE FROM DATE.
C400-CREATE-DETAIL-RECORD.
MOVE BR-CUSTOMER TO DL-CUSTOMER.
MOVE BR-BREED TO DL-BREED.
MOVE BR-BIRTH-DATE TO DL-BIRTH-DATE.
MOVE BR-SALE-DATE TO DL-SALE-DATE.
MOVE BR-BULL-WEIGHT TO DL-BULL-WEIGHT.
MOVE BR-SALE-PRICE TO DL-SALE-PRICE.
C500-CALCULATE-VALUES.
PERFORM D100-AVERAGE-PRICE-PER-POUND.
PERFORM D200-AVERAGE-SALE-PRICE.
C600-CREATE-OUTPUT.
MOVE WS-COUNTER TO FT-TRANSACTIONS.
MOVE TOT-TOTAL-SALES TO FT-DOLLARS-RECIEVED.
MOVE TOT-TOTAL-POUNDS TO FT-POUNDS.
MOVE WS-AVERAGE-PRICE-POUND TO FT-AVERAGE-POUND.
MOVE WS-AVERAGE-SALE-PRICE TO FT-AVERAGE-SALE.
C700-PROCESS-TOTALS.
MOVE FT-FOOTING-1 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-2 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-3 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-4 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-5 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
D100-AVERAGE-PRICE-PER-POUND.
DIVIDE TOT-TOTAL-SALES BY TOT-TOTAL-POUNDS
GIVING WS-AVERAGE-PRICE-POUND.
D200-AVERAGE-SALE-PRICE.
DIVIDE TOT-TOTAL-SALES BY WS-COUNTER
GIVING WS-AVERAGE-SALE-PRICE.
D300-CREATE-TOTALS.
Z100-PRINT-HEADINGS.
MOVE HD-REPORT-HEADING-COMPANY-1 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE HD-REPORT-HEADING-COMPANY-2 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
ACCEPT WS-DATE FROM DATE.
MOVE WS-DATE TO HD-HEADING-DATE.
MOVE HD-HEADING-DATE TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE ALL '*' TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
Z200-READ-BULL-RECORD.
READ BULL-CUSTOMER-FILE
AT END MOVE 'NO ' TO WS-END-OF-FILE-INDICATOR.
THANK YOU
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. HP8665C.
OBJECT-COMPUTER. HP8665C.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT BULL-CUSTOMER-FILE ASSIGN TO
"C:\BULL-CUSTOMER-FILE.txt".
SELECT BULL-REPORT ASSIGN TO "OUTPUT.Dat".
*
DATA DIVISION.
FILE SECTION.
FD BULL-CUSTOMER-FILE
LABEL RECORDS ARE OMITTED.
01 BR-BULL-RECORD.
05 BR-CUSTOMER PIC X(20).
05 BR-BREED PIC X(20).
05 BR-SALE-DATE PIC X(9).
05 BR-BIRTH-DATE PIC X(9).
05 BR-BULL-WEIGHT PIC 9(4).
05 BR-SALE-PRICE PIC 9(5)V99.
FD BULL-REPORT.
01 CR-CUSTOMER-RECORD PIC X(132).
WORKING-STORAGE SECTION.
01 WS-DATE PIC 9(6).
01 WS-PROCESSING-INDICATORS.
05 WS-END-OF-FILE-INDICATOR PIC X(3).
88 END-OF-FILE VALUE 'NO '.
01 WS-COUNTER PIC 999 VALUE 0.
01 WS-ACCUMULATORS.
05 TOT-TOTAL-SALES PIC 9(5)V99 VALUE 0.
05 TOT-TOTAL-POUNDS PIC 9(4) VALUE 0.
01 WS-DATA.
05 WS-AVERAGE-SALE-PRICE PIC 9(5)V99.
05 WS-AVERAGE-PRICE-POUND PIC 9(5)V99.
01 DL-DETAIL-LINE.
05 FILLER PIC X(22) VALUE SPACES.
05 DL-CUSTOMER PIC X(20).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-BREED PIC X(20).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-SALE-DATE PIC Z9/99/99.
05 FILLER PIC X(2) VALUE SPACES.
05 DL-BIRTH-DATE PIC Z9/99/99.
05 FILLER PIC X(5) VALUE SPACES.
05 DL-BULL-WEIGHT PIC 9(4).
05 FILLER PIC X(5) VALUE SPACES.
05 DL-SALE-PRICE PIC $ZZZZZ.99.
05 FILLER PIC X(20) VALUE SPACES.
01 HD-REPORT-HEADING-COMPANY-1.
05 FILLER PIC X(58) VALUE SPACES.
05 FILLER PIC X(16)
VALUE 'BULL TRADERS INC'.
05 FILLER PIC X(59) VALUE SPACES.
01 HD-REPORT-HEADING-COMPANY-2.
05 FILLER PIC X(57) VALUE SPACES.
05 FILLER PIC X(20)
VALUE 'LAWRENCE COUNTY, MO.'.
05 FILLER PIC X(57) VALUE SPACES.
01 HD-REPORT-HEADING-DATE.
05 FILLER PIC X(62) VALUE SPACES.
05 HD-HEADING-DATE PIC X(6).
05 FILLER PIC X(62) VALUE SPACES.
01 HD-COLLUMN-HEADING-1.
05 FILLER PIC X(22) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'CUSTOMER'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'BULL'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'SALES'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'BIRTH'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(4) VALUE 'BULL'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(7) VALUE 'SALE'.
05 FILLER PIC X(22) VALUE SPACES.
01 HD-COLLUMN-HEADING-2.
05 FILLER PIC X(24) VALUE SPACES.
05 FILLER PIC X(18) VALUE 'NAME'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(20) VALUE 'BREED'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'DATE'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'DATE'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(6) VALUE 'WEIGHT'.
05 FILLER PIC X(5) VALUE SPACES.
05 FILLER PIC X(7) VALUE 'PRICE'.
05 FILLER PIC X(22) VALUE SPACES.
01 FT-FOOTING-1.
05 FILLER PIC X(23)
VALUE 'TOTAL TRANSACTIONS ARE '.
05 FT-TRANSACTIONS PIC ZZ9.
01 FT-FOOTING-2.
05 FILLER PIC X(13)
VALUE 'TOTAL POUNDS '.
05 FT-POUNDS PIC ZZZ9.
01 FT-FOOTING-3.
05 FILLER PIC X(26)
VALUE 'TOTAL DOLLARS RECIEVED IS '.
05 FT-DOLLARS-RECIEVED PIC $$,$$$.99.
01 FT-FOOTING-4.
05 FILLER PIC X(27)
VALUE 'AVERAGE PRICE PER POUND IS '.
05 FT-AVERAGE-POUND PIC $$$.99.
01 FT-FOOTING-5.
05 FILLER PIC X(22)
VALUE 'AVERAGE SALE PRICE IS '.
05 FT-AVERAGE-SALE PIC $$,$$$.99.
*
PROCEDURE DIVISION.
A000-BULL-REPORT.
PERFORM B100-INITIAL-ROUTINE.
PERFORM B200-PROCESS-RECORDS
UNTIL END-OF-FILE.
PERFORM B300-ENDING-ROUTINE.
STOP RUN.
B100-INITIAL-ROUTINE.
PERFORM C100-OPEN-FILES.
PERFORM C200-INITIALIZE-VARIABLES.
PERFORM Z100-PRINT-HEADINGS.
PERFORM Z200-READ-BULL-RECORD.
B200-PROCESS-RECORDS.
PERFORM C400-CREATE-DETAIL-RECORD.
PERFORM C500-CALCULATE-VALUES.
PERFORM C600-CREATE-OUTPUT.
PERFORM Z200-READ-BULL-RECORD.
B300-ENDING-ROUTINE.
CLOSE BULL-CUSTOMER-FILE
BULL-REPORT.
C100-OPEN-FILES.
OPEN INPUT BULL-CUSTOMER-FILE
OUTPUT BULL-REPORT.
C200-INITIALIZE-VARIABLES.
INITIALIZE WS-COUNTER.
INITIALIZE WS-ACCUMULATORS.
INITIALIZE WS-DATA.
ACCEPT WS-DATE FROM DATE.
C400-CREATE-DETAIL-RECORD.
MOVE BR-CUSTOMER TO DL-CUSTOMER.
MOVE BR-BREED TO DL-BREED.
MOVE BR-BIRTH-DATE TO DL-BIRTH-DATE.
MOVE BR-SALE-DATE TO DL-SALE-DATE.
MOVE BR-BULL-WEIGHT TO DL-BULL-WEIGHT.
MOVE BR-SALE-PRICE TO DL-SALE-PRICE.
C500-CALCULATE-VALUES.
PERFORM D100-AVERAGE-PRICE-PER-POUND.
PERFORM D200-AVERAGE-SALE-PRICE.
C600-CREATE-OUTPUT.
MOVE WS-COUNTER TO FT-TRANSACTIONS.
MOVE TOT-TOTAL-SALES TO FT-DOLLARS-RECIEVED.
MOVE TOT-TOTAL-POUNDS TO FT-POUNDS.
MOVE WS-AVERAGE-PRICE-POUND TO FT-AVERAGE-POUND.
MOVE WS-AVERAGE-SALE-PRICE TO FT-AVERAGE-SALE.
C700-PROCESS-TOTALS.
MOVE FT-FOOTING-1 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-2 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-3 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-4 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE FT-FOOTING-5 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
D100-AVERAGE-PRICE-PER-POUND.
DIVIDE TOT-TOTAL-SALES BY TOT-TOTAL-POUNDS
GIVING WS-AVERAGE-PRICE-POUND.
D200-AVERAGE-SALE-PRICE.
DIVIDE TOT-TOTAL-SALES BY WS-COUNTER
GIVING WS-AVERAGE-SALE-PRICE.
D300-CREATE-TOTALS.
Z100-PRINT-HEADINGS.
MOVE HD-REPORT-HEADING-COMPANY-1 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE HD-REPORT-HEADING-COMPANY-2 TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
ACCEPT WS-DATE FROM DATE.
MOVE WS-DATE TO HD-HEADING-DATE.
MOVE HD-HEADING-DATE TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
MOVE ALL '*' TO CR-CUSTOMER-RECORD.
WRITE CR-CUSTOMER-RECORD
AFTER ADVANCING 1 LINE.
Z200-READ-BULL-RECORD.
READ BULL-CUSTOMER-FILE
AT END MOVE 'NO ' TO WS-END-OF-FILE-INDICATOR.