       IDENTIFICATION DIVISION.
      *************************
       PROGRAM-ID. VHS03.

       ENVIRONMENT DIVISION.
      **********************
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. P3500.
       OBJECT-COMPUTER. P3500.

       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT VDAT ASSIGN TO INPUT "VUMSATZ".
           SELECT VLISTE ASSIGN TO PRINT "PRINTER".

       DATA DIVISION.
      **************
       FILE SECTION.

       FD  VDAT
           RECORD CONTAINS 30 CHARACTERS 
           LABEL RECORD IS STANDARD
           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.

       
       FD  VLISTE
           RECORD CONTAINS 132 CHARACTERS
           LABEL RECORD IS OMITTED
           DATA RECORD IS VLATZ.             

       01  VLATZ.
           02  FILLER                    PIC     X(10).
           02  VLNR                      PIC      9(6).
           02  FILLER                    PIC      X(5).
           02  DUMS                      PIC   9(9).99.
           02  FILLER                    PIC       XXX.
           02  VLSTERN                   PIC       XXX.
           02  FILLER                    PIC     X(93).

       WORKING-STORAGE SECTION.
      *------------------------

       77  GUMS                          PIC   9(9)V99.

       PROCEDURE DIVISION. 
      ********************
       ANFANG.
           OPEN INPUT VDAT. 
           OPEN OUTPUT VLISTE.
           
           MOVE ZEROS TO GUMS.

       NEU1.
           MOVE SPACES TO VLATZ.
       NEU2.
           READ VDAT AT END GO TO ENDE.
           IF VSA NOT = 1 GO TO NEU2.
           IF VUMS NOT GREATER THAN 20000.00 GO TO NEU2.
                                 
           ADD VUMS TO GUMS.

           MOVE VNR TO VLNR.
           MOVE VUMS TO DUMS.
            
           WRITE VLATZ.            
           GO TO NEU1.
       ENDE.
           MOVE GUMS TO DUMS.
           MOVE "***" TO VLSTERN.
           WRITE VLATZ.            

           CLOSE VDAT.
           CLOSE VLISTE.
           STOP RUN.
