Hello guys I'm currently learning COBOL and I'm kinda stuck in my exercise. I'm currently using the german book Insider COBOL to get into the topic.
Now the problem: I was reconstructing the introduction example, it's a calculator for the gross price, you write the amount of products, the price and the VAT and the programm will give you the net amount, the VAT amount and the gross amount back.
At the end I saw I had a typo earlier in the code so i fixed it. After that the whole Procedure Division went wild with all my Displays where I create the gui.
Every error says "syntax error, unexpected (" a few say "expecting OMITTED or Identifier" after the syntax error too. I googled if thesyntax has changed but I don't really get it, whats wrong.
Here is the code:
PROCEDURE DIVISION.
******************************************************************
B100.
******************************************************************
***** Ausgabe Bildkopf
******************************************************************
DISPLAY (1,1) ERASE. *>Löschen des Bildschirms
DISPLAY (1,1)
'B R U T T O P R E I S B E R E C H N U N G PROG01'
WITH HIGHLIGHT.
DISPLAY (2,1) S-Strich.
******************************************************************
***** Einlesen der Daten
******************************************************************
B150.
DISPLAY (3,1)
'MENGE..............................:'.
ACCEPT (3,40) E-MENGE.
DISPLAY (4,1)
'EINZELPREIS:.......................:'.
ACCEPT (4,40) E-PREIS.
DISPLAY (5,1)
'MW-ST-PROZENTSATZ..................:'.
ACCEPT (5,40) E-MWST.
DISPLAY (6,1) S-Strich.
******************************************************************
***** Berechnung
******************************************************************
B200.
COMPUTE S-NETTO = E-MENGE*E-PREIS.
COMPUTE
S-MWST-BETR = S-NETTO*E-MWST/100.
COMPUTE S-BRUTTO = S-NETTO+S-MWST-BETR.
******************************************************************
***** Ausgabe der Ergebnisse
******************************************************************
B300.
MOVE S-NETTO TO A-NETTO. *>Übertragen in Ausgabe
DISPLAY (8,1)
'NETTOWERT:....................:'.
DISPLAY (8,30) A-NETTO.
MOVE S-MWST-BETR TO A-MWST-BETR.
DISPLAY (9,1)
'MEHRWERTSTEUER:...............:'.
DISPLAY (9,30) A-MWST-BETR.
MOVE S-BRUTTO TO A-BRUTTO.
DISPLAY (10,1)
'BRUTTOPREIS:..................:'.
DISPLAY (10,30) A-BRUTTO.
******************************************************************
***** Ausgabe Systemzeile
******************************************************************
B400.
DISPLAY (23,1) S-Strich ERASE.
DISPLAY (24,1) 'WEITERE BERECHNUNGEN (J/N) :'.
ACCEPT (24,40) S-WEITER WITH AUTO-SKIP.
IF S-WEITER = 'J' *> es werden nur Großbuchstaben
GO TO B100 *> aktzeptiert
END-IF.
IF S-WEITER = 'N'
GO To B900
END-IF.
***** falsche Eingabe:
GO TO B400.
I hope I'm not blind or something and thank you in advance :)