00001  IDENTIFICATION DIVISION.                                         04/11/13
00002  PROGRAM-ID.             DTSBX201.                                DTSBX201
00003  AUTHOR.                 TRW.                                        LV019
00004  DATE-WRITTEN.           APRIL 2003.                              DTSBX201
00005  DATE-COMPILED.                                                   DTSBX201
00006      SKIP3                                                        DTSBX201
00007 *****                                                             DTSBX201
00008 *                                                                 DTSBX201
00009 *    FUNCTION:  EXTRACT DATA ABOUT CURRENT QUARTER REPORT         DTSBX201
00010 *               TRANSACTIONS FOR INTRANET WEB APP                 DTSBX201
00011 *                                                                 DTSBX201
00012 *    MODIFICATION LOG:                                            DTSBX201
00013 *                                                                 DTSBX201
00014 *    04/01/2003  INITIAL DEVELOPMENT.                             DTSBX201
00015 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00016 *                                                                 DTSBX201
00017 *    09/17/2007  ADDED TEST FOR QUARTERLY REPORTS SUBMITTED       DTSBX201
00018 *                FOR ANNUAL FILERS                                DTSBX201
00019 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00020 *                                                                 DTSBX201
00021 *    02/11/2008  ADDED PROCESSING FOR CHECK FOR STATUS CHANGES IN DTSBX201
00022 *                AATX ANNUAL REPORT RECORDS.                      DTSBX201
00023 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00024 *                                                                 DTSBX201
00025 *    04/03/2008  ELIMINATED PARM FILE: CURRENT QUARTER AND PRIOR  DTSBX201
00026 *                RUN DATE ARE NOW DERIVED FROM HEADER REC.        DTSBX201
00027 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00028 *                                                                 DTSBX201
00029 *    07/26/2010  MODIFIED TO INCLUDE ALL QUARTERS.  P1100 AND     DTSBX201
00030 *                P1110 CHANGED.                                   DTSBX201
00031 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00032 *                                                                 DTSBX201
00033 *    06/22/2011  ADDED TEST FOR MISSING RATE                      DTSBX201
00034 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00035 *                                                                 DTSBX201
00036 *    09/30/2011  ADDED TEST FOR REMITTANCE WHEN TAX WAGE = 0,     DTSBX201
00037 *                AND ADDED CATCH-ALL FOR UNKNOWN ERROR.           DTSBX201
00038 *                WORK ORDER:                      PROGRAMMER: GD  DTSBX201
00039 *                                                                 DTSBX201
00040 *    04/05/2013  MODIFIED TO INCLUDE REPORTS FROM ALL QUARTERS,   DTSBX201
00041 *                AND TO INCLUDE SUPPLEMENTAL REPORTS AND          DTSBX201
00042 *                PAYMENTS.                                        DTSBX201
00043 *                WORK ORDER: TKT 1653             PROGRAMMER: GD  DTSBX201
00044 *                                                                 DTSBX201
00045 *****                                                             DTSBX201
00046      SKIP3                                                        DTSBX201
00047  ENVIRONMENT DIVISION.                                            DTSBX201
00048  INPUT-OUTPUT SECTION.                                            DTSBX201
00049  FILE-CONTROL.                                                    DTSBX201
00050      SELECT BX331A1-SUMMARY ASSIGN TO BX200SUM                    DTSBX201
00051             FILE STATUS IS BX331A1-STATUS.                        DTSBX201
00052                                                                   DTSBX201
00053      SELECT BX331C-TRAN ASSIGN TO BX200TRN                        DTSBX201
00054             FILE STATUS IS BX331C-STATUS.                         DTSBX201
00055                                                                   DTSBX201
00056      SELECT HEADER-FILE ASSIGN TO BX200HDR                        DTSBX201
00057             FILE STATUS IS HEADER-STATUS.                         DTSBX201
00058                                                                   DTSBX201
00059                                                                   DTSBX201
00060  DATA DIVISION.                                                   DTSBX201
00061  FILE SECTION.                                                    DTSBX201
00062  FD  BX331A1-SUMMARY                                              DTSBX201
00063      RECORDING MODE IS F.                                         DTSBX201
00064  01  BX331A1-REC             PIC X(73).                           DTSBX201
00065                                                                   DTSBX201
00066  FD  BX331C-TRAN                                                  DTSBX201
00067      RECORDING MODE IS F.                                         DTSBX201
00068  01  BX331C-REC              PIC X(135).                          DTSBX201
00069                                                                   DTSBX201
00070  FD  HEADER-FILE                                                  DTSBX201
00071      RECORDING MODE IS F.                                         DTSBX201
00072  01  HEADER-REC              PIC X(141).                          DTSBX201
00073                                                                   DTSBX201
00074      EJECT                                                        DTSBX201
00075  WORKING-STORAGE SECTION.                                         DTSBX201
000755 77  PAN-VALET PICTURE X(24) VALUE '019DTSBX201  04/11/13'.       DTSBX201
00076  77  PAN-VALET PICTURE X(24) VALUE '029DTSBX201  04/05/13'.       DTSBX201
00077      SKIP3                                                        DTSBX201
00078  01  WRK-AREA.                                                    DTSBX201
00079      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +201.DTSBX201
00080                                                                   DTSBX201
00081      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBX201'.DTSBX201
00082                                                                   DTSBX201
00083      05  BX331A1-STATUS PIC X(02).                                DTSBX201
00084          88  BX331A1-STATUS-OK-88     VALUE '00'.                 DTSBX201
00085                                                                   DTSBX201
00086      05  BX331C-STATUS PIC X(02).                                 DTSBX201
00087          88  BX331C-STATUS-OK-88      VALUE '00'.                 DTSBX201
00088                                                                   DTSBX201
00089      05  HEADER-STATUS PIC X(02).                                 DTSBX201
00090          88  HEADER-STATUS-OK-88      VALUE '00'.                 DTSBX201
00091                                                                   DTSBX201
00092      05  WRK-ERROR-IND               PIC  X(01).                  DTSBX201
00093          88  WRK-ERROR-YES-88         VALUE 'Y'.                  DTSBX201
00094          88  WRK-ERROR-NO-88          VALUE 'N'.                  DTSBX201
00095                                                                   DTSBX201
00096      05  WRK-RPT-DUE-IND             PIC  X(01).                  DTSBX201
00097          88  WRK-RPT-DUE-YES-88       VALUE 'Y'.                  DTSBX201
00098          88  WRK-RPT-DUE-NO-88        VALUE 'N'.                  DTSBX201
00099                                                                   DTSBX201
00100      05  WRK-EMP-FOUND-IND           PIC  X(01).                  DTSBX201
00101          88  WRK-EMP-FOUND-YES-88     VALUE 'Y'.                  DTSBX201
00102          88  WRK-EMP-FOUND-NO-88      VALUE 'N'.                  DTSBX201
00103                                                                   DTSBX201
00104      05  WRK-BX331A-REC.                                          DTSBX201
00105          10  WRK-BX331A-PROCESS-DT      PIC X(10).                DTSBX201
00106          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00107          10  WRK-BX331A-MESSAGE         PIC X(40).                DTSBX201
00108          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00109          10  WRK-BX331A-EMP-NO          PIC 9(06).                DTSBX201
00110          10  WRK-BX331A-EMP-NO-X REDEFINES WRK-BX331A-EMP-NO      DTSBX201
00111                                         PIC X(06).                DTSBX201
00112          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00113          10  WRK-BX331A-BATCH           PIC 9(05).                DTSBX201
00114          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00115          10  WRK-BX331A-ITEM            PIC 9(03).                DTSBX201
00116          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00117          10  WRK-BX331A-TRAN            PIC X(02).                DTSBX201
00118          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00119          10  WRK-BX331A-SOURCE             PIC X(01).             DTSBX201
00120              88  WRK-BX331A-SOURCE-CR-DB-88 VALUE '1'.            DTSBX201
00121              88  WRK-BX331A-SOURCE-STATUS-88 VALUE '2'.           DTSBX201
00122              88  WRK-BX331A-SOURCE-ERROR-88 VALUE '3'.            DTSBX201
00123                                                                   DTSBX201
00124      05  WRK-BX331C-REC.                                          DTSBX201
00125          10  WRK-BX331C-BATCH-NO        PIC 9(05).                DTSBX201
00126          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00127          10  WRK-BX331C-ITEM-NO         PIC 9(03).                DTSBX201
00128          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00129          10  WRK-BX331C-TRAN            PIC X(02).                DTSBX201
00130          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00131          10  WRK-BX331C-EMP-NO          PIC 9(06).                DTSBX201
00132          10  WRK-BX331C-EMP-NO-X REDEFINES WRK-BX331C-EMP-NO      DTSBX201
00133                                         PIC X(06).                DTSBX201
00134          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00135          10  WRK-BX331C-QTR             PIC X(06).                DTSBX201
00136          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00137          10  WRK-BX331C-REMIT           PIC --------9.99.         DTSBX201
00138          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00139          10  WRK-BX331C-TOT-WAGE        PIC --------9.99.         DTSBX201
00140          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00141          10  WRK-BX331C-TAX-WAGE        PIC --------9.99.         DTSBX201
00142          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00143          10  WRK-BX331C-EXCESS-WAGE     PIC --------9.99.         DTSBX201
00144          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00145          10  WRK-BX331C-RATE            PIC Z9.9.                 DTSBX201
00146          10  WRK-BX331C-RATE-X REDEFINES WRK-BX331C-RATE          DTSBX201
00147                                         PIC X(04).                DTSBX201
00148          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00149          10  WRK-BX331C-ACCT            PIC X(02).                DTSBX201
00150          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00151          10  WRK-BX331C-CATEGORY        PIC X(01).                DTSBX201
00152          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00153          10  WRK-BX331C-SOURCE             PIC X(01).             DTSBX201
00154              88  WRK-BX331C-SOURCE-CR-DB-88 VALUE '1'.            DTSBX201
00155              88  WRK-BX331C-SOURCE-STATUS-88 VALUE '2'.           DTSBX201
00156              88  WRK-BX331C-SOURCE-ERROR-88 VALUE '3'.            DTSBX201
00157          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00158          10  WRK-BX331C-RCVD-DT             PIC X(10).            DTSBX201
00159          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00160          10  WRK-BX331C-PROCESS-DT          PIC X(10).            DTSBX201
00161 *&                                                                DTSBX201
00162          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00163          10  TRAN-APPLIC-BATCH          PIC 9(05) VALUE ZERO.     DTSBX201
00164          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00165          10  TRAN-APPLIC-ITEM           PIC 9(03) VALUE ZERO.     DTSBX201
00166          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00167          10  TRAN-RESP-ACTIVITY         PIC X(03) VALUE SPACES.   DTSBX201
00168          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00169          10  TRAN-RESP-OPID             PIC X(08) VALUE SPACES.   DTSBX201
00170                                                                   DTSBX201
00171      05  WRK-HDR-REC.                                             DTSBX201
00172          10  WRK-HDR-BATCH-NO           PIC 9(05).                DTSBX201
00173          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00174          10  WRK-RUN-DATE               PIC X(10).                DTSBX201
00175          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00176          10  WRK-BALANCED-IND           PIC X(01).                DTSBX201
00177          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00178          10  WRK-HELD-IND               PIC X(01).                DTSBX201
00179          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00180          10  WRK-ESTB-DATE              PIC X(10).                DTSBX201
00181          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00182          10  WRK-ESTB-OPID              PIC X(08).                DTSBX201
00183          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00184          10  WRK-CHNG-DATE              PIC X(10).                DTSBX201
00185          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00186          10  WRK-CHNG-OPID              PIC X(08).                DTSBX201
00187          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00188          10  WRK-DEPOSIT-DATE           PIC X(10).                DTSBX201
00189          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00190          10  WRK-BATCH-RCVD-DATE        PIC X(10).                DTSBX201
00191          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00192          10  WRK-CNTL-TRAN-CNT          PIC 9(03).                DTSBX201
00193          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00194          10  WRK-PROCESSED-TRN-CNT      PIC 9(03).                DTSBX201
00195          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00196          10  WRK-ATC-CNT                PIC 9(03).                DTSBX201
00197          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00198          10  WRK-CNTL-REMIT-AMT         PIC 9(09).99.             DTSBX201
00199          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00200          10  WRK-PROCESSED-AMT          PIC 9(09).99.             DTSBX201
00201          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00202          10  WRK-ATC-AMOUNT             PIC 9(09).99.             DTSBX201
00203          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00204          10  WRK-ANN-BATCH-IND          PIC X(01).                DTSBX201
00205          10  FILLER                     PIC X(01) VALUE ','.      DTSBX201
00206          10  WRK-BANK-BATCH-NO          PIC 9(05).                DTSBX201
00207                                                                   DTSBX201
00208      05  WRK-TAX-WAGE          PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX201
00209      05  WRK-DIFF              PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX201
00210      05  WRK-YRQ               PIC S9(05)  COMP-3 VALUE +0.       DTSBX201
00211      05  WRK-ANN-YRQ           PIC S9(05)  COMP-3 VALUE +0.       DTSBX201
00212      05  WRK-PRIOR-RUN-DT      PIC S9(09)  COMP-3 VALUE +0.       DTSBX201
00213      05  WRK-QTR-DISP          PIC  X(06).                        DTSBX201
00214      05  WRK-PROCESS-DT        PIC  X(10).                        DTSBX201
00215      05  WRK-BX331A-CNT        PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00216      05  WRK-BX331C-CNT        PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00217      05  WRK-HEADER-CNT        PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00218      05  WRK-AATX-CNT          PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00219      05  WRK-TOT-REMIT         PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX201
00220      05  WRK-ATC-AMT           PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX201
00221      05  WRK-PROC-AMT          PIC S9(11)V99  COMP-3 VALUE +0.    DTSBX201
00222      05  WRK-TOT-TRAN-CNT      PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00223      05  WRK-BATCH-ERROR-CNT   PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00224      05  WRK-PROCESSED-CNT     PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00225      05  WRK-RPTS-DUE-CNT      PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00226      05  WRK-RPTS-RCVD-CNT     PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00227      05  WRK-CR-DB-CNT         PIC S9(07)  COMP-3 VALUE +0.       DTSBX201
00228      05  WRK-RCVD-DATE         PIC S9(09)  COMP-3 VALUE +0.       DTSBX201
00229                                                                   DTSBX201
00230      05  WRK-PERCENT-COMPLETE  PIC S9(03)V999  COMP-3.            DTSBX201
00231                                                                   DTSBX201
00232      05  WRK-EMP-NO                  PIC  9(06).                  DTSBX201
00233      05  AMT-DISP                   PIC --------9.99.             DTSBX201
00234                                                                   DTSBX201
00235      05  WRK-TRACE-IND               PIC  X(01).                  DTSBX201
00236                                                                   DTSBX201
00237  01  L001-LINK-AREA.                                              DTSBX201
00238  ++INCLUDE DTSIL001                                               DTSBX201
00239                                                                   DTSBX201
00240  01  L004-LINK-AREA.                                              DTSBX201
00241  ++INCLUDE DTSIL004                                               DTSBX201
00242                                                                   DTSBX201
00243  01  L516-LINK-AREA.                                              DTSBX201
00244  ++INCLUDE DTSIL516                                               DTSBX201
00245                                                                   DTSBX201
00246  01  L923-LINK-AREA.                                              DTSBX201
00247  ++INCLUDE DTSIL923                                               DTSBX201
00248      EJECT                                                        DTSBX201
00249  01  ASKL-REC.                                                    DTSBX201
00250  ++INCLUDE DTSIASKL                                               DTSBX201
00251      EJECT                                                        DTSBX201
00252  01  AHDR-REC.                                                    DTSBX201
00253  ++INCLUDE DTSIAHDR                                               DTSBX201
00254      EJECT                                                        DTSBX201
00255  01  AADJ-REC.                                                    DTSBX201
00256  ++INCLUDE DTSIAADJ                                               DTSBX201
00257      EJECT                                                        DTSBX201
00258  01  APAY-REC.                                                    DTSBX201
00259  ++INCLUDE DTSIAPAY                                               DTSBX201
00260      EJECT                                                        DTSBX201
00261  01  ARPT-REC.                                                    DTSBX201
00262  ++INCLUDE DTSIARPT                                               DTSBX201
00263      EJECT                                                        DTSBX201
00264  01  AATX-REC.                                                    DTSBX201
00265  ++INCLUDE DTSIAATX                                               DTSBX201
00266      EJECT                                                        DTSBX201
00267  01  L910-LINK-AREA.                                              DTSBX201
00268  ++INCLUDE DTSIL910                                               DTSBX201
00269      EJECT                                                        DTSBX201
00270  01  MSKL-REC.                                                    DTSBX201
00271  ++INCLUDE DTSIMSKL                                               DTSBX201
00272      EJECT                                                        DTSBX201
00273  01  MHDR-REC.                                                    DTSBX201
00274  ++INCLUDE DTSIMHDR                                               DTSBX201
00275      EJECT                                                        DTSBX201
00276  01  MPRF-REC.                                                    DTSBX201
00277  ++INCLUDE DTSIMPRF                                               DTSBX201
00278                                                                   DTSBX201
00279  01  MQTR-REC.                                                    DTSBX201
00280  ++INCLUDE DTSIMQTR                                               DTSBX201
00281                                                                   DTSBX201
00282  01  MRTE-REC.                                                    DTSBX201
00283  ++INCLUDE DTSIMRTE                                               DTSBX201
00284                                                                   DTSBX201
00285  01  L931-LINK-AREA.                                              DTSBX201
00286  ++INCLUDE DTSIL931                                               DTSBX201
00287      EJECT                                                        DTSBX201
00288  01  FSKL-REC.                                                    DTSBX201
00289  ++INCLUDE DTSIFSKL                                               DTSBX201
00290                                                                   DTSBX201
00291  PROCEDURE DIVISION.                                              DTSBX201
00292      SKIP2                                                        DTSBX201
00293      PERFORM I0000-INITIATE THRU I0000-EXIT.                      DTSBX201
00294                                                                   DTSBX201
00295      IF WRK-ERROR-NO-88                                           DTSBX201
00296         PERFORM P0000-PROCESS THRU P0000-EXIT                     DTSBX201
00297         PERFORM T0000-TERMINATE THRU T0000-EXIT                   DTSBX201
00298      END-IF.                                                      DTSBX201
00299                                                                   DTSBX201
00300      GOBACK.                                                      DTSBX201
00301      EJECT                                                        DTSBX201
00302  I0000-INITIATE.                                                  DTSBX201
00303      SET WRK-ERROR-NO-88   TO TRUE.                               DTSBX201
00304      MOVE 'N' TO WRK-TRACE-IND.                                   DTSBX201
00305                                                                   DTSBX201
00306                                                                   DTSBX201
00307      PERFORM I2000-OPEN-FILES-1        THRU I2000-EXIT.           DTSBX201
00308                                                                   DTSBX201
00309      PERFORM I3000-READ-MHDR           THRU I3000-EXIT.           DTSBX201
00310                                                                   DTSBX201
00311      SKIP2                                                        DTSBX201
00312  I0000-EXIT.                                                      DTSBX201
00313      EXIT.                                                        DTSBX201
00314  I2000-OPEN-FILES-1.                                              DTSBX201
00315      MOVE WRK-TRACE-IND TO L923-TRACE-IND.                        DTSBX201
00316                                                                   DTSBX201
00317      MOVE WRK-MOD-NAME TO L923-MOD-NAME.                          DTSBX201
00318                                                                   DTSBX201
00319      PERFORM S910-OPEN-READ          THRU S910-EXIT.              DTSBX201
00320      PERFORM S923-OPEN-READ          THRU S923-EXIT.              DTSBX201
00321      PERFORM S931-OPEN-READ          THRU S931-EXIT.              DTSBX201
00322                                                                   DTSBX201
00323      OPEN OUTPUT BX331A1-SUMMARY.                                 DTSBX201
00324      IF NOT BX331A1-STATUS-OK-88                                  DTSBX201
00325         DISPLAY 'CANNOT OPEN X331A1 SUM FILE ' BX331A1-STATUS     DTSBX201
00326         SET WRK-ERROR-YES-88 TO TRUE                              DTSBX201
00327         GO TO I2000-EXIT.                                         DTSBX201
00328                                                                   DTSBX201
00329      OPEN OUTPUT BX331C-TRAN.                                     DTSBX201
00330      IF NOT BX331C-STATUS-OK-88                                   DTSBX201
00331         DISPLAY 'CANNOT OPEN BX331C TRN FILE ' BX331C-STATUS      DTSBX201
00332         SET WRK-ERROR-YES-88 TO TRUE                              DTSBX201
00333         GO TO I2000-EXIT.                                         DTSBX201
00334                                                                   DTSBX201
00335      OPEN OUTPUT HEADER-FILE.                                     DTSBX201
00336      IF NOT HEADER-STATUS-OK-88                                   DTSBX201
00337         DISPLAY 'CANNOT OPEN HEADER FILE     ' HEADER-STATUS      DTSBX201
00338         SET WRK-ERROR-YES-88 TO TRUE                              DTSBX201
00339         GO TO I2000-EXIT.                                         DTSBX201
00340                                                                   DTSBX201
00341  I2000-EXIT.                                                      DTSBX201
00342      EXIT.                                                        DTSBX201
00343                                                                   DTSBX201
00344  I3000-READ-MHDR.                                                 DTSBX201
00345      MOVE LOW-VALUES              TO MSKL-REC.                    DTSBX201
00346      MOVE +0                      TO MSKL-EMP-NO.                 DTSBX201
00347      SET MSKL-HDR-88              TO TRUE.                        DTSBX201
00348                                                                   DTSBX201
00349      PERFORM S910-READ            THRU S910-EXIT.                 DTSBX201
00350      IF L910-NO-REC-88                                            DTSBX201
00351         DISPLAY 'DTSBX340: MHDR RECORD IS MISSING'                DTSBX201
00352         SET WRK-ERROR-YES-88        TO TRUE                       DTSBX201
00353         GO TO I3000-EXIT                                          DTSBX201
00354      ELSE                                                         DTSBX201
00355         MOVE MSKL-REC             TO MHDR-REC                     DTSBX201
00356         PERFORM I3100-DATES       THRU I3100-EXIT                 DTSBX201
00357      END-IF.                                                      DTSBX201
00358                                                                   DTSBX201
00359  I3000-EXIT.                                                      DTSBX201
00360      EXIT.                                                        DTSBX201
00361                                                                   DTSBX201
00362  I3100-DATES.                                                     DTSBX201
00363      MOVE MHDR-LAST-UC30-MASS-MAIL-YRQ                            DTSBX201
00364                                     TO WRK-YRQ.                   DTSBX201
00365      MOVE MHDR-PRIOR-RUN-DATE       TO WRK-PRIOR-RUN-DT           DTSBX201
00366                                        L004-DATE.                 DTSBX201
00367      PERFORM S004-FROM-DATE         THRU S004-EXIT.               DTSBX201
00368      SUBTRACT 1                     FROM L004-QTR-5-YR.           DTSBX201
00369      MOVE 1                         TO L004-QTR-5-Q.              DTSBX201
00370      MOVE L004-QTR-5-9              TO WRK-ANN-YRQ.               DTSBX201
00371                                                                   DTSBX201
00372      DISPLAY 'WRK-YRQ ' WRK-YRQ '  ANN YRQ ' WRK-ANN-YRQ.         DTSBX201
00373      DISPLAY SPACE.                                               DTSBX201
00374  I3100-EXIT.                                                      DTSBX201
00375      EXIT.                                                        DTSBX201
00376                                                                   DTSBX201
00377  P0000-PROCESS.                                                   DTSBX201
00378                                                                   DTSBX201
00379      MOVE +0 TO WRK-BX331A-CNT.                                   DTSBX201
00380      MOVE ZERO      TO ASKL-BATCH-NO                              DTSBX201
00381                        ASKL-ITEM-NO.                              DTSBX201
00382                                                                   DTSBX201
00383      DISPLAY 'UNPROCESSED TRANSACTIONS           '.               DTSBX201
00384      DISPLAY SPACE.                                               DTSBX201
00385                                                                   DTSBX201
00386      PERFORM S923-START-BROWSE       THRU S923-EXIT.              DTSBX201
00387      IF L923-NO-REC-88                                            DTSBX201
00388         DISPLAY 'NO RECORDS FOUND ON FIRST READ'                  DTSBX201
00389      ELSE                                                         DTSBX201
00390         PERFORM UNTIL L923-NO-REC-88                              DTSBX201
00391            PERFORM P1000-READ-ATC    THRU P1000-EXIT              DTSBX201
00392            PERFORM S923-READ-NEXT    THRU S923-EXIT               DTSBX201
00393      END-PERFORM.                                                 DTSBX201
00394                                                                   DTSBX201
00395      IF WRK-BX331C-CNT = 0                                        DTSBX201
00396         PERFORM P2000-DUMMY-REC      THRU P2000-EXIT              DTSBX201
00397      END-IF.                                                      DTSBX201
00398                                                                   DTSBX201
00399  P0000-EXIT.                                                      DTSBX201
00400      EXIT.                                                        DTSBX201
00401                                                                   DTSBX201
00402  P1000-READ-ATC.                                                  DTSBX201
00403      IF ASKL-BATCH-NO = 43018 OR 48259                            DTSBX201
00404         DISPLAY '0 ' ASKL-BATCH-NO '  ' ASKL-ITEM-NO              DTSBX201
00405         '  ' ASKL-REC-TYPE                                        DTSBX201
00406      END-IF.                                                      DTSBX201
00407      EVALUATE TRUE                                                DTSBX201
00408        WHEN ASKL-RPT-88                                           DTSBX201
00409          PERFORM P1100-CHK-RPT-ERRORS   THRU P1100-EXIT           DTSBX201
00410                                                                   DTSBX201
00411        WHEN ASKL-ATX-88                                           DTSBX201
00412          PERFORM P1200-CHK-ATX-ERRORS   THRU P1200-EXIT           DTSBX201
00413                                                                   DTSBX201
00414        WHEN ASKL-PAY-88                                           DTSBX201
00415          PERFORM P1300-CHK-PAY-ERRORS   THRU P1300-EXIT           DTSBX201
00416                                                                   DTSBX201
00417        WHEN ASKL-HDR-88                                           DTSBX201
00418          PERFORM P1010-HEADER           THRU P1010-EXIT           DTSBX201
00419                                                                   DTSBX201
00420      END-EVALUATE.                                                DTSBX201
00421                                                                   DTSBX201
00422  P1000-EXIT.                                                      DTSBX201
00423      EXIT.                                                        DTSBX201
00424                                                                   DTSBX201
00425  P1010-HEADER.                                                    DTSBX201
00426      MOVE ASKL-REC TO AHDR-REC.                                   DTSBX201
00427      MOVE AHDR-RECEIVED-DATE     TO WRK-RCVD-DATE.                DTSBX201
00428                                                                   DTSBX201
00429      MOVE AHDR-BATCH-NO            TO WRK-HDR-BATCH-NO.           DTSBX201
00430      MOVE WRK-PRIOR-RUN-DT         TO L001-FED-8-DATE-9.          DTSBX201
00431      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX201
00432      MOVE L001-SLASH-8-DATE        TO WRK-RUN-DATE.               DTSBX201
00433      MOVE AHDR-BATCH-BALANCED-IND  TO WRK-BALANCED-IND.           DTSBX201
00434      MOVE AHDR-BATCH-HELD-IND      TO WRK-HELD-IND.               DTSBX201
00435      MOVE AHDR-ESTB-DATE           TO L001-FED-8-DATE-9.          DTSBX201
00436      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX201
00437      MOVE L001-SLASH-8-DATE        TO WRK-ESTB-DATE.              DTSBX201
00438      MOVE AHDR-ESTB-OP-ID          TO WRK-ESTB-OPID.              DTSBX201
00439      MOVE AHDR-CHNG-DATE           TO L001-FED-8-DATE-9.          DTSBX201
00440      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX201
00441      IF L001-VALID-DATE                                           DTSBX201
00442         MOVE L001-SLASH-8-DATE     TO WRK-CHNG-DATE               DTSBX201
00443      ELSE                                                         DTSBX201
00444         MOVE SPACES                TO WRK-CHNG-DATE               DTSBX201
00445      END-IF.                                                      DTSBX201
00446      MOVE AHDR-CHNG-OP-ID          TO WRK-CHNG-OPID.              DTSBX201
00447      MOVE AHDR-DEPOSIT-DATE        TO L001-FED-8-DATE-9.          DTSBX201
00448      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX201
00449      MOVE L001-SLASH-8-DATE        TO WRK-DEPOSIT-DATE.           DTSBX201
00450      MOVE AHDR-RECEIVED-DATE       TO L001-FED-8-DATE-9.          DTSBX201
00451      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBX201
00452      MOVE L001-SLASH-8-DATE        TO WRK-BATCH-RCVD-DATE.        DTSBX201
00453      MOVE AHDR-CONTROL-TRAN-CNT    TO WRK-CNTL-TRAN-CNT.          DTSBX201
00454      MOVE AHDR-PROC-TRAN-CNT       TO WRK-PROCESSED-TRN-CNT.      DTSBX201
00455      MOVE AHDR-ATC-FILE-TRAN-CNT   TO WRK-ATC-CNT.                DTSBX201
00456      MOVE AHDR-CONTROL-REMIT-AMT   TO WRK-CNTL-REMIT-AMT.         DTSBX201
00457      MOVE AHDR-PROC-REMIT-AMT      TO WRK-PROCESSED-AMT.          DTSBX201
00458      MOVE AHDR-ATC-FILE-REMIT-AMT  TO WRK-ATC-AMOUNT.             DTSBX201
00459      IF AHDR-ANNUAL-BATCH-YES-88                                  DTSBX201
00460         MOVE 'Y'                   TO WRK-ANN-BATCH-IND           DTSBX201
00461      ELSE                                                         DTSBX201
00462         MOVE 'N'                   TO WRK-ANN-BATCH-IND           DTSBX201
00463      END-IF.                                                      DTSBX201
00464      MOVE AHDR-BANK-BATCH-NO       TO WRK-BANK-BATCH-NO.          DTSBX201
00465                                                                   DTSBX201
00466      WRITE HEADER-REC              FROM WRK-HDR-REC.              DTSBX201
00467                                                                   DTSBX201
00468  P1010-EXIT.                                                      DTSBX201
00469      EXIT.                                                        DTSBX201
00470                                                                   DTSBX201
00471  P1100-CHK-RPT-ERRORS.                                            DTSBX201
00472      SET WRK-EMP-FOUND-NO-88      TO TRUE.                        DTSBX201
00473                                                                   DTSBX201
00474      MOVE ASKL-REC TO ARPT-REC.                                   DTSBX201
00475                                                                   DTSBX201
00476      IF ARPT-BATCH-NO = 77130                                     DTSBX201
00477         DISPLAY '1 ' ARPT-BATCH-NO '  ' ARPT-ITEM-NO              DTSBX201
00478         '  ' ARPT-STATUS-CHNG-IND                                 DTSBX201
00479         '  ' ARPT-PROCESSED-DATE                                  DTSBX201
00480      END-IF.                                                      DTSBX201
00481 *************************************************************     DTSBX201
00482 * CHANGED TO INCLUDE ALL QUARTERS - DO NOT LIMIT SEARCH TO        DTSBX201
00483 * WRK-YRQ.                             07/26/2010   GD            DTSBX201
00484 *************************************************************     DTSBX201
00485 **   IF (ARPT-ORIG-88                                             DTSBX201
00486 **   OR ARPT-SUPPLEM-88)                                          DTSBX201
00487 ***  AND ARPT-YRQ = WRK-YRQ                                       DTSBX201
00488      IF ARPT-NOT-PROCESSED-88                                     DTSBX201
00489         NEXT SENTENCE                                             DTSBX201
00490      ELSE                                                         DTSBX201
00491         GO TO P1100-EXIT                                          DTSBX201
00492      END-IF.                                                      DTSBX201
00493                                                                   DTSBX201
00494      IF ARPT-BATCH-NO = 77130                                     DTSBX201
00495         DISPLAY '2 ' ARPT-BATCH-NO '  ' ARPT-ITEM-NO              DTSBX201
00496         '  ' ARPT-STATUS-CHNG-IND                                 DTSBX201
00497         '  ' ARPT-PROCESSED-DATE                                  DTSBX201
00498      END-IF.                                                      DTSBX201
00499                                                                   DTSBX201
00500      IF ARPT-STATUS-CHNG-YES-88                                   DTSBX201
00501         MOVE 'STATUS CHANGE'            TO WRK-BX331A-MESSAGE     DTSBX201
00502         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00503      END-IF.                                                      DTSBX201
00504                                                                   DTSBX201
00505      ADD ARPT-REMIT-AMT                 TO WRK-TOT-REMIT.         DTSBX201
00506                                                                   DTSBX201
00507      IF ARPT-EMP-NO-NO-ENTRY-88                                   DTSBX201
00508         MOVE SPACES                     TO WRK-BX331A-EMP-NO-X    DTSBX201
00509         MOVE 'NO EMP NUMBER'            TO WRK-BX331A-MESSAGE     DTSBX201
00510         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00511         GO TO P1100-EXIT                                          DTSBX201
00512      END-IF.                                                      DTSBX201
00513                                                                   DTSBX201
00514      MOVE LOW-VALUES           TO MSKL-KEY-AREA                   DTSBX201
00515      MOVE ARPT-EMP-NO          TO MSKL-EMP-NO                     DTSBX201
00516      SET MSKL-PRF-88           TO TRUE                            DTSBX201
00517      PERFORM S910-READ         THRU S910-EXIT                     DTSBX201
00518      IF L910-OK-88                                                DTSBX201
00519         MOVE MSKL-REC          TO MPRF-REC                        DTSBX201
00520         SET WRK-EMP-FOUND-YES-88     TO TRUE                      DTSBX201
00521         PERFORM P1110-EMP-FOUND THRU P1110-EXIT                   DTSBX201
00522      ELSE                                                         DTSBX201
00523 *       DISPLAY 'NOT FOUND  ' ARPT-EMP-NO                         DTSBX201
00524 *          '  ' ARPT-BATCH-NO                                     DTSBX201
00525 *          '  ' ARPT-ITEM-NO                                      DTSBX201
00526 *       MOVE 'EMP NOT ON FILE'       TO WRK-BX331A-MESSAGE        DTSBX201
00527         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00528      END-IF.                                                      DTSBX201
00529                                                                   DTSBX201
00530  P1100-EXIT.                                                      DTSBX201
00531      EXIT.                                                        DTSBX201
00532                                                                   DTSBX201
00533  P1110-EMP-FOUND.                                                 DTSBX201
00534      IF ARPT-TOT-WAGE-NO-ENTRY-88                                 DTSBX201
00535         NEXT SENTENCE                                             DTSBX201
00536      ELSE                                                         DTSBX201
00537         IF MPRF-CLASS-RATED-88                                    DTSBX201
00538            COMPUTE WRK-TAX-WAGE =                                 DTSBX201
00539               (ARPT-TOT-WAGE - ARPT-EXCESS-WAGE)                  DTSBX201
00540            COMPUTE WRK-DIFF = WRK-TAX-WAGE - ARPT-TAX-WAGE        DTSBX201
00541            IF WRK-DIFF > +1 OR WRK-DIFF < -1                      DTSBX201
00542               MOVE 'ARITHMETIC   '         TO WRK-BX331A-MESSAGE  DTSBX201
00543               PERFORM P1120-WRITE          THRU P1120-EXIT        DTSBX201
00544               GO TO P1110-EXIT                                    DTSBX201
00545            END-IF                                                 DTSBX201
00546         END-IF                                                    DTSBX201
00547      END-IF.                                                      DTSBX201
00548                                                                   DTSBX201
00549      IF ARPT-NAME-CHECK NOT = MPRF-PRIMARY-NAME (1:4)             DTSBX201
00550 *       DISPLAY 'NAME CHECK ' ARPT-EMP-NO                         DTSBX201
00551 *          '  ' ARPT-BATCH-NO                                     DTSBX201
00552 *          '  ' ARPT-ITEM-NO                                      DTSBX201
00553         MOVE 'NAME CHECK   '            TO WRK-BX331A-MESSAGE     DTSBX201
00554         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00555         GO TO P1110-EXIT                                          DTSBX201
00556      END-IF.                                                      DTSBX201
00557                                                                   DTSBX201
00558      IF ARPT-YRQ-NO-ENTRY-88                                      DTSBX201
00559 *       DISPLAY 'NO QUARTER ' ARPT-EMP-NO                         DTSBX201
00560 *          '  ' ARPT-BATCH-NO                                     DTSBX201
00561 *          '  ' ARPT-ITEM-NO                                      DTSBX201
00562         MOVE 'NO QUARTER   '         TO WRK-BX331A-MESSAGE        DTSBX201
00563         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00564         GO TO P1110-EXIT                                          DTSBX201
00565      END-IF.                                                      DTSBX201
00566                                                                   DTSBX201
00567      MOVE ARPT-YRQ          TO L516-YRQ                           DTSBX201
00568      PERFORM S516-LIABILITY THRU S516-EXIT                        DTSBX201
00569      IF L516-NOT-LIABLE-88                                        DTSBX201
00570 *       DISPLAY 'NOT LIABLE ' ARPT-EMP-NO                         DTSBX201
00571 *          '  ' ARPT-BATCH-NO                                     DTSBX201
00572 *          '  ' ARPT-ITEM-NO                                      DTSBX201
00573         MOVE 'NOT LIABLE   '     TO WRK-BX331A-MESSAGE            DTSBX201
00574         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00575         GO TO P1110-EXIT                                          DTSBX201
00576      END-IF.                                                      DTSBX201
00577                                                                   DTSBX201
00578      IF L516-NO-RATE-88                                           DTSBX201
00579         MOVE 'MISSING RATE '     TO WRK-BX331A-MESSAGE            DTSBX201
00580         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00581         GO TO P1110-EXIT                                          DTSBX201
00582      END-IF.                                                      DTSBX201
00583                                                                   DTSBX201
00584      IF L516-ANN-SCHED-88                                         DTSBX201
00585         MOVE 'QTRLY REPORT FOR ANNUAL FILER'                      DTSBX201
00586                                         TO WRK-BX331A-MESSAGE     DTSBX201
00587         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00588         GO TO P1110-EXIT                                          DTSBX201
00589      END-IF.                                                      DTSBX201
00590                                                                   DTSBX201
00591      IF ARPT-TAX-WAGE = ZERO                                      DTSBX201
00592      AND ARPT-REMIT-AMT > ZERO                                    DTSBX201
00593         MOVE 'REMITTANCE BUT NO TAXABLE WAGES'                    DTSBX201
00594                                         TO WRK-BX331A-MESSAGE     DTSBX201
00595         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00596         GO TO P1110-EXIT                                          DTSBX201
00597      END-IF.                                                      DTSBX201
00598                                                                   DTSBX201
00599 *************************************************************     DTSBX201
00600 * CHANGED TO INCLUDE ALL QUARTERS - USE ARPT-YRQ INSTEAD OF       DTSBX201
00601 * WRK-YRQ.                             07/26/2010   GD            DTSBX201
00602 *************************************************************     DTSBX201
00603      MOVE LOW-VALUES           TO MQTR-KEY-AREA                   DTSBX201
00604      MOVE ARPT-EMP-NO          TO MQTR-EMP-NO                     DTSBX201
00605      MOVE ARPT-YRQ             TO MQTR-YRQ.                       DTSBX201
00606      SET MQTR-QTR-88           TO TRUE                            DTSBX201
00607      MOVE MQTR-KEY-AREA        TO MSKL-KEY-AREA.                  DTSBX201
00608      PERFORM S910-READ         THRU S910-EXIT                     DTSBX201
00609      IF L910-OK-88                                                DTSBX201
00610         MOVE MSKL-REC          TO MQTR-REC                        DTSBX201
00611         IF MQTR-CURR-RCVD-88                                      DTSBX201
00612 *          DISPLAY 'RPT ON FILE  ' ARPT-EMP-NO                    DTSBX201
00613 *             '  ' ARPT-BATCH-NO                                  DTSBX201
00614 *             '  ' ARPT-ITEM-NO                                   DTSBX201
00615            MOVE 'RPT ON FILE  '     TO WRK-BX331A-MESSAGE         DTSBX201
00616            PERFORM P1120-WRITE             THRU P1120-EXIT        DTSBX201
00617            GO TO P1110-EXIT                                       DTSBX201
00618         END-IF                                                    DTSBX201
00619      END-IF.                                                      DTSBX201
00620                                                                   DTSBX201
00621      IF ARPT-NOT-PROCESSED-88                                     DTSBX201
00622         MOVE 'ERROR (NO DESCRIPTION)'   TO WRK-BX331A-MESSAGE     DTSBX201
00623         PERFORM P1120-WRITE             THRU P1120-EXIT           DTSBX201
00624      END-IF.                                                      DTSBX201
00625                                                                   DTSBX201
00626  P1110-EXIT.                                                      DTSBX201
00627      EXIT.                                                        DTSBX201
00628                                                                   DTSBX201
00629  P1120-WRITE.                                                     DTSBX201
00630      IF ARPT-BATCH-NO = 77130                                     DTSBX201
00631         DISPLAY '3 ' ARPT-BATCH-NO '  ' ARPT-ITEM-NO              DTSBX201
00632         '  ' ARPT-STATUS-CHNG-IND                                 DTSBX201
00633         '  ' ARPT-PROCESSED-DATE                                  DTSBX201
00634      END-IF.                                                      DTSBX201
00635                                                                   DTSBX201
00636      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00637         SET WRK-BX331A-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00638      ELSE                                                         DTSBX201
00639         SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00640      END-IF.                                                      DTSBX201
00641      PERFORM P1121-REC1           THRU P1121-EXIT.                DTSBX201
00642      PERFORM P1122-REC3           THRU P1122-EXIT.                DTSBX201
00643                                                                   DTSBX201
00644  P1120-EXIT.                                                      DTSBX201
00645      EXIT.                                                        DTSBX201
00646                                                                   DTSBX201
00647  P1121-REC1.                                                      DTSBX201
00648      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
00649      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00650      MOVE L001-SLASH-8-DATE    TO WRK-BX331A-PROCESS-DT.          DTSBX201
00651      IF ARPT-EMP-NO-NO-ENTRY-88                                   DTSBX201
00652         MOVE SPACES               TO WRK-BX331A-EMP-NO-X          DTSBX201
00653      ELSE                                                         DTSBX201
00654         MOVE ARPT-EMP-NO          TO WRK-BX331A-EMP-NO            DTSBX201
00655      END-IF.                                                      DTSBX201
00656      MOVE ARPT-BATCH-NO           TO WRK-BX331A-BATCH.            DTSBX201
00657      MOVE ARPT-ITEM-NO            TO WRK-BX331A-ITEM.             DTSBX201
00658      MOVE ARPT-RPT-TYPE           TO WRK-BX331A-TRAN.             DTSBX201
00659      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00660         SET WRK-BX331A-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00661      ELSE                                                         DTSBX201
00662         SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00663      END-IF.                                                      DTSBX201
00664                                                                   DTSBX201
00665      WRITE BX331A1-REC            FROM WRK-BX331A-REC.            DTSBX201
00666      ADD  +1 TO WRK-BX331A-CNT.                                   DTSBX201
00667                                                                   DTSBX201
00668  P1121-EXIT.                                                      DTSBX201
00669      EXIT.                                                        DTSBX201
00670                                                                   DTSBX201
00671  P1122-REC3.                                                      DTSBX201
00672 ***  SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE.                      DTSBX201
00673      MOVE ARPT-BATCH-NO           TO WRK-BX331C-BATCH-NO.         DTSBX201
00674      MOVE ARPT-ITEM-NO            TO WRK-BX331C-ITEM-NO.          DTSBX201
00675      MOVE ARPT-RPT-TYPE           TO WRK-BX331C-TRAN.             DTSBX201
00676      IF ARPT-EMP-NO-NO-ENTRY-88                                   DTSBX201
00677         MOVE SPACES               TO WRK-BX331C-EMP-NO-X          DTSBX201
00678      ELSE                                                         DTSBX201
00679         MOVE ARPT-EMP-NO          TO WRK-BX331C-EMP-NO            DTSBX201
00680      END-IF.                                                      DTSBX201
00681      IF ARPT-YRQ-NO-ENTRY-88                                      DTSBX201
00682         MOVE SPACES               TO WRK-BX331C-QTR               DTSBX201
00683      ELSE                                                         DTSBX201
00684         MOVE ARPT-YRQ             TO L004-QTR-5-9                 DTSBX201
00685         PERFORM S004-FROM-5       THRU S004-EXIT                  DTSBX201
00686         MOVE L004-SLASH-5-QTR     TO WRK-BX331C-QTR               DTSBX201
00687      END-IF.                                                      DTSBX201
00688      MOVE ARPT-REMIT-AMT          TO WRK-BX331C-REMIT.            DTSBX201
00689      IF ARPT-TOT-WAGE-NO-ENTRY-88                                 DTSBX201
00690         MOVE ZERO                 TO WRK-BX331C-TOT-WAGE          DTSBX201
00691      ELSE                                                         DTSBX201
00692         MOVE ARPT-TOT-WAGE        TO WRK-BX331C-TOT-WAGE          DTSBX201
00693      END-IF.                                                      DTSBX201
00694      IF ARPT-TAX-WAGE-NO-ENTRY-88                                 DTSBX201
00695         MOVE ZERO                 TO WRK-BX331C-TAX-WAGE          DTSBX201
00696      ELSE                                                         DTSBX201
00697         MOVE ARPT-TAX-WAGE        TO WRK-BX331C-TAX-WAGE          DTSBX201
00698      END-IF.                                                      DTSBX201
00699      IF ARPT-EXCESS-WAGE-NO-ENTRY-88                              DTSBX201
00700         MOVE ZERO                 TO WRK-BX331C-EXCESS-WAGE       DTSBX201
00701      ELSE                                                         DTSBX201
00702         MOVE ARPT-EXCESS-WAGE     TO WRK-BX331C-EXCESS-WAGE       DTSBX201
00703      END-IF.                                                      DTSBX201
00704                                                                   DTSBX201
00705      MOVE LOW-VALUES              TO MRTE-KEY-AREA                DTSBX201
00706      MOVE ARPT-EMP-NO             TO MRTE-EMP-NO                  DTSBX201
00707      MOVE WRK-YRQ                 TO L004-QTR-5-9.                DTSBX201
00708      MOVE 1                       TO L004-QTR-5-YR.               DTSBX201
00709      MOVE L004-QTR-5-9            TO MRTE-EFF-YRQ.                DTSBX201
00710      SET MRTE-RTE-88              TO TRUE                         DTSBX201
00711      MOVE MRTE-KEY-AREA           TO MSKL-KEY-AREA.               DTSBX201
00712      PERFORM S910-READ            THRU S910-EXIT                  DTSBX201
00713      IF L910-OK-88                                                DTSBX201
00714         MOVE MSKL-REC             TO MRTE-REC                     DTSBX201
00715         MOVE MRTE-UI-RATE         TO WRK-BX331C-RATE              DTSBX201
00716      ELSE                                                         DTSBX201
00717         MOVE SPACES               TO WRK-BX331C-RATE-X            DTSBX201
00718      END-IF.                                                      DTSBX201
00719                                                                   DTSBX201
00720      MOVE SPACES                  TO WRK-BX331C-ACCT.             DTSBX201
00721      MOVE 'R'                     TO WRK-BX331C-CATEGORY.         DTSBX201
00722                                                                   DTSBX201
00723      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00724         SET WRK-BX331C-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00725      ELSE                                                         DTSBX201
00726         SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00727      END-IF.                                                      DTSBX201
00728      IF ARPT-RECEIVED-DATE = ZEROS                                DTSBX201
00729         MOVE WRK-RCVD-DATE        TO ARPT-RECEIVED-DATE           DTSBX201
00730      END-IF.                                                      DTSBX201
00731                                                                   DTSBX201
00732      MOVE ARPT-RECEIVED-DATE      TO L001-FED-8-DATE-9.           DTSBX201
00733      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00734      MOVE L001-SLASH-8-DATE       TO WRK-BX331C-RCVD-DT.          DTSBX201
00735                                                                   DTSBX201
00736      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
00737      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00738      MOVE L001-SLASH-8-DATE    TO WRK-BX331C-PROCESS-DT.          DTSBX201
00739                                                                   DTSBX201
00740      WRITE BX331C-REC             FROM WRK-BX331C-REC.            DTSBX201
00741      ADD  +1                      TO WRK-BX331C-CNT.              DTSBX201
00742                                                                   DTSBX201
00743  P1122-EXIT.                                                      DTSBX201
00744      EXIT.                                                        DTSBX201
00745                                                                   DTSBX201
00746  P1200-CHK-ATX-ERRORS.                                            DTSBX201
00747      SET WRK-EMP-FOUND-NO-88      TO TRUE.                        DTSBX201
00748                                                                   DTSBX201
00749      MOVE ASKL-REC TO AATX-REC.                                   DTSBX201
00750                                                                   DTSBX201
00751 **   IF (AATX-ORIG-88                                             DTSBX201
00752 **   OR AATX-SUPPLEM-88)                                          DTSBX201
00753 **   AND AATX-YRQ = WRK-ANN-YRQ                                   DTSBX201
00754      IF AATX-NOT-PROCESSED-88                                     DTSBX201
00755         NEXT SENTENCE                                             DTSBX201
00756      ELSE                                                         DTSBX201
00757         GO TO P1200-EXIT                                          DTSBX201
00758      END-IF.                                                      DTSBX201
00759                                                                   DTSBX201
00760      IF AATX-STATUS-CHANGE-YES-88                                 DTSBX201
00761         MOVE 'STATUS CHANGE'            TO WRK-BX331A-MESSAGE     DTSBX201
00762         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00763      END-IF.                                                      DTSBX201
00764                                                                   DTSBX201
00765      ADD AATX-REMIT-AMT                 TO WRK-TOT-REMIT.         DTSBX201
00766                                                                   DTSBX201
00767      IF AATX-EMP-NO-NO-ENTRY-88                                   DTSBX201
00768         MOVE SPACES                     TO WRK-BX331A-EMP-NO-X    DTSBX201
00769         MOVE 'NO EMP NUMBER'            TO WRK-BX331A-MESSAGE     DTSBX201
00770         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00771         GO TO P1200-EXIT                                          DTSBX201
00772      END-IF.                                                      DTSBX201
00773                                                                   DTSBX201
00774      MOVE LOW-VALUES           TO MSKL-KEY-AREA                   DTSBX201
00775      MOVE AATX-EMP-NO          TO MSKL-EMP-NO                     DTSBX201
00776      SET MSKL-PRF-88           TO TRUE                            DTSBX201
00777      PERFORM S910-READ         THRU S910-EXIT                     DTSBX201
00778      IF L910-OK-88                                                DTSBX201
00779         MOVE MSKL-REC          TO MPRF-REC                        DTSBX201
00780         SET WRK-EMP-FOUND-YES-88     TO TRUE                      DTSBX201
00781         PERFORM P1210-EMP-FOUND THRU P1210-EXIT                   DTSBX201
00782      ELSE                                                         DTSBX201
00783 *       DISPLAY 'NOT FOUND  ' AATX-EMP-NO                         DTSBX201
00784 *          '  ' AATX-BATCH-NO                                     DTSBX201
00785 *          '  ' AATX-ITEM-NO                                      DTSBX201
00786 *       MOVE 'EMP NOT ON FILE'       TO WRK-BX331A-MESSAGE        DTSBX201
00787         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00788      END-IF.                                                      DTSBX201
00789                                                                   DTSBX201
00790  P1200-EXIT.                                                      DTSBX201
00791      EXIT.                                                        DTSBX201
00792                                                                   DTSBX201
00793  P1210-EMP-FOUND.                                                 DTSBX201
00794      IF AATX-TOT-WAGE-NO-ENTRY-88                                 DTSBX201
00795         NEXT SENTENCE                                             DTSBX201
00796      ELSE                                                         DTSBX201
00797         IF MPRF-CLASS-RATED-88                                    DTSBX201
00798            COMPUTE WRK-TAX-WAGE =                                 DTSBX201
00799               (AATX-TOT-WAGE - AATX-EXCESS-WAGE)                  DTSBX201
00800            COMPUTE WRK-DIFF = WRK-TAX-WAGE - AATX-TAX-WAGE        DTSBX201
00801            IF WRK-DIFF > +1 OR WRK-DIFF < -1                      DTSBX201
00802               MOVE 'ARITHMETIC   '         TO WRK-BX331A-MESSAGE  DTSBX201
00803               PERFORM P1220-WRITE          THRU P1220-EXIT        DTSBX201
00804               GO TO P1210-EXIT                                    DTSBX201
00805            END-IF                                                 DTSBX201
00806         END-IF                                                    DTSBX201
00807      END-IF.                                                      DTSBX201
00808                                                                   DTSBX201
00809      IF AATX-NAME-CHECK NOT = MPRF-PRIMARY-NAME (1:4)             DTSBX201
00810 *       DISPLAY 'NAME CHECK ' AATX-EMP-NO                         DTSBX201
00811 *          '  ' AATX-BATCH-NO                                     DTSBX201
00812 *          '  ' AATX-ITEM-NO                                      DTSBX201
00813         MOVE 'NAME CHECK   '            TO WRK-BX331A-MESSAGE     DTSBX201
00814         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00815         GO TO P1210-EXIT                                          DTSBX201
00816      END-IF.                                                      DTSBX201
00817                                                                   DTSBX201
00818      IF AATX-YRQ-NO-ENTRY-88                                      DTSBX201
00819 *       DISPLAY 'NO QUARTER ' AATX-EMP-NO                         DTSBX201
00820 *          '  ' AATX-BATCH-NO                                     DTSBX201
00821 *          '  ' AATX-ITEM-NO                                      DTSBX201
00822         MOVE 'NO QUARTER   '         TO WRK-BX331A-MESSAGE        DTSBX201
00823         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00824         GO TO P1210-EXIT                                          DTSBX201
00825      END-IF.                                                      DTSBX201
00826                                                                   DTSBX201
00827      MOVE AATX-YRQ          TO L516-YRQ                           DTSBX201
00828      PERFORM S516-LIABILITY THRU S516-EXIT                        DTSBX201
00829      IF L516-NOT-LIABLE-88                                        DTSBX201
00830 *       DISPLAY 'NOT LIABLE ' AATX-EMP-NO                         DTSBX201
00831 *          '  ' AATX-BATCH-NO                                     DTSBX201
00832 *          '  ' AATX-ITEM-NO                                      DTSBX201
00833         MOVE 'NOT LIABLE   '     TO WRK-BX331A-MESSAGE            DTSBX201
00834         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00835         GO TO P1210-EXIT                                          DTSBX201
00836      END-IF.                                                      DTSBX201
00837                                                                   DTSBX201
00838      IF NOT L516-ANN-SCHED-88                                     DTSBX201
00839         MOVE 'ANNUAL REPORT FOR QTRLY FILER'                      DTSBX201
00840                                         TO WRK-BX331A-MESSAGE     DTSBX201
00841         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00842         GO TO P1200-EXIT                                          DTSBX201
00843      END-IF.                                                      DTSBX201
00844                                                                   DTSBX201
00845      IF AATX-TAX-WAGE = ZERO                                      DTSBX201
00846      AND AATX-REMIT-AMT > ZERO                                    DTSBX201
00847         MOVE 'REMITTANCE BUT NO TAXABLE WAGES'                    DTSBX201
00848                                         TO WRK-BX331A-MESSAGE     DTSBX201
00849         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00850         GO TO P1200-EXIT                                          DTSBX201
00851      END-IF.                                                      DTSBX201
00852                                                                   DTSBX201
00853      MOVE LOW-VALUES           TO MQTR-KEY-AREA                   DTSBX201
00854      MOVE AATX-EMP-NO          TO MQTR-EMP-NO                     DTSBX201
00855      MOVE WRK-YRQ              TO MQTR-YRQ.                       DTSBX201
00856      SET MQTR-QTR-88           TO TRUE                            DTSBX201
00857      MOVE MQTR-KEY-AREA        TO MSKL-KEY-AREA.                  DTSBX201
00858      PERFORM S910-READ         THRU S910-EXIT                     DTSBX201
00859      IF L910-OK-88                                                DTSBX201
00860         MOVE MSKL-REC          TO MQTR-REC                        DTSBX201
00861         IF MQTR-CURR-RCVD-88                                      DTSBX201
00862 *          DISPLAY 'ATX ON FILE  ' AATX-EMP-NO                    DTSBX201
00863 *             '  ' AATX-BATCH-NO                                  DTSBX201
00864 *             '  ' AATX-ITEM-NO                                   DTSBX201
00865            MOVE 'ATX ON FILE  '     TO WRK-BX331A-MESSAGE         DTSBX201
00866            PERFORM P1220-WRITE             THRU P1220-EXIT        DTSBX201
00867            GO TO P1210-EXIT                                       DTSBX201
00868         END-IF                                                    DTSBX201
00869      END-IF.                                                      DTSBX201
00870                                                                   DTSBX201
00871      IF AATX-NOT-PROCESSED-88                                     DTSBX201
00872         MOVE 'ERROR (NO DESCRIPTION)'   TO WRK-BX331A-MESSAGE     DTSBX201
00873         PERFORM P1220-WRITE             THRU P1220-EXIT           DTSBX201
00874      END-IF.                                                      DTSBX201
00875                                                                   DTSBX201
00876  P1210-EXIT.                                                      DTSBX201
00877      EXIT.                                                        DTSBX201
00878                                                                   DTSBX201
00879  P1220-WRITE.                                                     DTSBX201
00880      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00881         SET WRK-BX331A-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00882      ELSE                                                         DTSBX201
00883         SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00884      END-IF.                                                      DTSBX201
00885      PERFORM P1221-REC1           THRU P1221-EXIT.                DTSBX201
00886      PERFORM P1222-REC3           THRU P1222-EXIT.                DTSBX201
00887                                                                   DTSBX201
00888  P1220-EXIT.                                                      DTSBX201
00889      EXIT.                                                        DTSBX201
00890                                                                   DTSBX201
00891  P1221-REC1.                                                      DTSBX201
00892      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
00893      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00894      MOVE L001-SLASH-8-DATE    TO WRK-BX331A-PROCESS-DT.          DTSBX201
00895      IF AATX-EMP-NO-NO-ENTRY-88                                   DTSBX201
00896         MOVE SPACES               TO WRK-BX331A-EMP-NO-X          DTSBX201
00897      ELSE                                                         DTSBX201
00898         MOVE AATX-EMP-NO          TO WRK-BX331A-EMP-NO            DTSBX201
00899      END-IF.                                                      DTSBX201
00900      MOVE AATX-BATCH-NO           TO WRK-BX331A-BATCH.            DTSBX201
00901      MOVE AATX-ITEM-NO            TO WRK-BX331A-ITEM.             DTSBX201
00902      MOVE AATX-RPT-TYPE           TO WRK-BX331A-TRAN.             DTSBX201
00903      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00904         SET WRK-BX331A-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00905      ELSE                                                         DTSBX201
00906         SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00907      END-IF.                                                      DTSBX201
00908                                                                   DTSBX201
00909      WRITE BX331A1-REC            FROM WRK-BX331A-REC.            DTSBX201
00910      ADD  +1 TO WRK-BX331A-CNT.                                   DTSBX201
00911                                                                   DTSBX201
00912  P1221-EXIT.                                                      DTSBX201
00913      EXIT.                                                        DTSBX201
00914                                                                   DTSBX201
00915  P1222-REC3.                                                      DTSBX201
00916 ***  SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE.                      DTSBX201
00917      MOVE AATX-BATCH-NO           TO WRK-BX331C-BATCH-NO.         DTSBX201
00918      MOVE AATX-ITEM-NO            TO WRK-BX331C-ITEM-NO.          DTSBX201
00919      MOVE AATX-RPT-TYPE           TO WRK-BX331C-TRAN.             DTSBX201
00920      IF AATX-EMP-NO-NO-ENTRY-88                                   DTSBX201
00921         MOVE SPACES               TO WRK-BX331C-EMP-NO-X          DTSBX201
00922      ELSE                                                         DTSBX201
00923         MOVE AATX-EMP-NO          TO WRK-BX331C-EMP-NO            DTSBX201
00924      END-IF.                                                      DTSBX201
00925      IF AATX-YRQ-NO-ENTRY-88                                      DTSBX201
00926         MOVE SPACES               TO WRK-BX331C-QTR               DTSBX201
00927      ELSE                                                         DTSBX201
00928         MOVE AATX-YRQ             TO L004-QTR-5-9                 DTSBX201
00929         PERFORM S004-FROM-5       THRU S004-EXIT                  DTSBX201
00930         MOVE L004-SLASH-5-QTR     TO WRK-BX331C-QTR               DTSBX201
00931      END-IF.                                                      DTSBX201
00932      MOVE AATX-REMIT-AMT          TO WRK-BX331C-REMIT.            DTSBX201
00933      IF AATX-TOT-WAGE-NO-ENTRY-88                                 DTSBX201
00934         MOVE ZERO                 TO WRK-BX331C-TOT-WAGE          DTSBX201
00935      ELSE                                                         DTSBX201
00936         MOVE AATX-TOT-WAGE        TO WRK-BX331C-TOT-WAGE          DTSBX201
00937      END-IF.                                                      DTSBX201
00938      IF AATX-TAX-WAGE-NO-ENTRY-88                                 DTSBX201
00939         MOVE ZERO                 TO WRK-BX331C-TAX-WAGE          DTSBX201
00940      ELSE                                                         DTSBX201
00941         MOVE AATX-TAX-WAGE        TO WRK-BX331C-TAX-WAGE          DTSBX201
00942      END-IF.                                                      DTSBX201
00943      IF AATX-EXCESS-WAGE-NO-ENTRY-88                              DTSBX201
00944         MOVE ZERO                 TO WRK-BX331C-EXCESS-WAGE       DTSBX201
00945      ELSE                                                         DTSBX201
00946         MOVE AATX-EXCESS-WAGE     TO WRK-BX331C-EXCESS-WAGE       DTSBX201
00947      END-IF.                                                      DTSBX201
00948                                                                   DTSBX201
00949      MOVE LOW-VALUES              TO MRTE-KEY-AREA                DTSBX201
00950      MOVE AATX-EMP-NO             TO MRTE-EMP-NO                  DTSBX201
00951      MOVE WRK-YRQ                 TO L004-QTR-5-9.                DTSBX201
00952      MOVE 1                       TO L004-QTR-5-YR.               DTSBX201
00953      MOVE L004-QTR-5-9            TO MRTE-EFF-YRQ.                DTSBX201
00954      SET MRTE-RTE-88              TO TRUE                         DTSBX201
00955      MOVE MRTE-KEY-AREA           TO MSKL-KEY-AREA.               DTSBX201
00956      PERFORM S910-READ            THRU S910-EXIT                  DTSBX201
00957      IF L910-OK-88                                                DTSBX201
00958         MOVE MSKL-REC             TO MRTE-REC                     DTSBX201
00959         MOVE MRTE-UI-RATE         TO WRK-BX331C-RATE              DTSBX201
00960      ELSE                                                         DTSBX201
00961         MOVE SPACES               TO WRK-BX331C-RATE-X            DTSBX201
00962      END-IF.                                                      DTSBX201
00963                                                                   DTSBX201
00964      MOVE SPACES                  TO WRK-BX331C-ACCT.             DTSBX201
00965      MOVE 'R'                     TO WRK-BX331C-CATEGORY.         DTSBX201
00966                                                                   DTSBX201
00967      IF WRK-BX331A-MESSAGE (1:6) = 'STATUS'                       DTSBX201
00968         SET WRK-BX331C-SOURCE-STATUS-88 TO TRUE                   DTSBX201
00969      ELSE                                                         DTSBX201
00970         SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE                    DTSBX201
00971      END-IF.                                                      DTSBX201
00972      IF AATX-RECEIVED-DATE = ZEROS                                DTSBX201
00973         MOVE WRK-RCVD-DATE        TO AATX-RECEIVED-DATE           DTSBX201
00974      END-IF.                                                      DTSBX201
00975                                                                   DTSBX201
00976      MOVE AATX-RECEIVED-DATE      TO L001-FED-8-DATE-9.           DTSBX201
00977      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00978      MOVE L001-SLASH-8-DATE       TO WRK-BX331C-RCVD-DT.          DTSBX201
00979                                                                   DTSBX201
00980      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
00981      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
00982      MOVE L001-SLASH-8-DATE    TO WRK-BX331C-PROCESS-DT.          DTSBX201
00983                                                                   DTSBX201
00984      WRITE BX331C-REC             FROM WRK-BX331C-REC.            DTSBX201
00985      ADD  +1                      TO WRK-BX331C-CNT.              DTSBX201
00986                                                                   DTSBX201
00987  P1222-EXIT.                                                      DTSBX201
00988      EXIT.                                                        DTSBX201
00989                                                                   DTSBX201
00990  P1300-CHK-PAY-ERRORS.                                            DTSBX201
00991      MOVE ASKL-REC TO APAY-REC.                                   DTSBX201
00992                                                                   DTSBX201
00993      IF APAY-NOT-PROCESSED-88                                     DTSBX201
00994 **   AND APAY-PAYMENT-88                                          DTSBX201
00995         MOVE 'PAYMENT ERROR'          TO WRK-BX331A-MESSAGE       DTSBX201
00996         PERFORM P1310-WRITE           THRU P1310-EXIT             DTSBX201
00997      END-IF.                                                      DTSBX201
00998                                                                   DTSBX201
00999  P1300-EXIT.                                                      DTSBX201
01000      EXIT.                                                        DTSBX201
01001                                                                   DTSBX201
01002  P1310-WRITE.                                                     DTSBX201
01003      ADD APAY-REMIT-AMT           TO WRK-TOT-REMIT.               DTSBX201
01004      SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                       DTSBX201
01005      PERFORM P1311-REC1           THRU P1311-EXIT.                DTSBX201
01006      PERFORM P1312-REC3           THRU P1312-EXIT.                DTSBX201
01007                                                                   DTSBX201
01008  P1310-EXIT.                                                      DTSBX201
01009      EXIT.                                                        DTSBX201
01010                                                                   DTSBX201
01011  P1311-REC1.                                                      DTSBX201
01012      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
01013      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
01014      MOVE L001-SLASH-8-DATE       TO WRK-BX331A-PROCESS-DT.       DTSBX201
01015      MOVE APAY-EMP-NO             TO WRK-BX331A-EMP-NO            DTSBX201
01016      MOVE APAY-BATCH-NO           TO WRK-BX331A-BATCH.            DTSBX201
01017      MOVE APAY-ITEM-NO            TO WRK-BX331A-ITEM.             DTSBX201
01018      MOVE APAY-PAY-TYPE           TO WRK-BX331A-TRAN.             DTSBX201
01019      SET WRK-BX331A-SOURCE-ERROR-88 TO TRUE                       DTSBX201
01020                                                                   DTSBX201
01021      WRITE BX331A1-REC            FROM WRK-BX331A-REC.            DTSBX201
01022      ADD  +1                      TO WRK-BX331A-CNT.              DTSBX201
01023                                                                   DTSBX201
01024  P1311-EXIT.                                                      DTSBX201
01025      EXIT.                                                        DTSBX201
01026                                                                   DTSBX201
01027  P1312-REC3.                                                      DTSBX201
01028      MOVE APAY-BATCH-NO           TO WRK-BX331C-BATCH-NO.         DTSBX201
01029      MOVE APAY-ITEM-NO            TO WRK-BX331C-ITEM-NO.          DTSBX201
01030      MOVE APAY-PAY-TYPE           TO WRK-BX331C-TRAN.             DTSBX201
01031      MOVE APAY-EMP-NO             TO WRK-BX331C-EMP-NO            DTSBX201
01032      IF APAY-APPLIC-YRQ = ZERO                                    DTSBX201
01033         MOVE SPACES               TO WRK-BX331C-QTR               DTSBX201
01034      ELSE                                                         DTSBX201
01035         MOVE APAY-APPLIC-YRQ      TO L004-QTR-5-9                 DTSBX201
01036         PERFORM S004-FROM-5       THRU S004-EXIT                  DTSBX201
01037         MOVE L004-SLASH-5-QTR     TO WRK-BX331C-QTR               DTSBX201
01038      END-IF.                                                      DTSBX201
01039      MOVE APAY-REMIT-AMT          TO WRK-BX331C-REMIT.            DTSBX201
01040      MOVE ZERO                    TO WRK-BX331C-TOT-WAGE          DTSBX201
01041      MOVE ZERO                    TO WRK-BX331C-TAX-WAGE          DTSBX201
01042      MOVE ZERO                    TO WRK-BX331C-EXCESS-WAGE       DTSBX201
01043                                                                   DTSBX201
01044      MOVE SPACES                  TO WRK-BX331C-RATE-X            DTSBX201
01045                                                                   DTSBX201
01046      MOVE APAY-APPLIC-IND         TO WRK-BX331C-ACCT.             DTSBX201
01047      MOVE 'P'                     TO WRK-BX331C-CATEGORY.         DTSBX201
01048                                                                   DTSBX201
01049      SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE                       DTSBX201
01050      IF APAY-RECEIVED-DATE = ZEROS                                DTSBX201
01051         MOVE WRK-RCVD-DATE        TO APAY-RECEIVED-DATE           DTSBX201
01052      END-IF.                                                      DTSBX201
01053                                                                   DTSBX201
01054      MOVE APAY-RECEIVED-DATE      TO L001-FED-8-DATE-9.           DTSBX201
01055      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
01056      MOVE L001-SLASH-8-DATE       TO WRK-BX331C-RCVD-DT.          DTSBX201
01057                                                                   DTSBX201
01058      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
01059      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
01060      MOVE L001-SLASH-8-DATE    TO WRK-BX331C-PROCESS-DT.          DTSBX201
01061                                                                   DTSBX201
01062      WRITE BX331C-REC             FROM WRK-BX331C-REC.            DTSBX201
01063      ADD  +1                      TO WRK-BX331C-CNT.              DTSBX201
01064                                                                   DTSBX201
01065  P1312-EXIT.                                                      DTSBX201
01066      EXIT.                                                        DTSBX201
01067                                                                   DTSBX201
01068  P2000-DUMMY-REC.                                                 DTSBX201
01069      MOVE ZERO                    TO WRK-BX331C-BATCH-NO          DTSBX201
01070                                      WRK-BX331C-ITEM-NO.          DTSBX201
01071      MOVE SPACES                  TO WRK-BX331C-TRAN              DTSBX201
01072                                      WRK-BX331C-EMP-NO-X          DTSBX201
01073                                      WRK-BX331C-QTR.              DTSBX201
01074      MOVE ZERO                    TO WRK-BX331C-REMIT             DTSBX201
01075                                      WRK-BX331C-TOT-WAGE          DTSBX201
01076                                      WRK-BX331C-TAX-WAGE          DTSBX201
01077                                      WRK-BX331C-EXCESS-WAGE       DTSBX201
01078                                      WRK-BX331C-RATE.             DTSBX201
01079                                                                   DTSBX201
01080      MOVE SPACES                  TO WRK-BX331C-ACCT.             DTSBX201
01081      MOVE 'R'                     TO WRK-BX331C-CATEGORY.         DTSBX201
01082                                                                   DTSBX201
01083      SET WRK-BX331C-SOURCE-ERROR-88 TO TRUE.                      DTSBX201
01084                                                                   DTSBX201
01085      MOVE WRK-PRIOR-RUN-DT        TO L001-FED-8-DATE-9.           DTSBX201
01086      PERFORM S001-FROM-FED-8      THRU S001-EXIT.                 DTSBX201
01087      MOVE L001-SLASH-8-DATE       TO WRK-BX331C-RCVD-DT           DTSBX201
01088                                      WRK-BX331C-PROCESS-DT.       DTSBX201
01089                                                                   DTSBX201
01090      WRITE BX331C-REC             FROM WRK-BX331C-REC.            DTSBX201
01091                                                                   DTSBX201
01092  P2000-EXIT.                                                      DTSBX201
01093      EXIT.                                                        DTSBX201
01094                                                                   DTSBX201
01095  T0000-TERMINATE.                                                 DTSBX201
01096      CLOSE BX331A1-SUMMARY                                        DTSBX201
01097            BX331C-TRAN                                            DTSBX201
01098            HEADER-FILE.                                           DTSBX201
01099                                                                   DTSBX201
01100                                                                   DTSBX201
01101      DISPLAY ' '.                                                 DTSBX201
01102                                                                   DTSBX201
01103      DISPLAY '*** DTSBX201 TERMINATION STATISTICS ***'.           DTSBX201
01104                                                                   DTSBX201
01105      DISPLAY ' '.                                                 DTSBX201
01106                                                                   DTSBX201
01107      DISPLAY 'ERROR MESSAGE RECORDS WRITTEN             : '       DTSBX201
01108              WRK-BX331A-CNT.                                      DTSBX201
01109                                                                   DTSBX201
01110      DISPLAY 'TRANSACTION RECORDS WRITTEN               : '       DTSBX201
01111              WRK-BX331C-CNT.                                      DTSBX201
01112                                                                   DTSBX201
01113      MOVE WRK-TOT-REMIT TO AMT-DISP.                              DTSBX201
01114      DISPLAY 'TOTAL REMITTANCE NOT PROCESSED            : '       DTSBX201
01115              AMT-DISP.                                            DTSBX201
01116                                                                   DTSBX201
01117      DISPLAY 'HEADERS WRITTEN                           : '       DTSBX201
01118              WRK-HEADER-CNT.                                      DTSBX201
01119                                                                   DTSBX201
01120                                                                   DTSBX201
01121      PERFORM S910-CLOSE THRU S910-EXIT.                           DTSBX201
01122      PERFORM S923-CLOSE THRU S923-EXIT.                           DTSBX201
01123      PERFORM S931-CLOSE THRU S931-EXIT.                           DTSBX201
01124                                                                   DTSBX201
01125  T0000-EXIT.                                                      DTSBX201
01126      EXIT.                                                        DTSBX201
01127                                                                   DTSBX201
01128  S001-FROM-FED-8.                                                 DTSBX201
01129      SET L001-FROM-FED-8 TO TRUE.                                 DTSBX201
01130      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBX201
01131                                                                   DTSBX201
01132  S001-EXIT.                                                       DTSBX201
01133      EXIT.                                                        DTSBX201
01134                                                                   DTSBX201
01135  S004-FROM-5.                                                     DTSBX201
01136      SET L004-FROM-5 TO TRUE.                                     DTSBX201
01137      GO TO S004-QTR.                                              DTSBX201
01138                                                                   DTSBX201
01139  S004-FROM-ABS.                                                   DTSBX201
01140      SET L004-FROM-ABS TO TRUE.                                   DTSBX201
01141      GO TO S004-QTR.                                              DTSBX201
01142                                                                   DTSBX201
01143  S004-FROM-DATE.                                                  DTSBX201
01144      SET L004-FROM-DATE TO TRUE.                                  DTSBX201
01145      GO TO S004-QTR.                                              DTSBX201
01146                                                                   DTSBX201
01147  S004-QTR.                                                        DTSBX201
01148                                                                   DTSBX201
01149      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBX201
01150                                                                   DTSBX201
01151  S004-EXIT.                                                       DTSBX201
01152      EXIT.                                                        DTSBX201
01153                                                                   DTSBX201
01154  S516-LIABILITY.                                                  DTSBX201
01155      CALL 'DTSBU516' USING L516-LINK-AREA                         DTSBX201
01156                            MPRF-REC.                              DTSBX201
01157                                                                   DTSBX201
01158  S516-EXIT.                                                       DTSBX201
01159      EXIT.                                                        DTSBX201
01160      EJECT                                                        DTSBX201
01161  S923-OPEN-READ.                                                  DTSBX201
01162      SET L923-OPEN-READ-88 TO TRUE.                               DTSBX201
01163      GO TO S923-ATC-IO.                                           DTSBX201
01164                                                                   DTSBX201
01165  S923-OPEN-UPDATE.                                                DTSBX201
01166      SET L923-OPEN-UPDATE-88        TO TRUE.                      DTSBX201
01167      GO TO S923-ATC-IO.                                           DTSBX201
01168                                                                   DTSBX201
01169  S923-START-BROWSE.                                               DTSBX201
01170      SET L923-START-BROWSE-88 TO TRUE.                            DTSBX201
01171      GO TO S923-ATC-IO.                                           DTSBX201
01172                                                                   DTSBX201
01173  S923-READ-NEXT.                                                  DTSBX201
01174      SET L923-READ-NEXT-88 TO TRUE.                               DTSBX201
01175      GO TO S923-ATC-IO.                                           DTSBX201
01176                                                                   DTSBX201
01177  S923-REWRITE.                                                    DTSBX201
01178      SET L923-REWRITE-88 TO TRUE.                                 DTSBX201
01179      GO TO S923-ATC-IO.                                           DTSBX201
01180                                                                   DTSBX201
01181  S923-DELETE.                                                     DTSBX201
01182      SET L923-DELETE-88 TO TRUE.                                  DTSBX201
01183      GO TO S923-ATC-IO.                                           DTSBX201
01184                                                                   DTSBX201
01185  S923-CLOSE.                                                      DTSBX201
01186      SET L923-CLOSE-88     TO TRUE.                               DTSBX201
01187      GO TO S923-ATC-IO.                                           DTSBX201
01188                                                                   DTSBX201
01189  S923-ATC-IO.                                                     DTSBX201
01190      CALL 'DTSBU923' USING L923-LINK-AREA                         DTSBX201
01191                            ASKL-REC.                              DTSBX201
01192  S923-EXIT.                                                       DTSBX201
01193      EXIT.                                                        DTSBX201
01194      SKIP3                                                        DTSBX201
01195  S910-OPEN-READ.                                                  DTSBX201
01196      SET L910-OPEN-READ-88 TO TRUE.                               DTSBX201
01197      GO TO S910-MSTR-IO.                                          DTSBX201
01198                                                                   DTSBX201
01199  S910-READ.                                                       DTSBX201
01200      SET L910-READ-88 TO TRUE.                                    DTSBX201
01201      GO TO S910-MSTR-IO.                                          DTSBX201
01202                                                                   DTSBX201
01203  S910-START-BROWSE.                                               DTSBX201
01204      SET L910-START-BROWSE-88 TO TRUE.                            DTSBX201
01205      GO TO S910-MSTR-IO.                                          DTSBX201
01206                                                                   DTSBX201
01207  S910-READ-NEXT.                                                  DTSBX201
01208      SET L910-READ-NEXT-88 TO TRUE.                               DTSBX201
01209      GO TO S910-MSTR-IO.                                          DTSBX201
01210  S910-CLOSE.                                                      DTSBX201
01211      SET L910-CLOSE-88     TO TRUE.                               DTSBX201
01212      GO TO S910-MSTR-IO.                                          DTSBX201
01213                                                                   DTSBX201
01214  S910-MSTR-IO.                                                    DTSBX201
01215      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBX201
01216                            MSKL-REC.                              DTSBX201
01217  S910-EXIT.                                                       DTSBX201
01218      EXIT.                                                        DTSBX201
01219                                                                   DTSBX201
01220  S931-OPEN-READ.                                                  DTSBX201
01221      SET L931-OPEN-READ-88 TO TRUE.                               DTSBX201
01222      GO TO S931-REF-IO.                                           DTSBX201
01223                                                                   DTSBX201
01224  S931-CLOSE.                                                      DTSBX201
01225      SET L931-CLOSE-88 TO TRUE.                                   DTSBX201
01226      GO TO S931-REF-IO.                                           DTSBX201
01227                                                                   DTSBX201
01228  S931-REF-IO.                                                     DTSBX201
01229      CALL 'DTSBU931' USING L931-LINK-AREA                         DTSBX201
01230                            FSKL-REC.                              DTSBX201
01231  S931-EXIT.                                                       DTSBX201
01232      EXIT.                                                        DTSBX201
01233                                                                   DTSBX201
01234  S999-ABEND.                                                      DTSBX201
01235      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBX201
01236  S999-EXIT.                                                       DTSBX201
01237      EXIT.                                                        DTSBX201
