I am currently working on a lab in my cobol programming class. Its quite funny because most of this code is from the book we are using and i have just modified it to fit the lab description. I compile it and it exits the program with exit code 1 and outputs this:
lab2.cbl:13: Error: PERFORM statement not terminated by END-PERFORM
lab2.cbl:19: Error: syntax error, unexpected end of file
[Finished in 0.0s with exit code 1]
I also even asked my Teacher assistant to help debug this but it seemed to of baffled him too.
here is my code:
IDENTIFICATION DIVISION.
PROGRAM-ID. lab2.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 SALES-TAX PIC 9V9.
01 SALES-AMOUNT PIC 999V9.
01 SALES-TOTAL PIC 999V99.
01 MORE-DATA PIC X VALUE 'Y'.
PROCEDURE DIVISION.
100-MAIN.
PERFORM UNTIL MORE-DATA = 'N'
DISPLAY 'Enter a sales amount ->'
ACCEPT SALES-AMOUNT
MULTIPLY .08 BY SALES-AMOUNT GIVING SALES-TAX
COMPUTE SALES-TOTAL = (SALES-TAX + SALES-AMOUNT)
DISPLAY 'The total sales is 'SALES-TOTAL
DISPLAY 'Would you like to run it again (Y or N)?'
ACCEPT MORE-DATA
END-PERFORM
STOP RUN.
Any kind of help would be great.
thank you