000100 IDENTIFICATION DIVISION.                                               
000200 PROGRAM-ID. DOKU.                                                      
000300 DATE-WRITTEN.  11071983.                                               
000400 ENVIRONMENT DIVISION.                                                  
000500 CONFIGURATION SECTION.                                                 
000600 SOURCE-COMPUTER. P3500.                                                
000700 OBJECT-COMPUTER. P3500.                                                
000800 INPUT-OUTPUT SECTION.                                                  
000900 FILE-CONTROL.                                                          
001000     SELECT BIG ASSIGN TO RANDOM "DOK-BL"                               
001100            ORGANIZATION IS RELATIVE                                    
001200            ACCESS IS RANDOM                                            
001300            RELATIVE KEY IS BIG-NR.                                     
001400     SELECT DOK ASSIGN TO RANDOM "DOK-0000"                             
001500            ORGANIZATION IS RELATIVE                                    
001600            ACCESS IS RANDOM                                            
001700            RELATIVE KEY IS DOK-NR.                                     
001800     SELECT DRU ASSIGN TO RANDOM "DOK-SEIT"                             
001900            ORGANIZATION IS RELATIVE                                    
002000            ACCESS IS RANDOM                                            
002100            RELATIVE KEY IS DOK-SE.                                     
002200     SELECT INH ASSIGN TO RANDOM "DOK-INH".                             
002300     SELECT PRO ASSIGN TO INPUT PRO-NAME.                               
002400     SELECT LIS ASSIGN TO PRINT "PRINTER".                              
002500 DATA DIVISION.                                                         
002600 FILE SECTION.                                                          
002700 FD  BIG LABEL RECORD IS STANDARD.                                      
002800 01  BIG-SATZ.                                                          
002900     05 BIG-Z PIC X(8) OCCURS 10.                                       
003000 FD  DOK LABEL RECORD IS STANDARD.                                      
003100 01  DOK-REC PIC X(80).                                                 
003200 FD  DRU LABEL RECORD IS STANDARD.                                      
003300 01  DRUCK-ZEILE.                                                       
003400     10  DRU-ZEI PIC X OCCURS 132.                                      
003500 01  DATEI-REC.                                                         
003600     10  DATEI        PIC X(10).                                        
003700     10  DAT-REF      PIC X OCCURS 50.                                  
003800     10  FILLER       PIC X(72).                                        
003900 01  DPP-RECO.                                                          
004000        10 FILLER        PIC X.                                         
004100        10 DPP-NAME      PIC X(9).                                      
004200        10 DPP-1         PIC X.                                         
004300        10 DPP-MEDIUM    PIC X(7).                                      
004400        10 DPP-2         PIC X.                                         
004500        10 DPP-ORG       PIC X(6).                                      
004600        10 DPP-3         PIC X.                                         
004700        10 DPP-ST        PIC X(6).                                      
004800        10 DPP-4         PIC X(4).                                      
004900        10 DPP-REC       PIC X(7).                                      
005000        10 DPP-5         PIC X(2).                                      
005100        10 DPP-KEY       PIC X(20).                                     
005200        10 FILLER        PIC X(67).                                     
005300 01  PARM-TAB.                                                          
005400     10 SCHLUESSEL PIC X(10).                                           
005500     10 PARM-WE  PIC X(40).                                             
005600     10 FILLER   PIC X(82).                                             
005700 FD  INH LABEL RECORD IS STANDARD.                                      
005800 01  INH-REC.                                                           
005900     05 INH-TEXT      PIC X(60).                                        
006000     05 INH-KAPITEL   PIC X(20).                                        
006100 FD  PRO LABEL RECORD IS STANDARD.                                      
006200 01  PRO-REC.                                                           
006300     05 PRO-Z PIC X OCCURS 80.                                          
006400 01  PRO-REC2.                                                          
006500     05 PRO-WERT.                                                       
006600       10 FILLER PIC XX.                                                
006700       10 PRO-Z9 PIC 99.                                                
006800       10 FILLER PIC XX.                                                
006900     05 PRO-REST1.                                                      
007000       10 FILLER PIC X(65).                                             
007100       10 PRO-VON PIC 9999.                                             
007200       10 FILLER  PIC X(5).                                             
000000 01  PRO-REC3.
000000     05 PRO-WERT2   PIC X(10).
000000     05 FILLER      PIC X(70).   
007300 FD  LIS LABEL RECORD IS OMITTED.                                       
007400 01  LIS-REC PIC X(132).                                                
007500 WORKING-STORAGE SECTION.                                               
007600 01  BILD2.                                                             
007700     05 ZEILE OCCURS 23.                                                
007800       10 ZEILE1-60    PIC X(60).                                       
007900       10 ZEILE61-80   PIC X(20).                                       
008000 01  BILD  REDEFINES BILD2.                                             
008100     05 EIN-TEXT PIC X(40).                                             
008200     05 FILLER   PIC X(10).                                             
008300     05 EINGABE  PIC X(10).                                             
008400     05 FILLER   PIC X(20).                                             
008500     05 ABSTAND  PIC X(320).                                            
008600     05 BIG-ZEILE OCCURS 8.                                             
008700       10 BIG-ZEICHEN PIC X(8) OCCURS 10.                               
008800     05 REST PIC X(800).                                                
008900 01  BILD-IND PIC 9999 COMP.                                            
009000 01  INPUT-AREA.                                                        
009100     05  INPUT-AREA-60 PIC X(60).                                       
009200     05  INPUT-AREA-80 PIC X(20).                                       
009300 01  DRU-ZEI-ZWI PIC X VALUE SPACE.                                     
009400 01  BIG-NR PIC 9999 VALUE ZERO.                                        
009500 01  DOK-NR PIC 9999 VALUE ZERO.                                        
009600 01  DOK-SE PIC 9999 VALUE ZERO.                                        
009700 01  PRO-NAME PIC X(14).                                                
009800 01  ENDE-KZ PIC 9.                                                     
009900 01  SCHLUESS  PIC X(10) VALUE SPACE.                                   
010000 01  PAR-WE    PIC X(40) VALUE SPACE.                                   
010100 01  PROGRAMM-KZ      PIC 9 VALUE ZERO.                                 
010200 01  DAT-ANZ         PIC 9999 COMP VALUE ZERO.                          
010300 01  PRO-WERT-ANZ     PIC 99.                                           
010400 01  DISPLAY-FELD     PIC X(7).                                         
010500 01  I0     PIC 9999 COMP.                                              
010600 01  I1     PIC 9999 COMP.                                              
010700 01  I2     PIC 9999 COMP.                                              
010800 01  I3     PIC 9999 COMP.                                              
010900 01  I4     PIC 9999 COMP.                                              
011000 01  I5     PIC 9999 COMP.                                              
011100 01  IND    PIC 9999 COMP.                                              
011200 01  INPUT-ZAE       PIC 9999 COMP.                                     
011300 01  OUTPUT-ZAE      PIC 9999 COMP.                                     
011400 01  I-O-ZAE         PIC 9999 COMP.                                     
011500 01  I-O-SPALTE      PIC 9999 COMP.                                     
011600 01  INPUT-SPALTE    PIC 9999 COMP.                                     
011700 01  OUTPUT-SPALTE   PIC 9999 COMP.                                     
011800 01  DFP-SY      PIC 9999 COMP.                                         
011900 01  DFP-ZEILE       PIC 9999 COMP.                                     
012000 01  DFP-SP      PIC 9999 COMP.                                         
012100 01  SATZ-IND        PIC 9999 COMP VALUE ZERO.                          
012200 01  SATZ-ZAE        PIC 9999.                                          
012300 01  SATZ-ZAE-REDEF REDEFINES SATZ-ZAE.                                 
012400     05 FILLER PIC XX.                                                  
012500     05 SATZ-ZAE1  PIC 9.                                               
012600     05 SATZ-ZAE2  PIC 9.                                               
012700 01  REC-LAENGE      PIC 9999 COMP.                                     
012800 01  PIC-NAME PIC X(40).                                                
012900 01  L-KZ   PIC 9.                                                      
013000 01  PGM-Z9  PIC Z9.                                                    
013100 01  PGM-ANZ         PIC 9999      VALUE ZERO.                          
013200 01  PGM-AKT     PIC 9999      VALUE ZERO.                              
013300 01  COPY-ANZ        PIC 9999 COMP.                                     
013400 01  COPY-TABELLE.                                                      
013500     05 COPY-NAME PIC X(14) OCCURS 20.                                   
013600     05 COPY-DAT  PIC X(14) OCCURS 20.                                   
013700     05 COPY-LAENGE  PIC 9999 COMP OCCURS 20.                           
013800 01  DPP-ANZ         PIC 9999 COMP.                                     
013900 01  I-O-IND         PIC 9999 COMP.                                     
014000 01  DPP-COPY PIC X(8) VALUE SPACE.                                     
014100 01  GRUPPEN-TABELLE.                                                   
014200     05 GRU PIC X(8) OCCURS 10.                                         
014300 01  GRU-ANZ PIC 9999 COMP.                                             
014400 01  RAHMEN-ZEICHEN  PIC X         VALUE "*".                           
014500 01  KOPF0           PIC X(80).                                         
014600 01  KOPF1           PIC X(80).                                         
014700 01  KOPF2.                                                             
014800     05 FILLER PIC X(70).                                               
014900     05 SEITEN-ZAEHLER.                                                 
015000        10 SZ1       PIC Z9.                                            
015100        10 PUNKT     PIC X VALUE ".".                                   
015200        10 SZ3       PIC 99.                                            
015300     05 SEITEN-ZAE-REDEF REDEFINES SEITEN-ZAEHLER.                      
015400        10 FILLER    PIC XXX.                                           
015500        10 SZ2       PIC 9.                                             
015600        10 SZ4       PIC X.                                             
015700     05 FILLER PIC X(5).                                                
015800 01  SZ              PIC 9999 VALUE ZERO.                               
015900 01  ZZ              PIC 9999 VALUE ZERO.                               
016000 01  LAST-ZEILE      PIC  X(80).                                        
016100 01  NORM-ZEILE      PIC  X(80).                                        
016200 01  KOPF3           PIC  X(80).                                        
016300 01  LIST-ZEILE.                                                        
016400     05 LZ1          PIC XX.                                            
016500     05 LZ3-78.                                                         
016600        10 LZ-TEIL1  PIC X(8).                                          
016700        10 LZ-TEIL2  PIC X(8).                                          
016800        10 LZ-TEIL3  PIC X(10).                                         
016900        10 LZ-TEIL4  PIC X(10).                                         
017000        10 LZ-TEIL5  PIC X(10).                                         
017100        10 LZ-TEIL6  PIC X(10).                                         
017200        10 LZ-TEIL7  PIC X(10).                                         
017300        10 LZ-TEIL8  PIC X(10).                                         
017400     05 LZ80         PIC XX.                                            
017500     05 FILLER       PIC X(52).                                         
017600 01  LIST-ZEILE2 REDEFINES LIST-ZEILE.                                  
017700     05 FILLER PIC XX.                                                  
017800     05 DATEI-ZEILE.                                                    
017900        10 DZ-NAME   PIC X(9).                                          
018000        10 DZ-50     PIC X OCCURS 50.                                   
018100     05 FILLER       PIC X(71).                                         
018200 01  LIST-ZEILE3 REDEFINES LIST-ZEILE.                                  
018300     05 FILLER       PIC X(11).                                         
018400     05 DZ-30        PIC XX OCCURS 30.                                  
018500     05 FILLER       PIC X(61).                                         
018600 01  LIST-ZEILE4 REDEFINES LIST-ZEILE.                                  
018700     05 FILLER       PIC X(11).                                         
018800     05 DZ-20        PIC XXX OCCURS 20.                                 
018900     05 FILLER       PIC X(61).                                         
019000 01  LIST-ZEILE5 REDEFINES LIST-ZEILE.                                  
019100     05 FILLER       PIC X(11).                                         
019200     05 DZ-7         PIC X(9) OCCURS 7.                                 
019300     05 FILLER       PIC X(58).                                         
019400 01  PGM-TABELLE.                                                       
019500     05 PGM          PIC X(8) OCCURS 50.                                
019600 01  TERMINAL-KZ     PIC X.                                             
019700 01  REPORT-ANZ    PIC 9999  COMP.                                      
019800 01  PARM-NUMERIC.                                                      
019900     05 PARM-NUM PIC 9999.                                              
020000 01  PARM-NUM-REDEF REDEFINES PARM-NUMERIC.                             
020100     05 PN-Z1 PIC 9.                                                    
020200     05 PN-Z2 PIC 9.                                                    
020300     05 PN-Z3 PIC 9.                                                    
020400     05 PN-Z4 PIC 9.                                                    
020500 01  PIC-ZEICHEN PIC X.                                                 
020600 01  DOK-SELECTION.                                                     
020700     05 DOK-KZ PIC X OCCURS 20.                                         
020800 01  SYSTEM-NAME     PIC X(10).                                         
020900 01  TITEL           PIC X(60).                                         
021000 01  KEY-WORT        PIC X(12).                                         
021100 01  PARM-ANZ      PIC 9999 COMP.                                       
021200 01  PARAMETER.                                                         
021300     05 PARM-Z       PIC X OCCURS 40.                                   
021400 01  PARM-REDEF REDEFINES PARAMETER.                                    
021500     05 PARM-Z1 PIC X.                                                  
021600     05 PARM-Z2 PIC X.                                                  
021700     05 PARM-Z3 PIC X.                                                  
021800     05 PARM-Z4 PIC X.                                                  
021900     05 FILLER  PIC X(36).                                              
022000 01  BUCHSTABEN PIC X(40) VALUE                                         
022100          "ABCDEFGHIJKLMNOPQRSTUVWXYZ -/+1234567890".                   
022200 01  BIG-NAME.                                                          
022300     05 BZ PIC X OCCURS 10.                                             
000000 01  TASTE-ST.
000000     05 WS-TASTE  PIC 9 COMP-1.
000000     05 LI-UEBERGABE.
000000      07  LI-TASTE-N PIC 99.
000000        88 LI-ENTER VALUE 00.
000000        88 LI-FIELD-LEFT VALUE 01.
000000        88 LI-FIELD-RIGHT VALUE 06.
000000        88 LI-TAB VALUE 09.
000000        88 LI-HELP  VALUE 10.
000000        88 LI-STOP VALUE 21.
000000        88 LI-ERROR VALUE 98.
000000        88 LI-GUELTIG-1 VALUE 00 06 10 21. 
000000 01  LINKEIN.
000000        03  L-ZEILE        PIC 99.
000000        03  L-POS          PIC 99.
000000        03  L-SIZE         PIC 99.
000000        03  L-TASTE        PIC 999.
000000        03  L-FELD         PIC X(80).  
022400 PROCEDURE DIVISION.                                                    
022500 ANF.                                                                   
022600     OPEN I-O DRU.                                                      
022700     OPEN INPUT BIG. OPEN INPUT DOK.                                    
022800     OPEN OUTPUT LIS. OPEN OUTPUT INH.                                  
022900     MOVE 1 TO DOK-SE.                                                  
023000     PERFORM DRU-LOE THRU DRU-LOE-Z 150 TIMES.                          
023100     MOVE ZERO TO I0.                                                   
023200     PERFORM DOK-LESEN 23 TIMES.                                        
023300     ACCEPT INPUT-AREA-80 LINE 21 POSITION 61 TAB NO BEEP.              
023400     MOVE INPUT-AREA-80 TO ZEILE61-80(21).                              
023500     MOVE ZEILE61-80(21) TO SYSTEM-NAME.                                
023600     MOVE ZERO TO I0.                                                   
023700     PERFORM DOK-LESEN 23 TIMES.                                        
023800     MOVE 8 TO I1. MOVE ZERO TO ENDE-KZ.                                
023900     PERFORM PROG-EINGABE UNTIL ENDE-KZ = 1.                            
024000     SUBTRACT 1 FROM PGM-ANZ.                                           
024100     MOVE ZERO TO I0. PERFORM DOK-LESEN 23 TIMES.                       
024200      MOVE 1 TO BILD-IND. PERFORM KEYIN-BILD.                            
024300     MOVE ZERO TO I0. PERFORM UEB-FUELL.                                
024400     MOVE ZERO TO I0. PERFORM DOK-LESEN 23 TIMES.                       
024500     MOVE ZERO TO I0.                               
024600     PERFORM KZ-FUELL 20 TIMES.                                         
024700     IF DOK-KZ(1) = "X" PERFORM BIG-LETTER.                             
024800     MOVE ZERO TO PGM-AKT.                                              
024900 BEGINN-PROGRAMM.                                                       
025000     ADD 1 TO PGM-AKT.                                                  
025100     IF PGM-AKT > PGM-ANZ GO TO ENDE-PROG.                              
025200     MOVE PGM(PGM-AKT) TO PRO-NAME.                                     
025300     OPEN INPUT PRO. MOVE 0 TO ENDE-KZ.                                 
025400     MOVE ZERO TO DPP-ANZ, SZ, COPY-ANZ.                                
025500 LESEN-PRO. IF ENDE-KZ = 9 GO TO LESEN-ENDE.                            
025600     READ PRO AT END GO TO LESEN-ENDE.                                  
025700 LA. IF PRO-REC = "IN=FD" PERFORM FD-INTERPRET THRU FD-Z.               
025800     IF PRO-REC = "IN=TERMINAL" MOVE 1 TO TERMINAL-KZ.                  
025900     IF PRO-Z(1) NOT = "*" GO TO LESEN-PRO.                             
026000     IF PRO-Z(2)     = " " GO TO LESEN-PRO.                             
000000     IF PRO-REC = "*ENDE" GO TO LESEN-PRO.
026100     PERFORM PARAMETER-INTERPRETIEREN THRU PARAM-Z.                     
026200     IF KEY-WORT = "*PROG"      PERFORM SCHLUESSEL-PROG.                
026300     IF KEY-WORT = "*GRUPPE"    PERFORM SCHLUESSEL-GRUPPE.              
026400     IF KEY-WORT = "*DATEI"     PERFORM SCHLUESSEL-DATEI.               
026500     IF KEY-WORT = "*ZEILE" AND DOK-KZ(7) = "X"                         
026600        PERFORM SCHLUESSEL-ZEILE.                                       
026700     IF KEY-WORT = "*FELD"  AND DOK-KZ(7) = "X"                         
026800        PERFORM SCHLUESSEL-FELD.                                        
026900     IF KEY-WORT = "*MASKE"     PERFORM SCHLUESSEL-MASKE.               
027000     IF KEY-WORT = "*ETAB" AND DOK-KZ(11) = "X"                         
027100        PERFORM SCHLUESSEL-ETAB.                                        
027200     IF KEY-WORT = "*ERFASS"    PERFORM SCHLUESSEL-ERFASS.              
027300     IF KEY-WORT = "*BILD"   MOVE 1 TO TERMINAL-KZ                 
000000                                PERFORM SCHLUESSEL-BILD.
027400     IF KEY-WORT = "*UMSETZ"    PERFORM SCHLUESSEL-DATEI.               
027500     GO TO LA.                                                          
027600 LESEN-ENDE. CLOSE PRO.                                                 
027700     IF DOK-KZ(4) = "X" AND DPP-ANZ > 0                                 
027800                    PERFORM DPP-AUSGABE. MOVE 1 TO I4.                  
027900     IF DOK-KZ(8) = "X" PERFORM COPY-DRUCK COPY-ANZ TIMES.              
028000     GO TO BEGINN-PROGRAMM.                                             
028100 KZ-FUELL. ADD 1 TO I0.                                                 
000000     ACCEPT ZEILE61-80(I0) LINE I0 POSITION 61 TAB NO BEEP.
028200     MOVE ZEILE61-80(I0) TO DOK-KZ(I0).                                 
028300 DPP-AUSGABE. PERFORM KOPF-LI.                                          
028400     MOVE 18 TO I-O-IND.                                                
028500     MOVE NORM-ZEILE TO LIST-ZEILE.                                     
028600     PERFORM WRITE-LI 2 TIMES.                                          
028700     MOVE "DATEIEN   IM   PROGRAMM"    TO LZ3-78.                       
028800     MOVE PRO-NAME TO LZ-TEIL4.                                         
028900     PERFORM INHALT. PERFORM WRITE-LI 2 TIMES.                          
029000     WRITE LIS-REC FROM KOPF0.                                          
029100     MOVE "DATEI-NAME MEDIUM  ORG    STATUS SATZLAENGE      KEY"        
029200          TO LZ3-78. PERFORM WRITE-LI.                                  
029300     WRITE LIS-REC FROM KOPF0. ADD 2 TO ZZ.                             
029400     MOVE 120 TO DOK-SE.                                                
029500     PERFORM DRU-READ THRU DRU-READ-Z.                                  
029600     MOVE "*" TO DPP-1     DPP-2     DPP-3     DPP-4                    
029700          DPP-5    .                                                    
029800     PERFORM WRITE-DRU. MOVE DPP-RECO TO LZ3-78.                        
029900     PERFORM WRITE-LI. MOVE 0 TO INPUT-ZAE OUTPUT-ZAE I-O-ZAE.          
030000     MOVE ZERO TO I0. PERFORM DPP-ZEILE DPP-ANZ TIMES.                  
030100     WRITE LIS-REC FROM KOPF0. PERFORM REST-LI.                         
030200     MOVE ZERO TO I0. MOVE  33 TO BIG-NR.                               
030300     PERFORM READ-BIG 50 TIMES.                                         
030400     IF TERMINAL-KZ = 0 MOVE 14 TO I0                                   
030500        PERFORM TERM-BLANK 15 TIMES.                                    
030600     MOVE 43 TO I-O-SPALTE.                                             
030700     MOVE 24 TO INPUT-SPALTE OUTPUT-SPALTE.                             
030800     IF INPUT-ZAE > 1 SUBTRACT 8 FROM INPUT-SPALTE.                     
030900     IF INPUT-ZAE > 2 SUBTRACT 8 FROM INPUT-SPALTE.                     
031000     IF OUTPUT-ZAE > 1 SUBTRACT 8 FROM OUTPUT-SPALTE.                   
031100     IF OUTPUT-ZAE > 2 SUBTRACT 8 FROM OUTPUT-SPALTE.                   
031200     MOVE ZERO TO I0. PERFORM DATEN-FLUSS DPP-ANZ TIMES.                
031300     IF INPUT-ZAE > 0                                                   
031400        MOVE 13 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
031500        MOVE "I" TO DRU-ZEI(31) PERFORM WRITE-DRU                       
031600        MOVE 14 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
031700        MOVE "I" TO DRU-ZEI(31) PERFORM WRITE-DRU                       
031800        MOVE 15 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
031900        MOVE "V" TO DRU-ZEI(31) PERFORM WRITE-DRU.                      
032000     IF OUTPUT-ZAE > 0                                                  
032100        MOVE 26 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
032200        MOVE "I" TO DRU-ZEI(31) PERFORM WRITE-DRU                       
032300        MOVE 27 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
032400        MOVE "I" TO DRU-ZEI(31) PERFORM WRITE-DRU                       
032500        MOVE 28 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
032600        MOVE "V" TO DRU-ZEI(31) PERFORM WRITE-DRU.                      
032700     IF I-O-ZAE > 0                                                     
032800        MOVE 19 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
032900        MOVE "-" TO DRU-ZEI(41)                                         
033000        MOVE "-" TO DRU-ZEI(42)                                         
033100        MOVE "-" TO DRU-ZEI(43)                                         
033200        MOVE ">" TO DRU-ZEI(44)                                         
033300        MOVE "<" TO DRU-ZEI(40) PERFORM WRITE-DRU.                      
033400     MOVE DISPLAY-FELD TO PARAMETER.                                    
033500     MOVE 22 TO  I0. MOVE 1 TO I1.                                      
033600     PERFORM KASTEN-TITEL 8 TIMES.                                      
033700     PERFORM KOPF-LI.                                                   
033800     MOVE "DATENFLUSS-PLAN" TO LZ3-78.                                  
033900     PERFORM INHALT. PERFORM WRITE-LI 5 TIMES.                          
034000     MOVE ZERO TO I0. PERFORM DATEN-FLUSS-DRUCK 38 TIMES.               
034100     PERFORM REST-LI.                                                   
034200 KASTEN-TITEL.                                                          
034300     MOVE 21 TO DOK-SE.                                                 
034400     PERFORM DRU-READ THRU DRU-READ-Z.                                  
034500     MOVE PARM-Z(I1) TO DRU-ZEI(I0).                                    
034600     PERFORM WRITE-DRU.                                                 
034700     ADD 1 TO I1. ADD 2 TO I0.                                          
034800 DATEN-FLUSS-DRUCK. ADD 1 TO I0.                                        
034900     MOVE I0 TO DOK-SE.                                                 
035000     PERFORM DRU-READ THRU DRU-READ-Z.                                  
035100     MOVE DRUCK-ZEILE     TO LZ3-78. PERFORM WRITE-LI.                  
035200 DATEN-FLUSS. ADD 1 TO I0.                                              
035300     MOVE I0 TO DOK-SE. ADD 100 TO DOK-SE.                              
035400     PERFORM DRU-READ THRU DRU-READ-Z.                                  
035500     IF DPP-ST     = "INPUT" MOVE INPUT-SPALTE TO DFP-SP                
035600        ADD 16 TO INPUT-SPALTE MOVE 1 TO DFP-ZEILE.                     
035700     IF DPP-ST     = "I-O" MOVE I-O-SPALTE TO DFP-SP                    
035800        ADD 13 TO I-O-SPALTE MOVE 15 TO DFP-ZEILE.                      
035900     IF DPP-ST     = "OUTPUT" OR                                        
036000        DPP-MEDIUM     = "PRINTER"                                      
036100        MOVE OUTPUT-SPALTE TO DFP-SP                                    
036200        ADD 16 TO OUTPUT-SPALTE MOVE 27 TO DFP-ZEILE.                   
036300     MOVE 17 TO DFP-SY.                                                 
036400     IF DPP-MEDIUM     = "PRINTER" MOVE 1 TO DFP-SY.                    
036500     IF DPP-MEDIUM     = "TAPE"   MOVE 33 TO DFP-SY.                    
036600     PERFORM BESCHRIFTUNG.                                              
036700     MOVE I0 TO DOK-SE. ADD 100 TO DOK-SE.                              
036800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
036900     IF I-O-SPALTE > 56 AND DPP-ST     = "I-O"                          
037000        ADD 1 TO I-O-IND MOVE ZERO TO I1 MOVE 60 TO I2                  
037100        PERFORM I-O-NAME 8 TIMES ELSE MOVE 39 TO I1                     
037200        PERFORM SYMBOL-DRUCK 12 TIMES.                                  
037300 I-O-NAME. ADD 1 TO I1.                                                 
037400     MOVE I-O-IND TO DOK-SE.                                            
037500     PERFORM DRU-READ THRU DRU-READ-Z.                                  
037600     MOVE PARM-Z(I1) TO DRU-ZEI(I2).                                    
037700     PERFORM WRITE-DRU.                                                 
037800     ADD 1 TO I2.                                                       
037900 SYMBOL-DRUCK. PERFORM SYM-DR 16 TIMES. ADD 1 TO I1.                    
038000     ADD 1 TO DFP-ZEILE. SUBTRACT 16 FROM DFP-SP.                       
038100     SUBTRACT 16 FROM DFP-SY.                                           
038200 SYM-DR.                                                                
038300     MOVE I1 TO DOK-SE.                                                 
038400     PERFORM DRU-READ THRU DRU-READ-Z.                                  
038500     MOVE DRU-ZEI(DFP-SY) TO DRU-ZEI-ZWI.                               
038600     MOVE DFP-ZEILE TO DOK-SE.                                          
038700     PERFORM DRU-READ THRU DRU-READ-Z.                                  
038800     MOVE DRU-ZEI-ZWI TO DRU-ZEI(DFP-SP).                               
038900     PERFORM WRITE-DRU.                                                 
039000     ADD 1 TO DFP-SY. ADD 1 TO DFP-SP.                                  
039100 BESCHRIFTUNG.                                                          
039200     MOVE I0 TO DOK-SE. ADD 100 TO DOK-SE.                              
039300     PERFORM DRU-READ THRU DRU-READ-Z.                                  
039400     MOVE DPP-NAME TO PARAMETER.                                        
039500     MOVE 20 TO I2.                                                     
039600     MOVE ZERO TO I3. PERFORM SCHRIFT-ZEICHEN 8 TIMES.                  
039700 SCHRIFT-ZEICHEN. ADD 1 TO I3. ADD 1 TO I2.                             
039800     MOVE 46 TO DOK-SE.                                                 
039900     PERFORM DRU-READ THRU DRU-READ-Z.                                  
040000     MOVE PARM-Z(I3) TO DRU-ZEI(I2).                                    
040100     PERFORM WRITE-DRU.                                                 
040200 TERM-BLANK.                                                            
040300     MOVE I0 TO DOK-SE.                                                 
040400     PERFORM DRU-READ THRU DRU-READ-Z. MOVE 1 TO IND.                   
040500     PERFORM TERM-BLA 19 TIMES.                                         
040600     PERFORM WRITE-DRU.                                                 
040700     ADD 1 TO I0.                                                       
040800 TERM-BLA.                                                              
040900     MOVE SPACE TO DRU-ZEI(IND).                                        
041000     ADD 1 TO IND.                                                      
041100 READ-BIG. READ BIG INVALID STOP "DFP?".                                
041200     ADD 1 TO I0.                                                       
041300     MOVE I0 TO DOK-SE. MOVE BIG-SATZ TO DRUCK-ZEILE.                   
041400     PERFORM WRITE-DRU.                                                 
041500     ADD 1 TO BIG-NR.                                                   
041600 DPP-ZEILE. ADD 1 TO I0.                                                
041700     MOVE I0 TO DOK-SE. ADD 100 TO DOK-SE.                              
041800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
041900     MOVE "*" TO DPP-1     DPP-2     DPP-3     DPP-4                    
042000          DPP-5    .                                                    
042100     PERFORM WRITE-DRU. MOVE DPP-RECO TO LZ3-78.                        
042200     ADD 1 TO OUTPUT-ZAE.                                               
042300     IF DPP-ST     = "INPUT" ADD 1 TO INPUT-ZAE                         
042400        SUBTRACT 1 FROM OUTPUT-ZAE.                                     
042500     IF DPP-ST     = "I-O" ADD 1 TO I-O-ZAE                             
042600        SUBTRACT 1 FROM OUTPUT-ZAE.                                     
042700     PERFORM WRITE-LI.                                                  
042800     MOVE 20 TO DOK-SE. ADD 100 TO DOK-SE.                              
042900     PERFORM DRU-READ THRU DRU-READ-Z.                                  
043000     MOVE SPACE TO DPP-RECO.                                            
043100     MOVE "*" TO DPP-1 DPP-2 DPP-3 DPP-4 DPP-5.                         
043200     PERFORM WRITE-DRU.                                                 
043300                     MOVE DPP-RECO    TO LZ3-78.                        
043400     PERFORM WRITE-LI.                                                  
043500 ENDE-PROG. MOVE ZERO TO I0.                                            
043600     IF DOK-KZ(14) NOT = "X" GO TO ENDE-1.                              
043700     MOVE 0 TO SZ. PERFORM KOPF-LI.                                     
043800     MOVE "*-*-*-*-*-*-*-*-*-*-*-*-*" TO INH-REC.                       
043900     WRITE INH-REC.                                                     
044000     MOVE "DATEI-VERZEICHNIS" TO LZ3-78. PERFORM INHALT.                
044100     PERFORM WRITE-LI 2 TIMES. ADD 1 TO ZZ.                             
044200     WRITE LIS-REC FROM LAST-ZEILE.                                     
044300     MOVE "DATEI" TO DZ-NAME.                                           
044400     MOVE ZERO TO I1. PERFORM DAT-KOPF PGM-ANZ TIMES.                   
044500     PERFORM WRITE-LI.                                                  
044600     PERFORM DAT-VER-DRUCK DAT-ANZ TIMES.                               
044700     PERFORM REST-LI.                                                   
044800 ENDE-1. IF DOK-KZ(2) NOT = "X" STOP RUN.                               
044900     CLOSE INH. OPEN INPUT INH.                                         
045000     MOVE ZERO TO PGM-AKT SZ.                                           
045100     PERFORM KOPF-LI.                                                   
045200     MOVE "I N H A L T S V E R Z E I C H N I S" TO LZ3-78.              
045300     PERFORM WRITE-LI 2 TIMES.                                          
045400*    WRITE LIS-REC FROM NORM-ZEILE.                                     
045500     READ INH AT END STOP "INH?".                                       
045600 LI. READ INH AT END PERFORM REST-LI STOP RUN.                          
045700     MOVE INH-REC TO LZ3-78. PERFORM WRITE-LI.                          
045800     GO TO LI.                                                          
045900 INHALT. MOVE LZ3-78 TO INH-TEXT.                                       
046000     MOVE SEITEN-ZAEHLER TO INH-KAPITEL.                                
046100     WRITE INH-REC.                                                     
046200 FD-INTERPRET. READ PRO AT END STOP "FD?".                              
046300     PERFORM KOPF-LI.                                                   
046400     MOVE "SATZ-STRUKTUR" TO LZ3-78.                                    
046500     PERFORM INHALT. PERFORM WRITE-LI 2 TIMES.                          
046600     MOVE 1 TO DOK-SE.                                                  
046700     PERFORM DRU-LOE THRU DRU-LOE-Z 50 TIMES.                           
046800     MOVE 45 TO SATZ-IND. MOVE 1 TO SATZ-ZAE.                           
046900 FD-A. IF PRO-REC = "IN=WRITE" PERFORM FD-WEITER.                       
047000     IF PRO-Z(1) = SPACE                                                
047100        MOVE PRO-REC TO LZ3-78 PERFORM WRITE-LI                         
047200        IF REC-LAENGE < 121 MOVE SATZ-ZAE TO PRO-VON                    
047300           PERFORM SATZ-STRUK GO TO FD-B ELSE GO TO FD-B                
047400        ELSE GO TO FD-Z.                                                
047500 FD-B. READ PRO AT END STOP "FD2". GO  TO FD-A.                         
047600 FD-Z. PERFORM REST-LI.                                                 
047700     IF REC-LAENGE < 121 PERFORM SATZ-GRAPHIK.                          
047800 FD-WEITER. READ PRO AT END STOP "WR?".                                 
047900     IF PRO-Z(1) = SPACE GO TO FD-WEITER.                               
048000     IF PRO-REC = "IN=FD" READ PRO AT END STOP "WR?".                   
048100 COPY-DRUCK. PERFORM KOPF-LI.                                           
048200     MOVE "COPY-SATZ-STRUKTUR" TO LZ3-78.                               
048300     MOVE COPY-NAME(I4) TO LZ-TEIL4.                                    
048400     MOVE " IN DATEI"   TO LZ-TEIL5.                                    
048500     MOVE COPY-DAT(I4)  TO LZ-TEIL6. PERFORM INHALT.                    
048600     PERFORM WRITE-LI 2 TIMES.                                          
048700     MOVE COPY-NAME(I4) TO PRO-NAME. OPEN INPUT PRO.                    
048800     MOVE ZERO TO ENDE-KZ.                                              
048900     IF COPY-LAENGE(I4) < 121                                           
049000     MOVE 1 TO DOK-SE                                                   
049100     PERFORM DRU-LOE THRU DRU-LOE-Z 50 TIMES                            
049200     MOVE 45 TO SATZ-IND  MOVE 1 TO SATZ-ZAE.                           
049300     PERFORM COPY-LESEN UNTIL ENDE-KZ = 9.                              
049400     PERFORM REST-LI. CLOSE PRO.                                        
049500     IF COPY-LAENGE(I4) < 121 PERFORM SATZ-GRAPHIK.                     
049600     ADD 1 TO I4.                                                       
049700 SATZ-GRAPHIK.                                                          
049800     IF DOK-KZ(10) = "X"      PERFORM KOPF-LI                           
049900     MOVE SATZ-ZAE TO I0 SUBTRACT 1 FROM I0 ADD 49 TO ZZ                
050000     PERFORM SKALA-ANBRINGEN VARYING SATZ-ZAE FROM 1 BY 1               
050100        UNTIL SATZ-ZAE > I0  SUBTRACT SATZ-IND FROM ZZ                  
050200     MOVE 49 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z                 
050300     WRITE LIS-REC FROM DRUCK-ZEILE                                     
050400     MOVE 50 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z                 
050500     WRITE LIS-REC FROM DRUCK-ZEILE                                     
050600     MOVE 1 TO  DOK-SE PERFORM DRU-READ THRU DRU-READ-Z                 
050700     WRITE LIS-REC FROM DRUCK-ZEILE                                     
050800     PERFORM SATZ-STRUK-DRUCKEN VARYING I0 FROM SATZ-IND BY 1           
050900        UNTIL I0 > 45 PERFORM REST-LI.                                  
051000 SKALA-ANBRINGEN.                                                       
051100     MOVE 49 TO DOK-SE.                                                 
051200     PERFORM DRU-READ THRU DRU-READ-Z.                                  
051300     MOVE SATZ-ZAE1 TO DRU-ZEI(SATZ-ZAE).                               
051400     PERFORM WRITE-DRU.                                                 
051500     MOVE 50 TO DOK-SE.                                                 
051600     PERFORM DRU-READ THRU DRU-READ-Z.                                  
051700     MOVE SATZ-ZAE2 TO DRU-ZEI(SATZ-ZAE).                               
051800     PERFORM WRITE-DRU.                                                 
051900 SATZ-STRUK-DRUCKEN.                                                    
052000     MOVE I0 TO DOK-SE.                                                 
052100     PERFORM DRU-READ THRU DRU-READ-Z.                                  
052200     WRITE LIS-REC FROM DRUCK-ZEILE.                                    
052300 COPY-LESEN. READ PRO AT END MOVE 9 TO ENDE-KZ.                         
052400     IF COPY-LAENGE(I4) < 121 IF ENDE-KZ = 0                            
052500        MOVE SATZ-ZAE TO PRO-VON.                                       
052600     IF ENDE-KZ = 0 MOVE PRO-REC TO LZ3-78                              
052700        PERFORM WRITE-LI PERFORM SATZ-STRUK.                            
052800 SATZ-STRUK. IF PRO-Z(7) NOT = "*" AND PRO-Z(8) = SPACE                 
052900       MOVE 12 TO I0 PERFORM SATZ-STRUK-SUCH UNTIL I0 > 72              
053000       OR PRO-Z(I0) NOT = SPACE  ADD 2 TO I0                            
053100     PERFORM SATZ-STRUK-SUCH UNTIL I0 > 72                              
053200        OR PRO-Z(I0) NOT = SPACE                                        
053300     MOVE SPACE TO PARAMETER  MOVE 1 TO I1                              
053400     PERFORM SATZ-NAME-FUELL UNTIL PRO-Z(I0) = SPACE                    
053500       OR PRO-Z(I0) = "." MOVE PARAMETER TO PIC-NAME                    
053600        IF PRO-Z(I0) NOT = "." PERFORM SATZ-STRUK-SUCH                  
053700           UNTIL I0 > 72 OR PRO-Z(I0) = "P"                             
053800           IF I0 < 72 ADD 3 TO I0                                       
053900           PERFORM SATZ-STRUK-SUCH UNTIL I0 > 72                        
054000             OR PRO-Z(I0) NOT = SPACE                                   
054100             MOVE 1 TO I1 MOVE SPACE TO PARAMETER                       
054200             PERFORM SATZ-NAME-FUELL UNTIL PRO-Z(I0) = SPACE            
054300             OR PRO-Z(I0) = "."                                         
054400             PERFORM SATZ-DRUCK-FUELL.                                  
054500 SATZ-STRUK-SUCH. ADD 1 TO I0.                                          
054600 SATZ-NAME-FUELL. MOVE PRO-Z(I0) TO PARM-Z(I1).                         
054700     ADD 1 TO I0. ADD 1 TO I1.                                          
054800 SATZ-DRUCK-FUELL.                                                      
054900     MOVE 0 TO I1. PERFORM SATZ-STRICH SATZ-IND TIMES.                  
055000     MOVE SATZ-IND TO DOK-SE.                                           
055100     PERFORM DRU-READ THRU DRU-READ-Z.                                  
055200     MOVE ">" TO DRU-ZEI(SATZ-ZAE).                                     
055300     PERFORM WRITE-DRU.                                                 
055400     MOVE SATZ-ZAE TO I0.               MOVE 1 TO I1 I2.                
055500     PERFORM PIC-C THRU PIC-Z.                                          
055600     MOVE PIC-NAME TO PARAMETER.                                        
055700     MOVE SATZ-ZAE TO I2. MOVE 1 TO I1.                                 
055800     PERFORM SATZ-DRUCK-NAME UNTIL PARM-Z(I1) = SPACE.                  
055900     SUBTRACT 1 FROM SATZ-IND. MOVE I0 TO SATZ-ZAE.                     
056000 SATZ-STRICH. ADD 1 TO I1.                                              
056100     MOVE I1 TO DOK-SE.                                                 
056200     PERFORM DRU-READ THRU DRU-READ.                                    
056300     MOVE "I" TO DRU-ZEI(SATZ-ZAE).                                     
056400     PERFORM WRITE-DRU.                                                 
056500 SATZ-DRUCK-NAME. ADD 1 TO I2.                                          
056600     MOVE SATZ-IND TO DOK-SE.                                           
056700     PERFORM DRU-READ THRU DRU-READ-Z.                                  
056800     MOVE PARM-Z(I1) TO DRU-ZEI(I2).                                    
056900     PERFORM WRITE-DRU.                                                 
057000     ADD 1 TO I1.                                                       
057100 DAT-KOPF. ADD 1 TO I1. MOVE I1 TO PGM-Z9.                              
057200     IF PGM-ANZ < 8 MOVE PGM(I1) TO DZ-7(I1) ELSE                       
057300     IF PGM-ANZ < 21 MOVE PGM-Z9 TO DZ-20(I1) ELSE                      
057400        MOVE PGM-Z9 TO DZ-50(I1).                                       
057500 DAT-VER-DRUCK. ADD 1 TO I0.                                            
057600     IF DAT-ANZ < 20 WRITE LIS-REC FROM NORM-ZEILE ADD 1 TO ZZ.         
057700     IF DAT-ANZ < 10 WRITE LIS-REC FROM NORM-ZEILE ADD 1 TO ZZ.         
057800     MOVE NORM-ZEILE TO LIST-ZEILE.                                     
057900     MOVE I0 TO DOK-SE. ADD 50 TO DOK-SE.                               
058000     PERFORM DRU-READ THRU DRU-READ-Z.                                  
058100     MOVE DATEI     TO DZ-NAME.                                         
058200     MOVE ZERO TO I1. PERFORM LIST-FUELL PGM-ANZ TIMES.                 
058300     PERFORM WRITE-LI.                                                  
058400 LIST-FUELL. ADD 1 TO I1.                                               
058500     MOVE I0 TO DOK-SE. ADD 50 TO DOK-SE.                               
058600     PERFORM DRU-READ THRU DRU-READ-Z.                                  
058700     IF DAT-REF(I1) NOT = SPACE                                         
058800        IF PGM-ANZ < 8 MOVE "********" TO DZ-7(I1) ELSE                 
058900        IF PGM-ANZ < 21 MOVE " X" TO DZ-20(I1)     ELSE                 
059000        MOVE "X" TO DZ-50(I1).                                          
059100 WRITE-LI. ADD 1 TO ZZ.                                                 
059200     IF ZZ > 60 WRITE LIS-REC FROM LAST-ZEILE                           
059300        PERFORM KOPF-LI.                                                
059400     WRITE LIS-REC FROM LIST-ZEILE.                                     
059500     MOVE NORM-ZEILE TO LIST-ZEILE.                                     
059600 KOPF-LI. MOVE 1 TO ZZ. ADD 1 TO SZ.                                    
059700     WRITE LIS-REC FROM KOPF0      AFTER PAGE.                          
059800     MOVE PGM-AKT TO SZ1. MOVE SPACE TO SZ4.                            
059900     IF SZ < 10 MOVE SZ TO SZ2 ELSE MOVE SZ TO SZ3.                     
060000     WRITE LIS-REC FROM KOPF1.                                          
060100     WRITE LIS-REC FROM KOPF2.                                          
060200     WRITE LIS-REC FROM KOPF3.                                          
060300     WRITE LIS-REC FROM KOPF0.                                          
060400     WRITE LIS-REC FROM NORM-ZEILE.                                     
060500 REST-LI. IF ZZ < 60 ADD 1 TO ZZ                                        
060600        WRITE LIS-REC FROM NORM-ZEILE GO TO REST-LI ELSE                
060700     WRITE LIS-REC FROM LAST-ZEILE.                                     
060800 SCHLUESSEL-PROG. MOVE ZERO TO  GRU-ANZ DPP-ANZ.                        
061000     MOVE 1 TO DOK-SE. ADD 120 TO DOK-SE.                               
061100     PERFORM DRU-READ THRU DRU-READ-Z.                                  
061200     MOVE PARM-WE    TO DISPLAY-FELD.                                   
061300     PERFORM KOPF-LI. MOVE 1 TO PROGRAMM-KZ.                            
061400     MOVE "*-*-*-*-*-*-*-*-*-*-*-*-*" TO INH-REC.                       
061500     WRITE INH-REC.                                                     
061600     MOVE 1 TO DOK-SE. ADD 120 TO DOK-SE.                               
061700     PERFORM DRU-READ THRU DRU-READ-Z.                                  
061800     MOVE PARM-WE TO PAR-WE.                                            
061900     MOVE 1 TO DOK-SE. ADD 100 TO DOK-SE.                               
062000     PERFORM DRU-LOE THRU DRU-LOE-Z 20 TIMES.                           
062100     MOVE "PROGRAMM-BESCHREIBUNG" TO LZ3-78.                            
062200     MOVE PAR-WE    TO LZ-TEIL4. PERFORM INHALT.                        
062300     PERFORM WRITE-LI 2 TIMES.                                          
062400     MOVE 0 TO TERMINAL-KZ.                                             
062500     MOVE PARM-ANZ TO DOK-SE. ADD 120 TO DOK-SE.                        
062600     PERFORM DRU-READ THRU DRU-READ-Z.                                  
062700     IF PARM-WE           = "1" MOVE                                    
062800        "LISTPROGRAMM (1 EINGABE, 1 AUSGABELISTE)" TO LZ3-78            
062900        ELSE IF PARM-WE           = "2" MOVE                            
063000        "UMSETZ-PROGRAMM (1 EINGABE, 1 AUSGABE)"   TO LZ3-78            
063100        ELSE IF PARM-WE           = "3" MOVE                            
063200        "SEQUENTIELLER UPDATE (BATCH)"             TO LZ3-78            
063300        ELSE IF PARM-WE           = "4" MOVE                            
063400        "DIALOG-UPDATE BZW. DIALOG-AUSKUNFT"       TO LZ3-78            
063500        MOVE 1 TO TERMINAL-KZ                                           
063600        ELSE IF PARM-WE           = "5" MOVE                            
063700        "GRUPPENSTEUERUNG MIT MEHREREN EINGABEN"   TO LZ3-78            
063800        ELSE IF PARM-WE           = "6" MOVE                            
063900        "BILDSCHIRM-ERFASSUNGSPROGRAMM"            TO LZ3-78            
064000        MOVE 1 TO TERMINAL-KZ                                           
064100        ELSE MOVE                                                       
064200        "BATCH-PROGRAMM MIT GRUPPENSTEUERUNG"      TO LZ3-78.           
064300     PERFORM WRITE-LI 2 TIMES.                                          
064400     IF PRO-REC = "IN=REMARKS"                                          
064500        PERFORM PROG-KURZ UNTIL PRO-Z(1) = "*".                         
064600     PERFORM WRITE-LI 2 TIMES.                                          
064700 PROG-KURZ. READ PRO AT END STOP "PROG?".                               
064800     IF PRO-Z(1) NOT = "*" MOVE PRO-REC TO LZ3-78                       
064900        PERFORM WRITE-LI.                                               
065000 SCHLUESSEL-GRUPPE.                                                     
065100     IF PARM-ANZ > 1  MOVE                                              
065200        "FOLGENDE GRUPPEN STEUERN DIE VERARBEITUNG" TO LZ3-78           
065300        PERFORM WRITE-LI 2 TIMES.                                       
065400     MOVE ZERO TO I0. PERFORM GRUPPEN-ZEILE PARM-ANZ TIMES.             
065500 GRUPPEN-ZEILE. ADD 1 TO I0.                                            
065600     MOVE I0 TO DOK-SE. ADD 120 TO DOK-SE.                              
065700     PERFORM DRU-READ THRU DRU-READ-Z.                                  
065800     IF SCHLUESSEL     < "K"                                            
065900        MOVE SCHLUESSEL     TO LZ-TEIL1                                 
066000        MOVE PARM-WE      TO LZ-TEIL2                                   
066100     ELSE MOVE PARM-WE     TO LZ-TEIL3                                  
066200          PERFORM WRITE-LI.                                             
066300 SCHLUESSEL-DATEI.                                                      
066400     IF PROGRAMM-KZ = 1 MOVE ZERO TO PROGRAMM-KZ                        
066500        PERFORM REST-LI.                                                
066600     MOVE 1 TO DOK-SE.                                                  
066700     PERFORM DRU-LOE THRU DRU-LOE-Z 50 TIMES.                           
066800     MOVE ZERO TO REPORT-ANZ.                                           
066900     MOVE 2 TO DOK-SE. ADD 120 TO DOK-SE.                               
067000     PERFORM DRU-READ THRU DRU-READ-Z.                                  
067100     IF PARM-WE    NOT = "PRINTER" MOVE 1    TO I0                      
067200     MOVE 1 TO DOK-SE  ADD 120 TO DOK-SE                                
067300     PERFORM DRU-READ THRU DRU-READ-Z                                   
067400        MOVE SCHLUESSEL TO SCHLUESS                                     
067500        MOVE PARM-WE TO PAR-WE                                          
067600        PERFORM DAT-SUCH UNTIL I0 > DAT-ANZ OR                          
067700                PAR-WE    = DATEI                                       
067800        MOVE I0 TO DOK-SE  ADD 50 TO DOK-SE                             
067900        PERFORM DRU-READ THRU DRU-READ-Z                                
068000        MOVE PAR-WE    TO DATEI                                         
068100        MOVE "X" TO DAT-REF(PGM-AKT)                                    
068200        PERFORM WRITE-DRU                                               
068300        IF I0 > DAT-ANZ MOVE I0 TO DAT-ANZ.                             
068400     ADD 1 TO DPP-ANZ. MOVE ZERO TO I0.                                 
068500     PERFORM DPP-FUELLEN PARM-ANZ TIMES.                                
068600 DPP-FUELLEN. ADD 1 TO I0.                                              
068700     MOVE I0 TO DOK-SE. ADD 120 TO DOK-SE.                              
068800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
068900     MOVE SCHLUESSEL TO SCHLUESS.                                       
069000     MOVE PARM-WE TO PAR-WE.                                            
069100     MOVE DPP-ANZ TO DOK-SE. ADD  100 TO DOK-SE.                        
069200     PERFORM DRU-READ THRU DRU-READ-Z.                                  
069300     IF I0 = 1 MOVE PAR-WE    TO DPP-NAME                               
069400        ELSE IF SCHLUESS       = "MEDIUM"                               
069500        MOVE PAR-WE     TO DPP-MEDIUM                                   
069600        ELSE IF SCHLUESS       = "ORG"                                  
069700        MOVE PAR-WE     TO DPP-ORG                                      
069800        ELSE IF SCHLUESS       = "STATUS"                               
069900        MOVE PAR-WE     TO DPP-ST                                       
070000        ELSE IF SCHLUESS       = "REC"                                  
070100        MOVE PAR-WE     TO DPP-REC                                      
070200        ELSE IF SCHLUESS       = "KEY"                                  
070300        MOVE PAR-WE     TO DPP-KEY.                                     
070400     PERFORM WRITE-DRU.                                                 
070500 DAT-SUCH.                                                              
070600     MOVE I0 TO DOK-SE. ADD 50 TO DOK-SE.                               
070700     PERFORM DRU-READ THRU DRU-READ-Z. ADD 1 TO I0.                     
070800 SCHLUESSEL-BILD. IF PROGRAMM-KZ = 1 MOVE ZERO TO PROGRAMM-KZ           
070900     PERFORM REST-LI.                                                   
071000 SCHLUESSEL-ZEILE.                                                      
071100     IF PARM-ANZ < 2 PERFORM DRUCK-AUSGABE ELSE                         
071200        ADD 1 TO REPORT-ANZ.                                            
071300 SCHLUESSEL-FELD.                                                       
071400     IF PARM-ANZ > 0                                                    
071500        MOVE 1 TO DOK-SE ADD 120 TO DOK-SE                              
071600        PERFORM DRU-READ THRU DRU-READ-Z                                
071700        MOVE PARM-WE    TO PARAMETER                                    
071800        PERFORM ALPHA-NUMERIC MOVE PARM-NUM TO I0                       
071900        MOVE 1 TO I1  MOVE REPORT-ANZ TO I2                             
072000        PERFORM VALUE-PICTURE.                                          
072100 SCHLUESSEL-MASKE. PERFORM KOPF-LI.                                     
072200     MOVE "MASKE FUER PROGRAMM" TO LZ3-78.                              
072300     MOVE PGM(PGM-AKT) TO LZ-TEIL4. PERFORM INHALT.                     
072400     PERFORM WRITE-LI 17 TIMES.                                         
072500     PERFORM MASKE-LESEN 23 TIMES. PERFORM REST-LI.                     
072600     PERFORM KOPF-LI. MOVE 1 TO PRO-WERT-ANZ.                           
072700     MOVE "FELD-BESCHREIBUNG FUER BILDSCHIRMMASKE"                      
072800          TO LZ3-78.  PERFORM WRITE-LI 2 TIMES.                         
072900     PERFORM WERT-LESEN UNTIL PRO-WERT2 = "*WERT,NMAS".                  
073000     PERFORM REST-LI.                                                   
073100 WERT-LESEN. IF PRO-WERT = "*WERT," MOVE SPACE TO PRO-WERT              
073200        MOVE PRO-WERT-ANZ TO PRO-Z9 ADD 1 TO PRO-WERT-ANZ.              
073300     MOVE PRO-REC TO LZ3-78.                                            
073400     PERFORM WRITE-LI.                                                  
073500     READ PRO AT END STOP "END?".                                       
073600 MASKE-LESEN. WRITE LIS-REC FROM PRO-REC. ADD 1 TO ZZ.                  
073700     READ PRO AT END STOP "MASKE?".                                     
073800 SCHLUESSEL-ETAB. PERFORM KOPF-LI.                                      
073900     MOVE "ENTSCHEIDUNGS-TABELLE" TO LZ3-78. PERFORM INHALT.            
074000     PERFORM WRITE-LI 2 TIMES.                                          
074100     PERFORM ETAB-LESEN  UNTIL PRO-Z(1) = "*".                          
074200     PERFORM REST-LI.                                                   
074300 ETAB-LESEN. MOVE PRO-REC TO LZ3-78. PERFORM WRITE-LI.                  
074400     READ PRO AT END STOP "ETAB?".                                      
074500 SCHLUESSEL-ERFASS.                                                     
074600 VALUE-PICTURE.                                                         
074700     MOVE 2 TO DOK-SE. ADD 120 TO DOK-SE.                               
074800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
074900                IF SCHLUESSEL    = "VAL"                                
075000        MOVE PARM-WE    TO PARAMETER                                    
075100        PERFORM VALUE-FUELL 40 TIMES                                    
075200     ELSE PERFORM PIC-A THRU PIC-Z.                                     
075300 VALUE-FUELL. IF I0 < 133                                               
075400     MOVE I2 TO DOK-SE                                                  
075500     PERFORM DRU-READ THRU DRU-READ-Z                                   
075600        MOVE PARM-Z(I1) TO DRU-ZEI(I0)                                  
075700     PERFORM WRITE-DRU.                                                 
075800     ADD 1 TO I0. ADD 1 TO I1.                                          
075900 PIC-A. MOVE ZERO TO I3.                                                
076000     MOVE 2 TO DOK-SE. ADD 120 TO DOK-SE.                               
076100     PERFORM DRU-READ THRU DRU-READ-Z.                                  
076200     IF PARM-WE    = "SPACE" GO TO PIC-Z.                               
076300     MOVE ZERO TO L-KZ.                                                 
076400 PIC-B. ADD 1 TO I3.                                                    
076500     IF I3 > PARM-ANZ IF L-KZ = ZERO GO TO PIC-Z                        
076600        ELSE PERFORM PIC-FUELL PARM-NUM TIMES GO TO PIC-Z.              
076700     MOVE I3 TO DOK-SE. ADD 120 TO DOK-SE.                              
076800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
076900     IF SCHLUESSEL     = "L" MOVE PARM-WE     TO PARAMETER              
077000        PERFORM ALPHA-NUMERIC MOVE "X" TO PIC-ZEICHEN                   
077100        MOVE 1 TO L-KZ GO TO PIC-B.                                     
077200     IF SCHLUESSEL     NOT = "PIC" GO TO PIC-B.                         
077300     MOVE PARM-WE     TO PARAMETER.                                     
077400 PIC-C. IF PARM-Z(I1) = SPACE OR I0 > 132 GO TO PIC-Z.                  
077500     IF PARM-Z(I1) = "V" ADD 1 TO I1 GO TO PIC-C.                       
077600     IF PARM-Z(I1) = "B"                                                
077700     MOVE I2 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z                 
077800        MOVE SPACE TO DRU-ZEI(I0) PERFORM WRITE-DRU.                    
077900     IF PARM-Z(I1) NOT = "(" MOVE PARM-Z(I1) TO PIC-ZEICHEN             
078000        MOVE I2 TO DOK-SE PERFORM DRU-READ THRU DRU-READ-Z              
078100        MOVE PIC-ZEICHEN TO DRU-ZEI(I0)                                 
078200        PERFORM WRITE-DRU ELSE                                          
078300        MOVE ZERO TO PARM-NUM PERFORM MULT-PIC.                         
078400     ADD 1 TO I0. ADD 1 TO I1. GO TO PIC-C.                             
078500 PIC-Z.                                                                 
078600 MULT-PIC. ADD 1 TO I1.                                                 
078700     IF PARM-Z(I1) NOT = ")"                                            
078800        MOVE PN-Z2    TO PN-Z1                                          
078900        MOVE PN-Z3    TO PN-Z2                                          
079000        MOVE PN-Z4    TO PN-Z3                                          
079100        MOVE PARM-Z(I1) TO PN-Z4   GO TO MULT-PIC.                      
079200     SUBTRACT 1 FROM PARM-NUM.                                          
079300     PERFORM PIC-FUELL PARM-NUM TIMES. SUBTRACT 1 FROM I0.              
079400 PIC-FUELL.                                                             
079500     MOVE I2 TO DOK-SE.                                                 
079600     PERFORM DRU-READ THRU DRU-READ-Z.                                  
079700     MOVE PIC-ZEICHEN TO DRU-ZEI(I0). PERFORM WRITE-DRU.                
079800     ADD 1 TO I0.                                                       
079900 DRUCK-AUSGABE. MOVE 1    TO I0. ADD 1 TO SZ.                           
080000     MOVE 1 TO DOK-SE.                                                  
080100     PERFORM DRU-READ THRU DRU-READ-Z.                                  
080200     WRITE LIS-REC FROM DRUCK-ZEILE    AFTER PAGE.                      
080300     IF SZ < 10 MOVE SZ TO SZ2 ELSE MOVE SZ TO SZ3.                     
080400     MOVE "LISTBILD-ENTWURF" TO LZ3-78. PERFORM INHALT.                 
080500     PERFORM PRINTEN REPORT-ANZ TIMES.                                  
080600 PRINTEN. ADD 1 TO I0.                                                  
080700     MOVE I0 TO DOK-SE.                                                 
080800     PERFORM DRU-READ THRU DRU-READ-Z.                                  
080900     WRITE LIS-REC FROM DRUCK-ZEILE.                                    
081000 GRUPPEN-ANF.                                                           
081100 GRUPPEN-ENDE.                                                          
081200 DOK-LESEN. ADD 1 TO DOK-NR.                                            
081300     READ DOK INVALID STOP "DOK?". ADD 1 TO I0.                         
081400     MOVE DOK-REC TO ZEILE(I0).                                         
081500     MOVE ZEILE(I0) TO INPUT-AREA.                                      
081600     DISPLAY INPUT-AREA LINE I0 POSITION 1 LOW.                         
081700 PROG-EINGABE.                                                          
081800     ACCEPT INPUT-AREA-80 LINE I1 POSITION 61 TAB NO BEEP.              
081900     MOVE INPUT-AREA-80 TO ZEILE61-80(I1).                              
082000     ADD 1 TO PGM-ANZ. MOVE ZEILE61-80(I1) TO PGM(PGM-ANZ).             
082100     IF PGM(PGM-ANZ) = "*" MOVE 1 TO ENDE-KZ.                           
082200     ADD 1 TO I1. IF I1 > 22 MOVE 8 TO I1.                              
082300 UEB-FUELL. MOVE ZEILE(1)  TO KOPF0.                                    
082400     MOVE ZEILE(2)  TO KOPF1.                                           
082500     MOVE ZEILE(3)  TO KOPF2.                                           
082600     MOVE ZEILE(4)  TO KOPF3.                                           
082700     MOVE ZEILE(22) TO NORM-ZEILE LIST-ZEILE.                           
082800     MOVE ZEILE(23) TO LAST-ZEILE.                                      
082900     MOVE "." TO PUNKT. MOVE SPACE TO BILD.                             
083000 KEYIN-BILD.
000000     MOVE BILD-IND TO L-ZEILE. MOVE 1 TO L-POS.
000000     MOVE 80 TO L-SIZE. MOVE ZEILE(BILD-IND) TO L-FELD.
000000     CALL "GIACCEPT" USING LINKEIN.
000000     MOVE L-TASTE TO LI-TASTE-N.
000000     MOVE L-FELD TO ZEILE(BILD-IND).
000000     IF LI-FIELD-LEFT SUBTRACT 1 FROM BILD-IND
000000        IF BILD-IND = ZERO MOVE 1 TO BILD-IND 
000000             GO TO KEYIN-BILD ELSE GO TO KEYIN-BILD.            
000000     IF LI-TAB MOVE 23 TO BILD-IND.
083400     ADD 1 TO BILD-IND.                                                 
083500     IF BILD-IND <  24 GO TO KEYIN-BILD.                          
084100 ALPHA-NUMERIC. MOVE ZERO TO PARM-NUM.                                  
084200     IF PARM-Z1   = SPACE MOVE ZERO TO PARM-NUM ELSE                    
084300        IF PARM-Z2   = SPACE MOVE PARM-Z1   TO PN-Z4   ELSE             
084400        IF PARM-Z3   = SPACE MOVE PARM-Z2   TO PN-Z4                    
084500                             MOVE PARM-Z1   TO PN-Z3   ELSE             
084600        IF PARM-Z4   = SPACE MOVE PARM-Z3   TO PN-Z4                    
084700                             MOVE PARM-Z2   TO PN-Z3                    
084800                             MOVE PARM-Z1   TO PN-Z2   ELSE             
084900        MOVE PARAMETER TO PARM-NUMERIC.                                 
085000 BIG-LETTER.                                                            
085100     WRITE LIS-REC FROM KOPF0.                                          
085200     PERFORM WRITE-LI 14 TIMES.                                         
085300     IF PGM-ANZ > 1 MOVE "  SYSTEM" TO BIG-NAME                         
085400        ELSE MOVE " PROGRAMM" TO BIG-NAME.                              
085500     MOVE ZERO TO I1.                                                   
085600     PERFORM FUELLEN THRU FUELL-Z 10 TIMES.                             
085700     MOVE ZERO TO I0.                                                   
085800     PERFORM DECK-BLATT 8 TIMES.                                        
085900     PERFORM WRITE-LI 14 TIMES.                                         
086000     MOVE SYSTEM-NAME TO BIG-NAME.                                      
086100     MOVE ZERO TO I1.                                                   
086200     PERFORM FUELLEN THRU FUELL-Z 10 TIMES.                             
086300     MOVE ZERO TO I0 ZZ.                                                
086400     PERFORM DECK-BLATT 8 TIMES. MOVE 40 TO ZZ.                         
086500     PERFORM REST-LI.                                                   
086600 DECK-BLATT. ADD 1 TO I0. MOVE BIG-ZEILE(I0) TO LZ3-78.                 
086700     PERFORM WRITE-LI.                                                  
086800 FUELLEN. ADD 1 TO I1.                                                  
086900     MOVE ZERO TO I2.                                                   
087000     INSPECT BUCHSTABEN TALLYING I2 FOR     CHARACTERS                  
087100             BEFORE BZ(I1).                                             
087200     MOVE 1 TO BIG-NR.                                                  
087300 A.  IF I2 > 9  ADD 8 TO BIG-NR SUBTRACT 10 FROM I2 GO TO A.            
087400     ADD 1 TO I2.                                                       
087500     MOVE ZERO TO I3. PERFORM LES-BIG 8 TIMES.                          
087600 FUELL-Z. EXIT.                                                         
087700 LES-BIG. READ BIG INVALID STOP "FFFF" STOP RUN.                        
087800     ADD 1 TO BIG-NR. ADD 1 TO I3.                                      
087900     MOVE BIG-Z(I2) TO BIG-ZEICHEN(I3, I1).                             
088000 PARAMETER-INTERPRETIEREN.                                              
088100     MOVE ZERO TO I0. MOVE PRO-REC TO PARAMETER.                        
088200     INSPECT PARAMETER TALLYING I0 FOR CHARACTERS BEFORE ",".           
088300     IF I0 > 38 GO TO PARAM-B. MOVE I0 TO I1.                           
088400 PARAM-A. ADD 1 TO I1. MOVE SPACE TO PARM-Z(I1).                        
088500     IF I1 < 12 GO TO PARAM-A.                                          
088600 PARAM-B. MOVE PARAMETER TO KEY-WORT.                                   
088700     MOVE ZERO TO PARM-ANZ. IF I0 > 38 GO TO PZ.                        
088800     ADD 2 TO I0. MOVE 1    TO I1.                                      
088900     MOVE SPACE TO PARAMETER.                                           
089000     IF PRO-Z(I0) = SPACE GO TO PARAM-Z.                                
089100 PARAM-C.                                                               
089200        MOVE PARM-ANZ TO DOK-SE. ADD 120 TO DOK-SE.                     
089300        PERFORM DRU-READ THRU DRU-READ-Z.                               
089400        IF PARM-ANZ > 0 IF SCHLUESSEL = "REC"                           
089500        MOVE PARM-WE           TO PARAMETER                             
089600        PERFORM ALPHA-NUMERIC                                           
089700        MOVE PARM-NUM TO REC-LAENGE.                                    
089800        MOVE PARM-ANZ TO DOK-SE. ADD 120 TO DOK-SE.                     
089900        PERFORM DRU-READ THRU DRU-READ-Z.                               
090000     IF PARM-ANZ > 0 IF SCHLUESSEL           = "COPY" IF                
090100        PARM-WE           NOT = COPY-DAT(1) ADD 1 TO COPY-ANZ           
090200        MOVE PARM-WE           TO COPY-NAME(COPY-ANZ)                   
090300        MOVE REC-LAENGE TO COPY-LAENGE(COPY-ANZ)                        
090400        MOVE 1        TO DOK-SE  ADD 120 TO DOK-SE                      
090500        PERFORM DRU-READ THRU DRU-READ-Z                                
090600        MOVE PARM-WE    TO        COPY-DAT(COPY-ANZ).                   
090700     ADD 1 TO PARM-ANZ.                                                 
090800        MOVE PARM-ANZ TO DOK-SE. ADD 120 TO DOK-SE.                     
090900        PERFORM DRU-READ THRU DRU-READ-Z.                               
091000     MOVE SPACE TO SCHLUESSEL           PARM-WE.                        
091100     PERFORM WRITE-DRU.                                                 
091200 PARAM-D.                                                               
091300     MOVE PRO-Z(I0) TO PARM-Z(I1).                                      
091400     ADD 1 TO I0. ADD 1 TO I1.                                          
091500     IF PRO-Z(I0) = "="                                                 
091600        MOVE PARM-ANZ TO DOK-SE ADD 120 TO DOK-SE                       
091700        PERFORM DRU-READ THRU DRU-READ-Z                                
091800        MOVE PARAMETER TO SCHLUESSEL                                    
091900        PERFORM WRITE-DRU                                               
092000        ADD 1 TO I0 MOVE 1 TO I1 MOVE SPACE TO PARAMETER                
092100        GO TO PARAM-D.                                                  
092200     IF PRO-Z(I0) = "," ADD 1 TO  I0 MOVE 1 TO I1                       
092300        MOVE PARM-ANZ TO DOK-SE ADD 120 TO DOK-SE                       
092400        PERFORM DRU-READ THRU DRU-READ-Z                                
092500        MOVE PARAMETER TO PARM-WE                                       
092600        PERFORM WRITE-DRU                                               
092700        MOVE SPACE TO PARAMETER GO TO PARAM-C.                          
092800     IF I1 < 41 AND I0 < 80 GO TO PARAM-D.                              
092900        MOVE PARM-ANZ TO DOK-SE ADD 120 TO DOK-SE                       
093000        PERFORM DRU-READ THRU DRU-READ-Z                                
093100     MOVE PARAMETER TO PARM-WE                                          
093200        PERFORM WRITE-DRU.                                              
093300        MOVE PARM-ANZ TO DOK-SE. ADD 120 TO DOK-SE.                     
093400        PERFORM DRU-READ THRU DRU-READ-Z.                               
093500     IF                 SCHLUESSEL           = "COPY" IF                
093600        PARM-WE           NOT = COPY-NAME(1) ADD 1 TO COPY-ANZ          
093700        MOVE PARM-WE           TO COPY-NAME(COPY-ANZ)                   
093800        MOVE REC-LAENGE TO COPY-LAENGE(COPY-ANZ)                        
093900        MOVE 1        TO DOK-SE  ADD 120 TO DOK-SE                      
094000        PERFORM DRU-READ THRU DRU-READ-Z                                
094100        MOVE PARM-WE    TO        COPY-DAT(COPY-ANZ).                   
094200 PZ. READ PRO AT END MOVE 9 TO ENDE-KZ GO TO PARAM-Z.                   
094300     IF PRO-Z(1) = "*" AND PRO-Z(2) = SPACE                             
094400        MOVE 4 TO I0 MOVE 1 TO I1                                       
094500        MOVE SPACE TO PARAMETER GO TO PARAM-C.                          
094600 PARAM-Z. EXIT.                                                         
094700 DRU-READ.                                                              
094800        READ DRU INVALID KEY GO TO DRU-READ-Z.                          
094900 DRU-READ-Z. EXIT.                                                      
095000 WRITE-DRU.                                                             
095100        REWRITE DRUCK-ZEILE INVALID KEY PERFORM WRITE-DRU-N.            
095200 WRITE-DRU-N.                                                           
095300        WRITE DRUCK-ZEILE INVALID STOP "DRUSEI" STOP RUN.               
095400 DRU-LOE.                                                               
095500        MOVE SPACE TO DRUCK-ZEILE.                                      
095600        PERFORM WRITE-DRU.                                              
095700        ADD 1 TO DOK-SE.                                                
095800 DRU-LOE-Z. EXIT.                                                       
