       IDENTIFICATION DIVISION.
       PROGRAM-ID. TLISTE.
       
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER. P3500.
       OBJECT-COMPUTER. P3500.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT TDAT ASSIGN TO INPUT "TDAT-NAME".
           SELECT LISTE ASSIGN TO PRINT "PRINTER".
       
       DATA DIVISION.
       FILE SECTION.
       FD  TDAT LABEL RECORD IS STANDARD.
       01  TSATZ.
           05 TSA                  PIC 9.
           05 TNR                  PIC 9(5).
           05 TNAME                PIC X(20).
           05 TVNAME               PIC X(20).
           05 TPLZ                 PIC 9(4).
           05 TORT                 PIC X(20).
           05 TSTR                 PIC X(20).
           05 TGEB                 PIC 9(6).
       FD  LISTE LABEL RECORD IS OMITTED.
       01  LSATZ.
           05 FILLER               PIC XX.
           05 DRUF                 PIC X(5).
           05 FILLER               PIC XX.
           05 DNR                  PIC 9(5).
           05 FILLER               PIC X.
           05 DNAME                PIC X(20).
           05 FILLER               PIC XX.
           05 DVNAME               PIC X(20).
           05 FILLER               PIC XX.
           05 DPLZ                 PIC 9999.
           05 FILLER               PIC X.
           05 DORT                 PIC X(20).
           05 FILLER               PIC XX.
           05 DSTR                 PIC X(20).
           05 FILLER               PIC XXX.
           05 DGEB                 PIC 9(6).
           05 FILLER               PIC X(17).

       PROCEDURE DIVISION.
       ANF.
           OPEN INPUT TDAT.
           OPEN OUTPUT LISTE.
       LOOP.
           MOVE SPACES TO LSATZ.
           READ TDAT AT END GO TO EOF.
           IF TSA NOT = 1 MOVE "FRAU" TO DRUF ELSE MOVE "HERR" TO DRUF.
           MOVE TNR TO DNR.
           MOVE TNAME TO DNAME.
           MOVE TVNAME TO DVNAME.
           MOVE TPLZ TO DPLZ.
           MOVE TORT TO DORT.
           MOVE TSTR TO DSTR.
           MOVE TGEB TO DGEB.
           WRITE LSATZ.
       EOF.
           CLOSE TDAT , LISTE.
           STOP RUN.

