00001  IDENTIFICATION DIVISION.                                         10/15/13
00002  PROGRAM-ID.             DTSBX202.                                DTSBX202
00003  AUTHOR.                 NGC.                                        LV001
00004  DATE-WRITTEN.           OCTOBER 2013.                            DTSBX202
00005  DATE-COMPILED.                                                   DTSBX202
00006      SKIP3                                                        DTSBX202
00007 *****                                                             DTSBX202
00008 *                                                                 DTSBX202
00009 *    FUNCTION:  EXTRACT DATA ABOUT CURRENT QUARTER REPORT         DTSBX202
00010 *               TRANSACTIONS FOR TDEC VALIDATION FILE.            DTSBX202
00011 *                                                                 DTSBX202
00012 *    CLONED FROM DTSBX201.  RUNS EVERY MORNING TO CAPTURE         DTSBX202
00013 *    TRANSACTIONS ENTERED OVERNIGHT, DURING WEEKENDS AND          DTSBX202
00014 *    ON HOLIDAYS.                                                 DTSBX202
00015 *                                                                 DTSBX202
00016 *    MODIFICATION LOG:                                            DTSBX202
00017 *                                                                 DTSBX202
00018 *    10/11/2013  INITIAL DEVELOPMENT.                             DTSBX202
00019 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX202
00020 *                                                                 DTSBX202
00021 *                                                                 DTSBX202
00022 *****                                                             DTSBX202
00023      SKIP3                                                        DTSBX202
00024  ENVIRONMENT DIVISION.                                            DTSBX202
00025  INPUT-OUTPUT SECTION.                                            DTSBX202
00026  FILE-CONTROL.                                                    DTSBX202
00027      SELECT TRAN-FILE   ASSIGN TO DTSFTRAN                        DTSBX202
00028             FILE STATUS IS TRAN-STATUS.                           DTSBX202
00029                                                                   DTSBX202
00030      SELECT HEADER-FILE ASSIGN TO DTSFHDR                         DTSBX202
00031             FILE STATUS IS HEADER-STATUS.                         DTSBX202
00032                                                                   DTSBX202
00033                                                                   DTSBX202
00034  DATA DIVISION.                                                   DTSBX202
00035  FILE SECTION.                                                    DTSBX202
00036  FD  TRAN-FILE                                                    DTSBX202
00037      RECORDING MODE IS F.                                         DTSBX202
00038  01  TRAN-REC                PIC X(135).                          DTSBX202
00039                                                                   DTSBX202
00040  FD  HEADER-FILE                                                  DTSBX202
00041      RECORDING MODE IS F.                                         DTSBX202
00042  01  HEADER-REC              PIC X(148).                          DTSBX202
00043                                                                   DTSBX202
00044      EJECT                                                        DTSBX202
00045  WORKING-STORAGE SECTION.                                         DTSBX202
000455 77  PAN-VALET PICTURE X(24) VALUE '001DTSBX202  10/15/13'.       DTSBX202
00046  77  PAN-VALET PICTURE X(24) VALUE '014DTSBX202  10/11/13'.       DTSBX202
00047  77  PAN-VALET PICTURE X(24) VALUE '019DTSBX201  04/11/13'.       DTSBX202
00048  77  PAN-VALET PICTURE X(24) VALUE '029DTSBX201  04/05/13'.       DTSBX202
00049      SKIP3                                                        DTSBX202
00050  01  WRK-AREA.                                                    DTSBX202
00051      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +201.DTSBX202
00052                                                                   DTSBX202
00053      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBX201'.DTSBX202
00054                                                                   DTSBX202
00055      05  TRAN-STATUS                 PIC  X(02).                  DTSBX202
00056          88  TRAN-STATUS-OK-88         VALUE '00'.                DTSBX202
00057                                                                   DTSBX202
00058      05  HEADER-STATUS               PIC X(02).                   DTSBX202
00059          88  HEADER-STATUS-OK-88       VALUE '00'.                DTSBX202
00060                                                                   DTSBX202
00061      05  WRK-ERROR-IND               PIC  X(01).                  DTSBX202
00062          88  WRK-ERROR-YES-88         VALUE 'Y'.                  DTSBX202
00063          88  WRK-ERROR-NO-88          VALUE 'N'.                  DTSBX202
00064                                                                   DTSBX202
00065      05  WRK-TRAN-REC.                                            DTSBX202
00066          10  WRK-TRAN-BATCH-NO          PIC 9(05).                DTSBX202
00067          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00068          10  WRK-TRAN-ITEM-NO           PIC 9(03).                DTSBX202
00069          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00070          10  WRK-TRAN-TRN-TYPE          PIC X(02).                DTSBX202
00071          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00072          10  WRK-TRAN-EMP-NO            PIC 9(06).                DTSBX202
00073          10  WRK-TRAN-EMP-NO-X REDEFINES WRK-TRAN-EMP-NO          DTSBX202
00074                                         PIC X(06).                DTSBX202
00075          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00076          10  WRK-TRAN-QTR               PIC X(06).                DTSBX202
00077          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00078          10  WRK-TRAN-REMIT             PIC --------9.99.         DTSBX202
00079          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00080          10  WRK-TRAN-TOT-WAGE          PIC --------9.99.         DTSBX202
00081          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00082          10  WRK-TRAN-TAX-WAGE          PIC --------9.99.         DTSBX202
00083          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00084          10  WRK-TRAN-EXCESS-WAGE       PIC --------9.99.         DTSBX202
00085          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00086          10  WRK-TRAN-RATE              PIC Z9.9.                 DTSBX202
00087          10  WRK-TRAN-RATE-X REDEFINES WRK-TRAN-RATE              DTSBX202
00088                                         PIC X(04).                DTSBX202
00089          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00090          10  WRK-TRAN-ACCT              PIC X(02).                DTSBX202
00091          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00092          10  WRK-TRAN-CATEGORY          PIC X(01).                DTSBX202
00093          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00094          10  WRK-TRAN-SOURCE               PIC X(01).             DTSBX202
00095              88  WRK-TRAN-SOURCE-CR-DB-88 VALUE '1'.              DTSBX202
00096              88  WRK-TRAN-SOURCE-STATUS-88 VALUE '2'.             DTSBX202
00097              88  WRK-TRAN-SOURCE-ERROR-88 VALUE '3'.              DTSBX202
00098          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00099          10  WRK-TRAN-RCVD-DT               PIC X(10).            DTSBX202
00100          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00101          10  WRK-TRAN-PROCESS-DT            PIC X(10).            DTSBX202
00102          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00103          10  TRAN-APPLIC-BATCH          PIC 9(05) VALUE ZERO.     DTSBX202
00104          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00105          10  TRAN-APPLIC-ITEM           PIC 9(03) VALUE ZERO.     DTSBX202
00106          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00107          10  TRAN-RESP-ACTIVITY         PIC X(03) VALUE SPACES.   DTSBX202
00108          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00109          10  TRAN-RESP-OPID             PIC X(08) VALUE SPACES.   DTSBX202
00110                                                                   DTSBX202
00111      05  WRK-HDR-REC.                                             DTSBX202
00112          10  WRK-RUN-DATE               PIC X(10).                DTSBX202
00113          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00114          10  WRK-HDR-BATCH-NO           PIC 9(05).                DTSBX202
00115          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00116          10  WRK-BALANCED-IND           PIC X(01).                DTSBX202
00117          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00118          10  WRK-HELD-IND               PIC X(01).                DTSBX202
00119          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00120          10  WRK-CNTL-TRAN-CNT          PIC 9(03).                DTSBX202
00121          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00122          10  WRK-CNTL-REMIT-AMT         PIC 9(09).99.             DTSBX202
00123          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00124          10  WRK-ATC-CNT                PIC 9(03).                DTSBX202
00125          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00126          10  WRK-ATC-AMOUNT             PIC 9(09).99.             DTSBX202
00127          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00128          10  WRK-PROCESSED-TRN-CNT      PIC 9(03).                DTSBX202
00129          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00130          10  WRK-PROCESSED-AMT          PIC 9(09).99.             DTSBX202
00131          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00132          10  WRK-DEPOSIT-DATE           PIC X(10).                DTSBX202
00133          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00134          10  WRK-CHNG-OPID              PIC X(08).                DTSBX202
00135          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00136          10  WRK-BANK-BATCH-NO          PIC 9(05).                DTSBX202
00137          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00138          10  WRK-ESTB-OPID              PIC X(08).                DTSBX202
00139          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00140          10  WRK-ESTB-DATE              PIC X(10).                DTSBX202
00141          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00142          10  WRK-DEPOSIT-ID             PIC X(10).                DTSBX202
00143          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00144          10  WRK-ANN-BATCH-IND          PIC X(01).                DTSBX202
00145          10  FILLER                     PIC X(01) VALUE ','.      DTSBX202
00146          10  WRK-BATCH-RCVD-DATE        PIC X(10).                DTSBX202
00147                                                                   DTSBX202
00148      05  WRK-ANN-YRQ           PIC S9(05)  COMP-3 VALUE +0.       DTSBX202
00149      05  WRK-PRIOR-RUN-DT      PIC S9(09)  COMP-3 VALUE +0.       DTSBX202
00150      05  WRK-SELECTED-BATCH    PIC S9(05)  COMP-3 VALUE +0.       DTSBX202
00151      05  WRK-QTR-DISP          PIC  X(06).                        DTSBX202
00152      05  WRK-PROCESS-DT        PIC  X(10).                        DTSBX202
00153      05  WRK-TRAN-CNT          PIC S9(07)  COMP-3 VALUE +0.       DTSBX202
00154      05  WRK-HEADER-CNT        PIC S9(07)  COMP-3 VALUE +0.       DTSBX202
00155      05  WRK-TOT-REMIT         PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX202
00156      05  WRK-TOT-TRAN-CNT      PIC S9(07)  COMP-3 VALUE +0.       DTSBX202
00157      05  WRK-PROCESSED-CNT     PIC S9(07)  COMP-3 VALUE +0.       DTSBX202
00158      05  WRK-RCVD-DATE         PIC S9(09)  COMP-3 VALUE +0.       DTSBX202
00159                                                                   DTSBX202
00160      05  AMT-DISP                   PIC --------9.99.             DTSBX202
00161                                                                   DTSBX202
00162      05  WRK-TRACE-IND               PIC  X(01).                  DTSBX202
00163                                                                   DTSBX202
00164  01  L001-LINK-AREA.                                              DTSBX202
00165  ++INCLUDE DTSIL001                                               DTSBX202
00166                                                                   DTSBX202
00167  01  L004-LINK-AREA.                                              DTSBX202
00168  ++INCLUDE DTSIL004                                               DTSBX202
00169                                                                   DTSBX202
00170  01  L516-LINK-AREA.                                              DTSBX202
00171  ++INCLUDE DTSIL516                                               DTSBX202
00172                                                                   DTSBX202
00173  01  L923-LINK-AREA.                                              DTSBX202
00174  ++INCLUDE DTSIL923                                               DTSBX202
00175      EJECT                                                        DTSBX202
00176  01  ASKL-REC.                                                    DTSBX202
00177  ++INCLUDE DTSIASKL                                               DTSBX202
00178      EJECT                                                        DTSBX202
00179  01  AHDR-REC.                                                    DTSBX202
00180  ++INCLUDE DTSIAHDR                                               DTSBX202
00181      EJECT                                                        DTSBX202
00182  01  AADJ-REC.                                                    DTSBX202
00183  ++INCLUDE DTSIAADJ                                               DTSBX202
00184      EJECT                                                        DTSBX202
00185  01  APAY-REC.                                                    DTSBX202
00186  ++INCLUDE DTSIAPAY                                               DTSBX202
00187      EJECT                                                        DTSBX202
00188  01  ARPT-REC.                                                    DTSBX202
00189  ++INCLUDE DTSIARPT                                               DTSBX202
00190      EJECT                                                        DTSBX202
00191  01  AATX-REC.                                                    DTSBX202
00192  ++INCLUDE DTSIAATX                                               DTSBX202
00193      EJECT                                                        DTSBX202
00194  01  L910-LINK-AREA.                                              DTSBX202
00195  ++INCLUDE DTSIL910                                               DTSBX202
00196      EJECT                                                        DTSBX202
00197  01  MSKL-REC.                                                    DTSBX202
00198  ++INCLUDE DTSIMSKL                                               DTSBX202
00199      EJECT                                                        DTSBX202
00200  01  MHDR-REC.                                                    DTSBX202
00201  ++INCLUDE DTSIMHDR                                               DTSBX202
00202      EJECT                                                        DTSBX202
00203  01  MPRF-REC.                                                    DTSBX202
00204  ++INCLUDE DTSIMPRF                                               DTSBX202
00205                                                                   DTSBX202
00206  01  MQTR-REC.                                                    DTSBX202
00207  ++INCLUDE DTSIMQTR                                               DTSBX202
00208                                                                   DTSBX202
00209  01  MRTE-REC.                                                    DTSBX202
00210  ++INCLUDE DTSIMRTE                                               DTSBX202
00211                                                                   DTSBX202
00212  01  L931-LINK-AREA.                                              DTSBX202
00213  ++INCLUDE DTSIL931                                               DTSBX202
00214      EJECT                                                        DTSBX202
00215  01  FSKL-REC.                                                    DTSBX202
00216  ++INCLUDE DTSIFSKL                                               DTSBX202
00217                                                                   DTSBX202
00218  PROCEDURE DIVISION.                                              DTSBX202
00219      SKIP2                                                        DTSBX202
00220      PERFORM I0000-INITIATE THRU I0000-EXIT.                      DTSBX202
00221                                                                   DTSBX202
00222      IF WRK-ERROR-NO-88                                           DTSBX202
00223         PERFORM P0000-PROCESS THRU P0000-EXIT                     DTSBX202
00224         PERFORM T0000-TERMINATE THRU T0000-EXIT                   DTSBX202
00225      END-IF.                                                      DTSBX202
00226                                                                   DTSBX202
00227      GOBACK.                                                      DTSBX202
00228      EJECT                                                        DTSBX202
00229  I0000-INITIATE.                                                  DTSBX202
00230      SET WRK-ERROR-NO-88   TO TRUE.                               DTSBX202
00231      MOVE 'N' TO WRK-TRACE-IND.                                   DTSBX202
00232                                                                   DTSBX202
00233                                                                   DTSBX202
00234      PERFORM I2000-OPEN-FILES-1        THRU I2000-EXIT.           DTSBX202
00235                                                                   DTSBX202
00236      PERFORM I3000-READ-MHDR           THRU I3000-EXIT.           DTSBX202
00237                                                                   DTSBX202
00238      SKIP2                                                        DTSBX202
00239  I0000-EXIT.                                                      DTSBX202
00240      EXIT.                                                        DTSBX202
00241  I2000-OPEN-FILES-1.                                              DTSBX202
00242      MOVE WRK-TRACE-IND TO L923-TRACE-IND.                        DTSBX202
00243                                                                   DTSBX202
00244      MOVE WRK-MOD-NAME TO L923-MOD-NAME.                          DTSBX202
00245                                                                   DTSBX202
00246      PERFORM S910-OPEN-READ          THRU S910-EXIT.              DTSBX202
00247      PERFORM S923-OPEN-READ          THRU S923-EXIT.              DTSBX202
00248      PERFORM S931-OPEN-READ          THRU S931-EXIT.              DTSBX202
00249                                                                   DTSBX202
00250      OPEN OUTPUT TRAN-FILE.                                       DTSBX202
00251      IF NOT TRAN-STATUS-OK-88                                     DTSBX202
00252         DISPLAY 'CANNOT OPEN TRAN FILE ' TRAN-STATUS              DTSBX202
00253         SET WRK-ERROR-YES-88 TO TRUE                              DTSBX202
00254         GO TO I2000-EXIT                                          DTSBX202
00255      END-IF.                                                      DTSBX202
00256                                                                   DTSBX202
00257      OPEN OUTPUT HEADER-FILE.                                     DTSBX202
00258      IF NOT HEADER-STATUS-OK-88                                   DTSBX202
00259         DISPLAY 'CANNOT OPEN HEADER FILE     ' HEADER-STATUS      DTSBX202
00260         SET WRK-ERROR-YES-88 TO TRUE                              DTSBX202
00261         GO TO I2000-EXIT                                          DTSBX202
00262      END-IF.                                                      DTSBX202
00263                                                                   DTSBX202
00264  I2000-EXIT.                                                      DTSBX202
00265      EXIT.                                                        DTSBX202
00266                                                                   DTSBX202
00267  I3000-READ-MHDR.                                                 DTSBX202
00268      MOVE LOW-VALUES              TO MSKL-REC.                    DTSBX202
00269      MOVE +0                      TO MSKL-EMP-NO.                 DTSBX202
00270      SET MSKL-HDR-88              TO TRUE.                        DTSBX202
00271                                                                   DTSBX202
00272      PERFORM S910-READ            THRU S910-EXIT.                 DTSBX202
00273      IF L910-NO-REC-88                                            DTSBX202
00274         DISPLAY 'DTSBX340: MHDR RECORD IS MISSING'                DTSBX202
00275         SET WRK-ERROR-YES-88        TO TRUE                       DTSBX202
00276         GO TO I3000-EXIT                                          DTSBX202
00277      ELSE                                                         DTSBX202
00278         MOVE MSKL-REC             TO MHDR-REC                     DTSBX202
00279         PERFORM I3100-DATES       THRU I3100-EXIT                 DTSBX202
00280      END-IF.                                                      DTSBX202
00281                                                                   DTSBX202
00282  I3000-EXIT.                                                      DTSBX202
00283      EXIT.                                                        DTSBX202
00284                                                                   DTSBX202
00285  I3100-DATES.                                                     DTSBX202
00286      MOVE MHDR-PRIOR-RUN-DATE       TO WRK-PRIOR-RUN-DT.          DTSBX202
00287                                                                   DTSBX202
00288      DISPLAY 'PRIOR RUN DATE: ' WRK-PRIOR-RUN-DT.                 DTSBX202
00289      DISPLAY SPACE.                                               DTSBX202
00290  I3100-EXIT.                                                      DTSBX202
00291      EXIT.                                                        DTSBX202
00292                                                                   DTSBX202
00293  P0000-PROCESS.                                                   DTSBX202
00294      MOVE ZERO      TO ASKL-BATCH-NO                              DTSBX202
00295                        ASKL-ITEM-NO.                              DTSBX202
00296                                                                   DTSBX202
00297      DISPLAY 'UNPROCESSED TRANSACTIONS           '.               DTSBX202
00298      DISPLAY SPACE.                                               DTSBX202
00299                                                                   DTSBX202
00300      PERFORM S923-START-BROWSE       THRU S923-EXIT.              DTSBX202
00301      IF L923-NO-REC-88                                            DTSBX202
00302         DISPLAY 'NO RECORDS FOUND ON FIRST READ'                  DTSBX202
00303      ELSE                                                         DTSBX202
00304         PERFORM UNTIL L923-NO-REC-88                              DTSBX202
00305            PERFORM P1000-READ-ATC    THRU P1000-EXIT              DTSBX202
00306            PERFORM S923-READ-NEXT    THRU S923-EXIT               DTSBX202
00307      END-PERFORM.                                                 DTSBX202
00308                                                                   DTSBX202
00309      IF WRK-TRAN-CNT = 0                                          DTSBX202
00310         PERFORM P2000-DUMMY-REC      THRU P2000-EXIT              DTSBX202
00311      END-IF.                                                      DTSBX202
00312                                                                   DTSBX202
00313  P0000-EXIT.                                                      DTSBX202
00314      EXIT.                                                        DTSBX202
00315                                                                   DTSBX202
00316  P1000-READ-ATC.                                                  DTSBX202
00317      EVALUATE TRUE                                                DTSBX202
00318        WHEN ASKL-RPT-88                                           DTSBX202
00319          PERFORM P1100-QTRLY-REPORTS    THRU P1100-EXIT           DTSBX202
00320                                                                   DTSBX202
00321        WHEN ASKL-HDR-88                                           DTSBX202
00322          PERFORM P1010-HEADER           THRU P1010-EXIT           DTSBX202
00323                                                                   DTSBX202
00324      END-EVALUATE.                                                DTSBX202
00325                                                                   DTSBX202
00326  P1000-EXIT.                                                      DTSBX202
00327      EXIT.                                                        DTSBX202
00328                                                                   DTSBX202
00329  P1010-HEADER.                                                    DTSBX202
00330      MOVE ASKL-REC                 TO AHDR-REC.                   DTSBX202
00331      IF AHDR-ESTB-OP-ID = 'SYSTEM'                                DTSBX202
00332      OR AHDR-ESTB-DATE < WRK-PRIOR-RUN-DT                         DTSBX202
00333         GO TO P1010-EXIT                                          DTSBX202
00334      ELSE                                                         DTSBX202
00335         MOVE ASKL-BATCH-NO         TO WRK-SELECTED-BATCH          DTSBX202
00336      END-IF.                                                      DTSBX202
00337                                                                   DTSBX202
00338      MOVE AHDR-RECEIVED-DATE       TO WRK-RCVD-DATE.              DTSBX202
00339                                                                   DTSBX202
00340      MOVE AHDR-BATCH-NO            TO WRK-HDR-BATCH-NO.           DTSBX202
00341      MOVE AHDR-CHNG-DATE           TO L001-FED-8-DATE-9.          DTSBX202
00342      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX202
00343      IF L001-VALID-DATE                                           DTSBX202
00344         MOVE L001-SLASH-8-DATE     TO WRK-RUN-DATE                DTSBX202
00345      ELSE                                                         DTSBX202
00346         MOVE WRK-PRIOR-RUN-DT      TO L001-FED-8-DATE-9           DTSBX202
00347         PERFORM S001-FROM-FED-8    THRU S001-EXIT                 DTSBX202
00348         MOVE L001-SLASH-8-DATE     TO WRK-RUN-DATE                DTSBX202
00349      END-IF.                                                      DTSBX202
00350      MOVE AHDR-BATCH-BALANCED-IND  TO WRK-BALANCED-IND.           DTSBX202
00351      MOVE AHDR-BATCH-HELD-IND      TO WRK-HELD-IND.               DTSBX202
00352      MOVE AHDR-ESTB-DATE           TO L001-FED-8-DATE-9.          DTSBX202
00353      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX202
00354      MOVE L001-SLASH-8-DATE        TO WRK-ESTB-DATE.              DTSBX202
00355      MOVE AHDR-ESTB-OP-ID          TO WRK-ESTB-OPID.              DTSBX202
00356 **   MOVE AHDR-CHNG-DATE           TO L001-FED-8-DATE-9.          DTSBX202
00357 *    PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX202
00358 *    IF L001-VALID-DATE                                           DTSBX202
00359 *       MOVE L001-SLASH-8-DATE     TO WRK-CHNG-DATE               DTSBX202
00360 *    ELSE                                                         DTSBX202
00361 *       MOVE SPACES                TO WRK-CHNG-DATE               DTSBX202
00362 **   END-IF.                                                      DTSBX202
00363      MOVE AHDR-CHNG-OP-ID          TO WRK-CHNG-OPID.              DTSBX202
00364      MOVE AHDR-DEPOSIT-DATE        TO L001-FED-8-DATE-9.          DTSBX202
00365      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX202
00366      MOVE L001-SLASH-8-DATE        TO WRK-DEPOSIT-DATE.           DTSBX202
00367      MOVE AHDR-RECEIVED-DATE       TO L001-FED-8-DATE-9.          DTSBX202
00368      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX202
00369      MOVE L001-SLASH-8-DATE        TO WRK-BATCH-RCVD-DATE.        DTSBX202
00370      MOVE AHDR-CONTROL-TRAN-CNT    TO WRK-CNTL-TRAN-CNT.          DTSBX202
00371      MOVE AHDR-PROC-TRAN-CNT       TO WRK-PROCESSED-TRN-CNT.      DTSBX202
00372      MOVE AHDR-ATC-FILE-TRAN-CNT   TO WRK-ATC-CNT.                DTSBX202
00373      MOVE AHDR-CONTROL-REMIT-AMT   TO WRK-CNTL-REMIT-AMT.         DTSBX202
00374      MOVE AHDR-PROC-REMIT-AMT      TO WRK-PROCESSED-AMT.          DTSBX202
00375      MOVE AHDR-ATC-FILE-REMIT-AMT  TO WRK-ATC-AMOUNT.             DTSBX202
00376      IF AHDR-ANNUAL-BATCH-YES-88                                  DTSBX202
00377         MOVE 'Y'                   TO WRK-ANN-BATCH-IND           DTSBX202
00378      ELSE                                                         DTSBX202
00379         MOVE 'N'                   TO WRK-ANN-BATCH-IND           DTSBX202
00380      END-IF.                                                      DTSBX202
00381      MOVE AHDR-DEPOSIT-ID          TO WRK-DEPOSIT-ID.             DTSBX202
00382      MOVE AHDR-BANK-BATCH-NO       TO WRK-BANK-BATCH-NO.          DTSBX202
00383                                                                   DTSBX202
00384      WRITE HEADER-REC              FROM WRK-HDR-REC.              DTSBX202
00385      ADD +1                        TO WRK-HEADER-CNT.             DTSBX202
00386                                                                   DTSBX202
00387      DISPLAY AHDR-BATCH-NO '  ' WRK-RUN-DATE '  ' AHDR-CHNG-DATE. DTSBX202
00388  P1010-EXIT.                                                      DTSBX202
00389      EXIT.                                                        DTSBX202
00390                                                                   DTSBX202
00391  P1100-QTRLY-REPORTS.                                             DTSBX202
00392      MOVE ASKL-REC                    TO ARPT-REC.                DTSBX202
00393                                                                   DTSBX202
00394      IF ASKL-BATCH-NO = WRK-SELECTED-BATCH                        DTSBX202
00395      AND ARPT-NOT-PROCESSED-88                                    DTSBX202
00396         NEXT SENTENCE                                             DTSBX202
00397      ELSE                                                         DTSBX202
00398         GO TO P1100-EXIT                                          DTSBX202
00399      END-IF.                                                      DTSBX202
00400                                                                   DTSBX202
00401      IF ARPT-RPT-TYPE = 'WD' OR 'ES'                              DTSBX202
00402         GO TO P1100-EXIT                                          DTSBX202
00403      END-IF.                                                      DTSBX202
00404                                                                   DTSBX202
00405      ADD ARPT-REMIT-AMT               TO WRK-TOT-REMIT.           DTSBX202
00406                                                                   DTSBX202
00407      MOVE ARPT-BATCH-NO               TO WRK-TRAN-BATCH-NO.       DTSBX202
00408      MOVE ARPT-ITEM-NO                TO WRK-TRAN-ITEM-NO.        DTSBX202
00409      MOVE ARPT-RPT-TYPE               TO WRK-TRAN-TRN-TYPE.       DTSBX202
00410      IF ARPT-EMP-NO-NO-ENTRY-88                                   DTSBX202
00411         MOVE SPACES                   TO WRK-TRAN-EMP-NO-X        DTSBX202
00412      ELSE                                                         DTSBX202
00413         MOVE ARPT-EMP-NO              TO WRK-TRAN-EMP-NO          DTSBX202
00414      END-IF.                                                      DTSBX202
00415      IF ARPT-YRQ-NO-ENTRY-88                                      DTSBX202
00416         MOVE SPACES                   TO WRK-TRAN-QTR             DTSBX202
00417      ELSE                                                         DTSBX202
00418         MOVE ARPT-YRQ                 TO L004-QTR-5-9             DTSBX202
00419         PERFORM S004-FROM-5           THRU S004-EXIT              DTSBX202
00420         MOVE L004-SLASH-5-QTR         TO WRK-TRAN-QTR             DTSBX202
00421      END-IF.                                                      DTSBX202
00422      MOVE ARPT-REMIT-AMT              TO WRK-TRAN-REMIT.          DTSBX202
00423      IF ARPT-TOT-WAGE-NO-ENTRY-88                                 DTSBX202
00424         MOVE ZERO                     TO WRK-TRAN-TOT-WAGE        DTSBX202
00425      ELSE                                                         DTSBX202
00426         MOVE ARPT-TOT-WAGE            TO WRK-TRAN-TOT-WAGE        DTSBX202
00427      END-IF.                                                      DTSBX202
00428      IF ARPT-TAX-WAGE-NO-ENTRY-88                                 DTSBX202
00429         MOVE ZERO                     TO WRK-TRAN-TAX-WAGE        DTSBX202
00430      ELSE                                                         DTSBX202
00431         MOVE ARPT-TAX-WAGE            TO WRK-TRAN-TAX-WAGE        DTSBX202
00432      END-IF.                                                      DTSBX202
00433      IF ARPT-EXCESS-WAGE-NO-ENTRY-88                              DTSBX202
00434         MOVE ZERO                     TO WRK-TRAN-EXCESS-WAGE     DTSBX202
00435      ELSE                                                         DTSBX202
00436         MOVE ARPT-EXCESS-WAGE         TO WRK-TRAN-EXCESS-WAGE     DTSBX202
00437      END-IF.                                                      DTSBX202
00438                                                                   DTSBX202
00439      MOVE LOW-VALUES                  TO MRTE-KEY-AREA            DTSBX202
00440      MOVE ARPT-EMP-NO                 TO MRTE-EMP-NO              DTSBX202
00441      MOVE ARPT-YRQ                    TO L004-QTR-5-9.            DTSBX202
00442      MOVE 1                           TO L004-QTR-5-YR.           DTSBX202
00443      MOVE L004-QTR-5-9                TO MRTE-EFF-YRQ.            DTSBX202
00444      SET MRTE-RTE-88                  TO TRUE                     DTSBX202
00445      MOVE MRTE-KEY-AREA               TO MSKL-KEY-AREA.           DTSBX202
00446      PERFORM S910-READ                THRU S910-EXIT              DTSBX202
00447      IF L910-OK-88                                                DTSBX202
00448         MOVE MSKL-REC                 TO MRTE-REC                 DTSBX202
00449         MOVE MRTE-UI-RATE             TO WRK-TRAN-RATE            DTSBX202
00450      ELSE                                                         DTSBX202
00451         MOVE SPACES                   TO WRK-TRAN-RATE-X          DTSBX202
00452      END-IF.                                                      DTSBX202
00453                                                                   DTSBX202
00454      MOVE SPACES                      TO WRK-TRAN-ACCT.           DTSBX202
00455      MOVE 'R'                         TO WRK-TRAN-CATEGORY.       DTSBX202
00456                                                                   DTSBX202
00457      SET WRK-TRAN-SOURCE-ERROR-88     TO TRUE                     DTSBX202
00458      IF ARPT-RECEIVED-DATE = ZEROS                                DTSBX202
00459         MOVE WRK-RCVD-DATE            TO ARPT-RECEIVED-DATE       DTSBX202
00460      END-IF.                                                      DTSBX202
00461                                                                   DTSBX202
00462      MOVE ARPT-RECEIVED-DATE          TO L001-FED-8-DATE-9.       DTSBX202
00463      PERFORM S001-FROM-FED-8          THRU S001-EXIT.             DTSBX202
00464      MOVE L001-SLASH-8-DATE           TO WRK-TRAN-RCVD-DT.        DTSBX202
00465                                                                   DTSBX202
00466      MOVE WRK-PRIOR-RUN-DT            TO L001-FED-8-DATE-9.       DTSBX202
00467      PERFORM S001-FROM-FED-8          THRU S001-EXIT.             DTSBX202
00468      MOVE L001-SLASH-8-DATE           TO WRK-TRAN-PROCESS-DT.     DTSBX202
00469                                                                   DTSBX202
00470      WRITE TRAN-REC                   FROM WRK-TRAN-REC.          DTSBX202
00471      ADD  +1                          TO WRK-TRAN-CNT.            DTSBX202
00472                                                                   DTSBX202
00473  P1100-EXIT.                                                      DTSBX202
00474      EXIT.                                                        DTSBX202
00475                                                                   DTSBX202
00476  P2000-DUMMY-REC.                                                 DTSBX202
00477      MOVE ZERO                    TO WRK-TRAN-BATCH-NO            DTSBX202
00478                                      WRK-TRAN-ITEM-NO.            DTSBX202
00479      MOVE SPACES                  TO WRK-TRAN-TRN-TYPE            DTSBX202
00480                                      WRK-TRAN-EMP-NO-X            DTSBX202
00481                                      WRK-TRAN-QTR.                DTSBX202
00482      MOVE ZERO                    TO WRK-TRAN-REMIT               DTSBX202
00483                                      WRK-TRAN-TOT-WAGE            DTSBX202
00484                                      WRK-TRAN-TAX-WAGE            DTSBX202
00485                                      WRK-TRAN-EXCESS-WAGE         DTSBX202
00486                                      WRK-TRAN-RATE.               DTSBX202
00487                                                                   DTSBX202
00488      MOVE SPACES                  TO WRK-TRAN-ACCT.               DTSBX202
00489      MOVE 'R'                     TO WRK-TRAN-CATEGORY.           DTSBX202
00490                                                                   DTSBX202
00491      SET WRK-TRAN-SOURCE-ERROR-88 TO TRUE.                        DTSBX202
00492                                                                   DTSBX202
00493      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX202
00494      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX202
00495      MOVE L001-SLASH-8-DATE       TO WRK-TRAN-RCVD-DT             DTSBX202
00496                                      WRK-TRAN-PROCESS-DT.         DTSBX202
00497                                                                   DTSBX202
00498      WRITE TRAN-REC               FROM WRK-TRAN-REC.              DTSBX202
00499                                                                   DTSBX202
00500  P2000-EXIT.                                                      DTSBX202
00501      EXIT.                                                        DTSBX202
00502                                                                   DTSBX202
00503  T0000-TERMINATE.                                                 DTSBX202
00504      CLOSE TRAN-FILE                                              DTSBX202
00505            HEADER-FILE.                                           DTSBX202
00506                                                                   DTSBX202
00507                                                                   DTSBX202
00508      DISPLAY ' '.                                                 DTSBX202
00509                                                                   DTSBX202
00510      DISPLAY '*** DTSBX202 TERMINATION STATISTICS ***'.           DTSBX202
00511                                                                   DTSBX202
00512      DISPLAY ' '.                                                 DTSBX202
00513                                                                   DTSBX202
00514      DISPLAY 'TRANSACTION RECORDS WRITTEN               : '       DTSBX202
00515              WRK-TRAN-CNT.                                        DTSBX202
00516                                                                   DTSBX202
00517      MOVE WRK-TOT-REMIT TO AMT-DISP.                              DTSBX202
00518      DISPLAY 'TOTAL REMITTANCE NOT PROCESSED            : '       DTSBX202
00519              AMT-DISP.                                            DTSBX202
00520                                                                   DTSBX202
00521      DISPLAY 'HEADERS WRITTEN                           : '       DTSBX202
00522              WRK-HEADER-CNT.                                      DTSBX202
00523                                                                   DTSBX202
00524                                                                   DTSBX202
00525      PERFORM S910-CLOSE THRU S910-EXIT.                           DTSBX202
00526      PERFORM S923-CLOSE THRU S923-EXIT.                           DTSBX202
00527      PERFORM S931-CLOSE THRU S931-EXIT.                           DTSBX202
00528                                                                   DTSBX202
00529  T0000-EXIT.                                                      DTSBX202
00530      EXIT.                                                        DTSBX202
00531                                                                   DTSBX202
00532  S001-FROM-FED-8.                                                 DTSBX202
00533      SET L001-FROM-FED-8 TO TRUE.                                 DTSBX202
00534      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBX202
00535                                                                   DTSBX202
00536  S001-EXIT.                                                       DTSBX202
00537      EXIT.                                                        DTSBX202
00538                                                                   DTSBX202
00539  S004-FROM-5.                                                     DTSBX202
00540      SET L004-FROM-5 TO TRUE.                                     DTSBX202
00541      GO TO S004-QTR.                                              DTSBX202
00542                                                                   DTSBX202
00543  S004-FROM-ABS.                                                   DTSBX202
00544      SET L004-FROM-ABS TO TRUE.                                   DTSBX202
00545      GO TO S004-QTR.                                              DTSBX202
00546                                                                   DTSBX202
00547  S004-FROM-DATE.                                                  DTSBX202
00548      SET L004-FROM-DATE TO TRUE.                                  DTSBX202
00549      GO TO S004-QTR.                                              DTSBX202
00550                                                                   DTSBX202
00551  S004-QTR.                                                        DTSBX202
00552                                                                   DTSBX202
00553      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBX202
00554                                                                   DTSBX202
00555  S004-EXIT.                                                       DTSBX202
00556      EXIT.                                                        DTSBX202
00557                                                                   DTSBX202
00558  S516-LIABILITY.                                                  DTSBX202
00559      CALL 'DTSBU516' USING L516-LINK-AREA                         DTSBX202
00560                            MPRF-REC.                              DTSBX202
00561                                                                   DTSBX202
00562  S516-EXIT.                                                       DTSBX202
00563      EXIT.                                                        DTSBX202
00564      EJECT                                                        DTSBX202
00565  S923-OPEN-READ.                                                  DTSBX202
00566      SET L923-OPEN-READ-88 TO TRUE.                               DTSBX202
00567      GO TO S923-ATC-IO.                                           DTSBX202
00568                                                                   DTSBX202
00569  S923-OPEN-UPDATE.                                                DTSBX202
00570      SET L923-OPEN-UPDATE-88        TO TRUE.                      DTSBX202
00571      GO TO S923-ATC-IO.                                           DTSBX202
00572                                                                   DTSBX202
00573  S923-START-BROWSE.                                               DTSBX202
00574      SET L923-START-BROWSE-88 TO TRUE.                            DTSBX202
00575      GO TO S923-ATC-IO.                                           DTSBX202
00576                                                                   DTSBX202
00577  S923-READ-NEXT.                                                  DTSBX202
00578      SET L923-READ-NEXT-88 TO TRUE.                               DTSBX202
00579      GO TO S923-ATC-IO.                                           DTSBX202
00580                                                                   DTSBX202
00581  S923-REWRITE.                                                    DTSBX202
00582      SET L923-REWRITE-88 TO TRUE.                                 DTSBX202
00583      GO TO S923-ATC-IO.                                           DTSBX202
00584                                                                   DTSBX202
00585  S923-DELETE.                                                     DTSBX202
00586      SET L923-DELETE-88 TO TRUE.                                  DTSBX202
00587      GO TO S923-ATC-IO.                                           DTSBX202
00588                                                                   DTSBX202
00589  S923-CLOSE.                                                      DTSBX202
00590      SET L923-CLOSE-88     TO TRUE.                               DTSBX202
00591      GO TO S923-ATC-IO.                                           DTSBX202
00592                                                                   DTSBX202
00593  S923-ATC-IO.                                                     DTSBX202
00594      CALL 'DTSBU923' USING L923-LINK-AREA                         DTSBX202
00595                            ASKL-REC.                              DTSBX202
00596  S923-EXIT.                                                       DTSBX202
00597      EXIT.                                                        DTSBX202
00598      SKIP3                                                        DTSBX202
00599  S910-OPEN-READ.                                                  DTSBX202
00600      SET L910-OPEN-READ-88 TO TRUE.                               DTSBX202
00601      GO TO S910-MSTR-IO.                                          DTSBX202
00602                                                                   DTSBX202
00603  S910-READ.                                                       DTSBX202
00604      SET L910-READ-88 TO TRUE.                                    DTSBX202
00605      GO TO S910-MSTR-IO.                                          DTSBX202
00606                                                                   DTSBX202
00607  S910-START-BROWSE.                                               DTSBX202
00608      SET L910-START-BROWSE-88 TO TRUE.                            DTSBX202
00609      GO TO S910-MSTR-IO.                                          DTSBX202
00610                                                                   DTSBX202
00611  S910-READ-NEXT.                                                  DTSBX202
00612      SET L910-READ-NEXT-88 TO TRUE.                               DTSBX202
00613      GO TO S910-MSTR-IO.                                          DTSBX202
00614  S910-CLOSE.                                                      DTSBX202
00615      SET L910-CLOSE-88     TO TRUE.                               DTSBX202
00616      GO TO S910-MSTR-IO.                                          DTSBX202
00617                                                                   DTSBX202
00618  S910-MSTR-IO.                                                    DTSBX202
00619      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBX202
00620                            MSKL-REC.                              DTSBX202
00621  S910-EXIT.                                                       DTSBX202
00622      EXIT.                                                        DTSBX202
00623                                                                   DTSBX202
00624  S931-OPEN-READ.                                                  DTSBX202
00625      SET L931-OPEN-READ-88 TO TRUE.                               DTSBX202
00626      GO TO S931-REF-IO.                                           DTSBX202
00627                                                                   DTSBX202
00628  S931-CLOSE.                                                      DTSBX202
00629      SET L931-CLOSE-88 TO TRUE.                                   DTSBX202
00630      GO TO S931-REF-IO.                                           DTSBX202
00631                                                                   DTSBX202
00632  S931-REF-IO.                                                     DTSBX202
00633      CALL 'DTSBU931' USING L931-LINK-AREA                         DTSBX202
00634                            FSKL-REC.                              DTSBX202
00635  S931-EXIT.                                                       DTSBX202
00636      EXIT.                                                        DTSBX202
00637                                                                   DTSBX202
00638  S999-ABEND.                                                      DTSBX202
00639      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBX202
00640  S999-EXIT.                                                       DTSBX202
00641      EXIT.                                                        DTSBX202
