       IDENTIFICATION DIVISION.
      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++
      *++                                                   ++
      *++   I D E N T I F I C A T I O N   D I V I S I O N   ++
      *++                                                   ++
      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++

       PROGRAM-ID. DERFVUM.
      *--------------------


       ENVIRONMENT DIVISION.
      *++++++++++++++++++++++++++++++++++++++++++++++++++
      *++                                              ++
      *++   E N V I R O N M E N T   D I V I S I O N    ++
      *++                                              ++
      *++++++++++++++++++++++++++++++++++++++++++++++++++

       CONFIGURATION SECTION.
      *----------------------

       SOURCE-COMPUTER. P3500.
       OBJECT-COMPUTER. P3500.


       INPUT-OUTPUT SECTION.
      *---------------------
 
       FILE-CONTROL.
           SELECT VDAT ASSIGN TO OUTPUT "VUMSATZ".


       DATA DIVISION.
      *+++++++++++++++++++++++++++++++++++
      *++                               ++
      *++   D A T A   D I V I S I O N   ++
      *++                               ++
      *+++++++++++++++++++++++++++++++++++

       FILE SECTION.
      *-------------

       FD  VDAT 
           RECORD CONTAINS 30 CHARACTERS
           LABEL RECORD IS OMITTED
           DATA RECORD IS VSATZ.

       01  VSATZ.
           02 VSA                      PIC            9.
           02 VNR                      PIC         9(6).
           02 VRNR                     PIC         9(8).
           02 VRDAT                    PIC         9(6).
           02 VUMS                     PIC      9(7)V99.
 
       WORKING-STORAGE SECTION.
      *------------------------
 
       01  ENDE               PIC 9.                       
           88  J  VALUE IS 1.
           88  N  VALUE IS 2. 


       PROCEDURE DIVISION. 
      *+++++++++++++++++++++++++++++++++++++++++++
      *++                                       ++
      *++  P R O C E D U R E   D I V I S I O N  ++
      *++                                       ++
      *+++++++++++++++++++++++++++++++++++++++++++
 
       ANFANG.
           OPEN OUTPUT VDAT.

       ERFASS.
           DISPLAY "SATZART:", LINE 5, POSITION 15, LOW, ERASE.
           ACCEPT VSA, LINE 5, POSITION 35, ECHO, PROMPT "_".

           DISPLAY "VERTRETER-NR:", LINE 8, POSITION 15, LOW.
           ACCEPT VNR, LINE 8, POSITION 35, ECHO, PROMPT "_".
 
           DISPLAY "RECHN-NR:", LINE 11, POSITION 15, LOW.
           ACCEPT VRNR, LINE 11, POSITION 35, ECHO, PROMPT "_".

           DISPLAY "DATUM:", LINE 14, POSITION 15, LOW.
           ACCEPT VRDAT FROM DATE.           
           DISPLAY VRDAT, LINE 14, POSITION 35.

           DISPLAY "UMSATZ:", LINE 17, POSITION 15, LOW.                
           ACCEPT VUMS, LINE 17, POSITION 35, ECHO, CONVERT, PROMPT "_",
           SIZE 9.

           WRITE VSATZ.
           MOVE SPACES TO VSATZ.
 
           DISPLAY "EINGABE BEENDEN? ", LINE 20, POSITION 15.
           DISPLAY "JA = EIN GROSSES J" , LINE 21 , POSITION 15.      
           DISPLAY "NEIN = EIN GROSSES N" , LINE 22 , POSITION 15.           

           ACCEPT ENDE , LINE 23 , POSITION 35, PROMPT "*".
 
           IF ENDE = 1 GO TO EOF.
           IF ENDE = 2 GO TO ERFASS.

       EOF.               
           CLOSE VDAT.
           STOP RUN.
  