00001  IDENTIFICATION DIVISION.                                         08/28/02
00002  PROGRAM-ID.             DESBD111.                                DESBD111
00003  AUTHOR.                 TRW.                                        LV003
00004  DATE-WRITTEN.           MARCH 2001.                              DESBD111
00005  DATE-COMPILED.                                                   DESBD111
00006      SKIP3                                                        DESBD111
00007 *****                                                             DESBD111
00008 *                                                                 DESBD111
00009 *    FUNCTION:  MERGE ELECTRONIC FILER RECORDS FROM DAILY         DESBD111
00010 *               FLAT FILE TO PRODUCTION FILE THAT IS INPUT TO     DESBD111
00011 *               THE UPDATE PROCESS.                               DESBD111
00012 *               ELECTRONIC MEDIA TRACKING SYSTEM                  DESBD111
00013 *                                                                 DESBD111
00014 *                                                                 DESBD111
00015 *****                                                             DESBD111
00016      SKIP3                                                        DESBD111
00017  ENVIRONMENT DIVISION.                                            DESBD111
00018      SKIP2                                                        DESBD111
00019  DATA DIVISION.                                                   DESBD111
00020  WORKING-STORAGE SECTION.                                         DESBD111
000205 77  PAN-VALET PICTURE X(24) VALUE '003DESBD111  08/28/02'.       DESBD111
00021      SKIP3                                                        DESBD111
00022  01  WRK-AREA.                                                    DESBD111
00023      05  WRK-ABEND-CD            PIC S9(04)  COMP  VALUE +111.    DESBD111
00024                                                                   DESBD111
00025      05  WRK-INPUT-CNT           PIC  9(05)  COMP-3 VALUE 0.      DESBD111
00026      05  WRK-OUTPUT-CNT          PIC  9(05)  COMP-3 VALUE 0.      DESBD111
00027      05  WRK-CNT-DISP            PIC  Z(04)9.                     DESBD111
00028                                                                   DESBD111
00029      05  WRK-ERROR-IND               PIC  X(01).                  DESBD111
00030          88 WRK-ERROR-YES-88      VALUE 'Y'.                      DESBD111
00031          88 WRK-ERROR-NO-88       VALUE 'N'.                      DESBD111
00032                                                                   DESBD111
00033      05  WRK-SELECT-IND              PIC  X(01).                  DESBD111
00034          88 WRK-SELECT-YES-88     VALUE 'Y'.                      DESBD111
00035          88 WRK-SELECT-NO-88      VALUE 'N'.                      DESBD111
00036                                                                   DESBD111
00037      05  WRK-DUMMY-REC.                                           DESBD111
00038          10  WRK-DUMMY-LENGTH       PIC S9(04) COMP               DESBD111
00039                                   VALUE +64.                      DESBD111
00040          10  WRK-DUMMY-LOG-NO       PIC  9(10)                    DESBD111
00041                                   VALUE ZERO.                     DESBD111
00042          10  WRK-DUMMY-REC-TYPE     PIC  X(03)                    DESBD111
00043                                   VALUE 'XXX'.                    DESBD111
00044          10  WRK-DUMMY-FILLER       PIC  X(49)                    DESBD111
00045                                   VALUE SPACES.                   DESBD111
00046                                                                   DESBD111
00047  01  L941-LINK-AREA.                                              DESBD111
00048  ++INCLUDE DTSIL941                                               DESBD111
00049      EJECT                                                        DESBD111
00050  01  RSK4-REC.                                                    DESBD111
00051  ++INCLUDE DTSIRSK4                                               DESBD111
00052      EJECT                                                        DESBD111
00053                                                                   DESBD111
00054  LINKAGE SECTION.                                                 DESBD111
00055  01  BD110-LINK-AREA.                                             DESBD111
00056  ++INCLUDE DESIL110                                               DESBD111
00057                                                                   DESBD111
00058  PROCEDURE DIVISION USING BD110-LINK-AREA.                        DESBD111
00059                                                                   DESBD111
00060  DESBD111-MAIN.                                                   DESBD111
00061      PERFORM I0000-INITIATE THRU I0000-EXIT.                      DESBD111
00062      IF WRK-ERROR-YES-88                                          DESBD111
00063         GO TO DESBD111-MAIN-EXIT.                                 DESBD111
00064                                                                   DESBD111
00065      PERFORM P0000-PROCESS THRU P0000-EXIT.                       DESBD111
00066                                                                   DESBD111
00067      PERFORM T0000-TERMINATE THRU T0000-EXIT.                     DESBD111
00068                                                                   DESBD111
00069  DESBD111-MAIN-EXIT.                                              DESBD111
00070      GOBACK.                                                      DESBD111
00071      EJECT                                                        DESBD111
00072  I0000-INITIATE.                                                  DESBD111
00073      SET WRK-ERROR-NO-88 TO TRUE.                                 DESBD111
00074                                                                   DESBD111
00075      PERFORM I1000-OPEN-FILES           THRU I1000-EXIT.          DESBD111
00076                                                                   DESBD111
00077  I0000-EXIT.                                                      DESBD111
00078      EXIT.                                                        DESBD111
00079                                                                   DESBD111
00080  I1000-OPEN-FILES.                                                DESBD111
00081      PERFORM S941-OPEN-READ   THRU S941-EXIT.                     DESBD111
00082                                                                   DESBD111
00083  I1000-EXIT.                                                      DESBD111
00084      EXIT.                                                        DESBD111
00085                                                                   DESBD111
00086      EJECT                                                        DESBD111
00087  P0000-PROCESS.                                                   DESBD111
00088      IF L110-LOG-CNT = ZERO                                       DESBD111
00089         PERFORM P1300-WRITE-DUMMY-REC  THRU P1300-EXIT            DESBD111
00090      ELSE                                                         DESBD111
00091         PERFORM P1000-INPUT-LOOP       THRU P1000-EXIT            DESBD111
00092            UNTIL L941-NO-REC-88.                                  DESBD111
00093                                                                   DESBD111
00094      PERFORM S941-CLOSE                THRU S941-EXIT.            DESBD111
00095                                                                   DESBD111
00096  P0000-EXIT.                                                      DESBD111
00097      EXIT.                                                        DESBD111
00098      EJECT                                                        DESBD111
00099                                                                   DESBD111
00100  P1000-INPUT-LOOP.                                                DESBD111
00101      PERFORM S941-READ-NEXT        THRU S941-EXIT.                DESBD111
00102      IF L941-NO-REC-88                                            DESBD111
00103         GO TO P1000-EXIT                                          DESBD111
00104      ELSE                                                         DESBD111
00105         ADD +1 TO WRK-INPUT-CNT.                                  DESBD111
00106                                                                   DESBD111
00107      SET WRK-SELECT-NO-88  TO TRUE.                               DESBD111
00108      PERFORM P1100-SCAN-LOG-TABLE   THRU P1100-EXIT.              DESBD111
00109      IF WRK-SELECT-YES-88                                         DESBD111
00110         PERFORM P1200-WRITE-OUTPUT  THRU P1200-EXIT.              DESBD111
00111                                                                   DESBD111
00112  P1000-EXIT.                                                      DESBD111
00113      EXIT.                                                        DESBD111
00114                                                                   DESBD111
00115  P1100-SCAN-LOG-TABLE.                                            DESBD111
00116      SET LOG-IDX TO +1.                                           DESBD111
00117      SEARCH L110-LOG-NO-TABLE VARYING LOG-IDX                     DESBD111
00118         WHEN RSK4-LOG-NO = L110-LOG-NO (LOG-IDX)                  DESBD111
00119            SET WRK-SELECT-YES-88 TO TRUE                          DESBD111
00120      END-SEARCH.                                                  DESBD111
00121                                                                   DESBD111
00122  P1100-EXIT.                                                      DESBD111
00123      EXIT.                                                        DESBD111
00124                                                                   DESBD111
00125  P1200-WRITE-OUTPUT.                                              DESBD111
00126      ADD +1 TO WRK-OUTPUT-CNT.                                    DESBD111
00127                                                                   DESBD111
00128      PERFORM S946-O     THRU S946-EXIT.                           DESBD111
00129                                                                   DESBD111
00130  P1200-EXIT.                                                      DESBD111
00131      EXIT.                                                        DESBD111
00132                                                                   DESBD111
00133  P1300-WRITE-DUMMY-REC.                                           DESBD111
00134      MOVE WRK-DUMMY-REC       TO RSK4-REC.                        DESBD111
00135                                                                   DESBD111
00136      PERFORM S946-O           THRU S946-EXIT.                     DESBD111
00137                                                                   DESBD111
00138  P1300-EXIT.                                                      DESBD111
00139      EXIT.                                                        DESBD111
00140                                                                   DESBD111
00141  T0000-TERMINATE.                                                 DESBD111
00142      DISPLAY ' '.                                                 DESBD111
00143                                                                   DESBD111
00144      DISPLAY '*** DESBD111 TERMINATION STATISTICS ***'.           DESBD111
00145                                                                   DESBD111
00146      DISPLAY ' '.                                                 DESBD111
00147                                                                   DESBD111
00148      MOVE WRK-INPUT-CNT TO WRK-CNT-DISP.                          DESBD111
00149      DISPLAY '    INPUT RECORDS READ:     '                       DESBD111
00150         WRK-CNT-DISP.                                             DESBD111
00151                                                                   DESBD111
00152      MOVE WRK-OUTPUT-CNT         TO WRK-CNT-DISP.                 DESBD111
00153      DISPLAY '    OUTPUT RECORDS WRITTEN: '                       DESBD111
00154         WRK-CNT-DISP.                                             DESBD111
00155                                                                   DESBD111
00156      DISPLAY SPACE.                                               DESBD111
00157                                                                   DESBD111
00158  T0000-EXIT.                                                      DESBD111
00159      EXIT.                                                        DESBD111
00160                                                                   DESBD111
00161  S941-OPEN-READ.                                                  DESBD111
00162      SET L941-OPEN-READ-88 TO TRUE.                               DESBD111
00163      GO TO S941-I.                                                DESBD111
00164                                                                   DESBD111
00165  S941-READ-NEXT.                                                  DESBD111
00166      SET L941-READ-NEXT-88 TO TRUE.                               DESBD111
00167      GO TO S941-I.                                                DESBD111
00168                                                                   DESBD111
00169  S941-CLOSE.                                                      DESBD111
00170      SET L941-CLOSE-88     TO TRUE.                               DESBD111
00171      GO TO S941-I.                                                DESBD111
00172                                                                   DESBD111
00173  S941-I.                                                          DESBD111
00174      CALL 'DTSBU941' USING L941-LINK-AREA                         DESBD111
00175                            RSK4-REC.                              DESBD111
00176                                                                   DESBD111
00177  S941-EXIT.                                                       DESBD111
00178      EXIT.                                                        DESBD111
00179                                                                   DESBD111
00180  S946-O.                                                          DESBD111
00181      CALL 'DTSBU946' USING RSK4-REC.                              DESBD111
00182                                                                   DESBD111
00183  S946-EXIT.                                                       DESBD111
00184      EXIT.                                                        DESBD111
