00001  IDENTIFICATION DIVISION.                                         09/21/10
00002  PROGRAM-ID.             DTSBX426.                                DTSBX426
00003  AUTHOR.                 NGC.                                        LV001
00004  DATE-WRITTEN.           JUNE 2010.                               DTSBX426
00005  DATE-COMPILED.                                                   DTSBX426
00006      SKIP3                                                        DTSBX426
00007 *****                                                             DTSBX426
00008 *                                                                 DTSBX426
00009 *    FUNCTION:  EDIT BATCH HEADER FROM WEB APPLICATION.           DTSBX426
00010 *                                                                 DTSBX426
00011 *    MODIFICATION HISTORY:                                        DTSBX426
00012 *                                                                 DTSBX426
00013 *    06-16-2010 INITIAL DEVELOPMENT                               DTSBX426
00014 *               REFERENCE RFP: IN-HOUSE CASHIERING                DTSBX426
00015 *                                                                 DTSBX426
00016 *                                                                 DTSBX426
00017 *                                                                 DTSBX426
00018 *****                                                             DTSBX426
00019      SKIP3                                                        DTSBX426
00020  ENVIRONMENT DIVISION.                                            DTSBX426
00021      SKIP2                                                        DTSBX426
00022  DATA DIVISION.                                                   DTSBX426
00023  WORKING-STORAGE SECTION.                                         DTSBX426
000235 77  PAN-VALET PICTURE X(24) VALUE '001DTSBX426  09/21/10'.       DTSBX426
00024      SKIP3                                                        DTSBX426
00025  01  WRK-AREA.                                                    DTSBX426
00026      05  W-ABEND-CD                  PIC S9(04)  COMP  VALUE 426. DTSBX426
00027      05  W-MOD-NAME                  PIC  X(08)  VALUE 'DTSBX426'.DTSBX426
00028                                                                   DTSBX426
00029                                                                   DTSBX426
00030      05  W-ERROR-IND                 PIC  X(01) VALUE 'N'.        DTSBX426
00031          88 W-ERROR-YES-88            VALUE 'Y'.                  DTSBX426
00032          88 W-ERROR-NO-88             VALUE 'N'.                  DTSBX426
00033                                                                   DTSBX426
00034      05  W-FATAL-ERROR-IND           PIC  X(01) VALUE 'N'.        DTSBX426
00035          88 W-FATAL-ERROR-YES-88      VALUE 'Y'.                  DTSBX426
00036          88 W-FATAL-ERROR-NO-88       VALUE 'N'.                  DTSBX426
00037                                                                   DTSBX426
00038      05  W-RECEIVED-DATE         PIC S9(09) COMP-3.               DTSBX426
00039      05  W-ESTB-DATE             PIC S9(09) COMP-3.               DTSBX426
00040      05  W-DEPOSIT-DATE          PIC S9(09) COMP-3.               DTSBX426
00041      05  W-CHK-SCAN-DATE         PIC S9(09) COMP-3.               DTSBX426
00042                                                                   DTSBX426
00043      05  W-TRAN-CNT              PIC S9(03) COMP-3.               DTSBX426
00044      05  W-REMIT-AMT             PIC S9(09)V99 COMP-3.            DTSBX426
00045                                                                   DTSBX426
00046      05  W-SLASH-DATE            PIC  X(10).                      DTSBX426
00047      05  FILLER REDEFINES W-SLASH-DATE.                           DTSBX426
00048          10  W-SLASH-DT-MM       PIC  X(02).                      DTSBX426
00049          10  FILLER              PIC  X(01).                      DTSBX426
00050          10  W-SLASH-DT-DD       PIC  X(02).                      DTSBX426
00051          10  FILLER              PIC  X(01).                      DTSBX426
00052          10  W-SLASH-DT-CCYY     PIC  X(04).                      DTSBX426
00053                                                                   DTSBX426
00054      05  W-SLASH-QTR             PIC  X(06).                      DTSBX426
00055      05  FILLER REDEFINES W-SLASH-QTR.                            DTSBX426
00056          10  W-SLASH-QTR-CCYY    PIC  X(04).                      DTSBX426
00057          10  FILLER              PIC  X(01).                      DTSBX426
00058          10  W-SLASH-QTR-Q       PIC  X(01).                      DTSBX426
00059                                                                   DTSBX426
00060 *  BATCH HEADER                                                   DTSBX426
00061      05  W-X149-CNT              PIC S9(07)  COMP-3 VALUE +0.     DTSBX426
00062                                                                   DTSBX426
00063      05  W-AMT-DISP1             PIC ----------9.99.              DTSBX426
00064      05  W-AMT-DISP2             PIC ----------9.99.              DTSBX426
00065                                                                   DTSBX426
00066  01  MESSAGE-AREA.                                                DTSBX426
00067 *** FATAL ERRORS MSG-A                                            DTSBX426
00068      05  MSG-A1.                                                  DTSBX426
00069          10  FILLER                            PIC X(32)          DTSBX426
00070              VALUE 'TYPE A REC NOT FIRST IN FILE: '.              DTSBX426
00071          10  MSG-A1-PREV-REC-TYPE              PIC X(01).         DTSBX426
00072                                                                   DTSBX426
00073 *  ACCOUNTING BATCH HEADER                                        DTSBX426
00074  01  X149-REC.                                                    DTSBX426
00075  ++INCLUDE DTSIX149                                               DTSBX426
00076                                                                   DTSBX426
00077 *  ERRORS                                                         DTSBX426
00078 *01  X907-REC.                                                    DTSBX426
00079 ***INCLUDE DTSIX907                                               DTSBX426
00080                                                                   DTSBX426
00081  01  L001-LINK-AREA.                                              DTSBX426
00082  ++INCLUDE DTSIL001                                               DTSBX426
00083                                                                   DTSBX426
00084  01  L003-LINK-AREA.                                              DTSBX426
00085  ++INCLUDE DTSIL003                                               DTSBX426
00086                                                                   DTSBX426
00087  01  L004-LINK-AREA.                                              DTSBX426
00088  ++INCLUDE DTSIL004                                               DTSBX426
00089                                                                   DTSBX426
00090  01  L910-LINK-AREA.                                              DTSBX426
00091  ++INCLUDE DTSIL910                                               DTSBX426
00092  01  MSKL-REC.                                                    DTSBX426
00093  ++INCLUDE DTSIMSKL                                               DTSBX426
00094                                                                   DTSBX426
00095  01  MHDR-REC.                                                    DTSBX426
00096  ++INCLUDE DTSIMHDR                                               DTSBX426
00097                                                                   DTSBX426
00098  01  L923-LINK-AREA.                                              DTSBX426
00099  ++INCLUDE DTSIL923                                               DTSBX426
00100      EJECT                                                        DTSBX426
00101  01  ASKL-REC.                                                    DTSBX426
00102  ++INCLUDE DTSIASKL                                               DTSBX426
00103      EJECT                                                        DTSBX426
00104  01  AHDR-REC.                                                    DTSBX426
00105  ++INCLUDE DTSIAHDR                                               DTSBX426
00106      EJECT                                                        DTSBX426
00107  01  ARPT-REC.                                                    DTSBX426
00108  ++INCLUDE DTSIARPT                                               DTSBX426
00109      EJECT                                                        DTSBX426
00110  01  APAY-REC.                                                    DTSBX426
00111  ++INCLUDE DTSIAPAY                                               DTSBX426
00112                                                                   DTSBX426
00113  01  L931-LINK-AREA.                                              DTSBX426
00114  ++INCLUDE DTSIL931                                               DTSBX426
00115                                                                   DTSBX426
00116  01  FSKL-REC.                                                    DTSBX426
00117  ++INCLUDE DTSIFSKL                                               DTSBX426
00118                                                                   DTSBX426
00119  01  R140-REC.                                                    DTSBX426
00120  ++INCLUDE DTSIR140                                               DTSBX426
00121                                                                   DTSBX426
00122  LINKAGE                                                          DTSBX426
00123  SECTION.                                                         DTSBX426
00124                                                                   DTSBX426
00125  01  LX42-LINK-AREA.                                              DTSBX426
00126  ++INCLUDE DTSILX42                                               DTSBX426
00127                                                                   DTSBX426
00128  PROCEDURE DIVISION USING LX42-LINK-AREA.                         DTSBX426
00129                                                                   DTSBX426
00130  DTSBX426-MAIN.                                                   DTSBX426
00131      EVALUATE TRUE                                                DTSBX426
00132         WHEN LX42-INITIALIZE-88                                   DTSBX426
00133            PERFORM I0000-INITIATE        THRU I0000-EXIT          DTSBX426
00134                                                                   DTSBX426
00135         WHEN LX42-NEW-BATCH-88                                    DTSBX426
00136            PERFORM P2000-NEW-BATCH       THRU P2000-EXIT          DTSBX426
00137                                                                   DTSBX426
00138         WHEN LX42-PROCESS-88                                      DTSBX426
00139            PERFORM P0000-PROCESS         THRU P0000-EXIT          DTSBX426
00140                                                                   DTSBX426
00141         WHEN LX42-TERMINATE-88                                    DTSBX426
00142            PERFORM P2000-NEW-BATCH       THRU P2000-EXIT          DTSBX426
00143            PERFORM T0000-TERMINATE       THRU T0000-EXIT          DTSBX426
00144                                                                   DTSBX426
00145      END-EVALUATE.                                                DTSBX426
00146                                                                   DTSBX426
00147  DTSBX426-MAIN-EXIT.                                              DTSBX426
00148      GOBACK.                                                      DTSBX426
00149                                                                   DTSBX426
00150  I0000-INITIATE.                                                  DTSBX426
00151      DISPLAY 'BX426 INIT'.                                        DTSBX426
00152      SET W-ERROR-NO-88                 TO TRUE.                   DTSBX426
00153      SET W-FATAL-ERROR-NO-88           TO TRUE.                   DTSBX426
00154                                                                   DTSBX426
00155 *    FOR VARIABLE REPORT FILE.                                    DTSBX426
00156      MOVE LENGTH OF R140-REC           TO R140-LENGTH.            DTSBX426
00157      MOVE '140'                        TO R140-REC-TYPE.          DTSBX426
00158                                                                   DTSBX426
00159      PERFORM I3000-READ-MHDR           THRU I3000-EXIT            DTSBX426
00160      IF W-FATAL-ERROR-YES-88                                      DTSBX426
00161         GO TO I0000-EXIT                                          DTSBX426
00162      END-IF.                                                      DTSBX426
00163                                                                   DTSBX426
00164  I0000-EXIT.                                                      DTSBX426
00165      EXIT.                                                        DTSBX426
00166                                                                   DTSBX426
00167  I3000-READ-MHDR.                                                 DTSBX426
00168      MOVE LOW-VALUES             TO MHDR-KEY-AREA.                DTSBX426
00169      MOVE +0                     TO MHDR-EMP-NO.                  DTSBX426
00170      SET MHDR-HDR-88             TO TRUE.                         DTSBX426
00171      MOVE MHDR-KEY-AREA          TO MSKL-KEY-AREA.                DTSBX426
00172                                                                   DTSBX426
00173      PERFORM S910-READ           THRU S910-EXIT.                  DTSBX426
00174      IF L910-OK-88                                                DTSBX426
00175         MOVE MSKL-REC            TO MHDR-REC                      DTSBX426
00176      ELSE                                                         DTSBX426
00177         PERFORM S999-ABEND       THRU S999-EXIT                   DTSBX426
00178      END-IF.                                                      DTSBX426
00179                                                                   DTSBX426
00180      DISPLAY 'BX426 I3000 LAST BTCH: ' MHDR-LAST-USED-BATCH-NO.   DTSBX426
00181  I3000-EXIT.                                                      DTSBX426
00182      EXIT.                                                        DTSBX426
00183                                                                   DTSBX426
00184                                                                   DTSBX426
00185  P0000-PROCESS.                                                   DTSBX426
00186      MOVE LX42-DATA-AREA               TO X149-REC.               DTSBX426
00187 *&                                                                DTSBX426
00188      DISPLAY SPACE.                                               DTSBX426
00189      DISPLAY 'BX426 HEADER ' X149-PSEUDO-BATCH  '  '              DTSBX426
00190         X149-PSEUDO-ITEM.                                         DTSBX426
00191 **   DISPLAY X140-REC(1:143).                                     DTSBX426
00192 *&                                                                DTSBX426
00193      ADD +1                            TO W-X149-CNT.             DTSBX426
00194                                                                   DTSBX426
00195      PERFORM P1100-EDIT-HEADER         THRU P1100-EXIT            DTSBX426
00196      IF W-ERROR-NO-88                                             DTSBX426
00197         PERFORM P1200-SAVE-HEADER      THRU P1200-EXIT            DTSBX426
00198      END-IF.                                                      DTSBX426
00199                                                                   DTSBX426
00200  P0000-EXIT.                                                      DTSBX426
00201      EXIT.                                                        DTSBX426
00202                                                                   DTSBX426
00203  P1100-EDIT-HEADER.                                               DTSBX426
00204      MOVE ZERO                TO W-ESTB-DATE.                     DTSBX426
00205      MOVE ZERO                TO W-RECEIVED-DATE.                 DTSBX426
00206      MOVE ZERO                TO W-DEPOSIT-DATE.                  DTSBX426
00207      MOVE ZERO                TO W-CHK-SCAN-DATE.                 DTSBX426
00208                                                                   DTSBX426
00209      MOVE X149-ESTB-DATE      TO W-SLASH-DATE.                    DTSBX426
00210      MOVE W-SLASH-DT-MM       TO L001-FED-8-MO.                   DTSBX426
00211      MOVE W-SLASH-DT-DD       TO L001-FED-8-DA.                   DTSBX426
00212      MOVE W-SLASH-DT-CCYY     TO L001-FED-8-YR.                   DTSBX426
00213      PERFORM S001-FROM-FED-8  THRU S001-EXIT.                     DTSBX426
00214      IF NOT L001-VALID-DATE                                       DTSBX426
00215         SET W-ERROR-YES-88  TO TRUE                               DTSBX426
00216         MOVE SPACES TO R140-MESSAGE                               DTSBX426
00217         MOVE X149-PSEUDO-BATCH  TO R140-EMP-NO                    DTSBX426
00218         MOVE 'BATCH HEADER '   TO R140-RECORD-DESC                DTSBX426
00219         STRING                                                    DTSBX426
00220            'REPORT: INVALID HDR ESTABLISH DATE '                  DTSBX426
00221               X149-ESTB-DATE                                      DTSBX426
00222             DELIMITED BY SIZE                                     DTSBX426
00223             INTO R140-MESSAGE                                     DTSBX426
00224         END-STRING                                                DTSBX426
00225         PERFORM S946-WRITE-R140 THRU S946-EXIT                    DTSBX426
00226         DISPLAY R140-MESSAGE                                      DTSBX426
00227      ELSE                                                         DTSBX426
00228         MOVE L001-FED-8-DATE-9  TO W-ESTB-DATE                    DTSBX426
00229      END-IF.                                                      DTSBX426
00230                                                                   DTSBX426
00231      MOVE X149-DEPOSIT-DATE   TO W-SLASH-DATE.                    DTSBX426
00232      MOVE W-SLASH-DT-MM       TO L001-FED-8-MO.                   DTSBX426
00233      MOVE W-SLASH-DT-DD       TO L001-FED-8-DA.                   DTSBX426
00234      MOVE W-SLASH-DT-CCYY     TO L001-FED-8-YR.                   DTSBX426
00235      PERFORM S001-FROM-FED-8  THRU S001-EXIT.                     DTSBX426
00236      IF NOT L001-VALID-DATE                                       DTSBX426
00237         SET W-ERROR-YES-88  TO TRUE                               DTSBX426
00238         MOVE SPACES TO R140-MESSAGE                               DTSBX426
00239         MOVE X149-PSEUDO-BATCH  TO R140-EMP-NO                    DTSBX426
00240         MOVE 'BATCH HEADER '   TO R140-RECORD-DESC                DTSBX426
00241         STRING                                                    DTSBX426
00242            'REPORT: INVALID HDR DEPOSIT DATE '                    DTSBX426
00243               X149-DEPOSIT-DATE                                   DTSBX426
00244             DELIMITED BY SIZE                                     DTSBX426
00245             INTO R140-MESSAGE                                     DTSBX426
00246         END-STRING                                                DTSBX426
00247         PERFORM S946-WRITE-R140 THRU S946-EXIT                    DTSBX426
00248         DISPLAY R140-MESSAGE                                      DTSBX426
00249      ELSE                                                         DTSBX426
00250         MOVE L001-FED-8-DATE-9  TO W-DEPOSIT-DATE                 DTSBX426
00251      END-IF.                                                      DTSBX426
00252                                                                   DTSBX426
00253      MOVE X149-RCVD-DATE      TO W-SLASH-DATE.                    DTSBX426
00254      MOVE W-SLASH-DT-MM       TO L001-FED-8-MO.                   DTSBX426
00255      MOVE W-SLASH-DT-DD       TO L001-FED-8-DA.                   DTSBX426
00256      MOVE W-SLASH-DT-CCYY     TO L001-FED-8-YR.                   DTSBX426
00257      PERFORM S001-FROM-FED-8  THRU S001-EXIT.                     DTSBX426
00258      IF NOT L001-VALID-DATE                                       DTSBX426
00259         MOVE ZERO               TO W-RECEIVED-DATE                DTSBX426
00260      ELSE                                                         DTSBX426
00261         MOVE L001-FED-8-DATE-9  TO W-RECEIVED-DATE                DTSBX426
00262      END-IF.                                                      DTSBX426
00263                                                                   DTSBX426
00264      MOVE X149-CHECK-SCAN-DATE  TO W-SLASH-DATE.                  DTSBX426
00265      MOVE W-SLASH-DT-MM       TO L001-FED-8-MO.                   DTSBX426
00266      MOVE W-SLASH-DT-DD       TO L001-FED-8-DA.                   DTSBX426
00267      MOVE W-SLASH-DT-CCYY     TO L001-FED-8-YR.                   DTSBX426
00268      PERFORM S001-FROM-FED-8  THRU S001-EXIT.                     DTSBX426
00269      IF NOT L001-VALID-DATE                                       DTSBX426
00270         SET W-ERROR-YES-88  TO TRUE                               DTSBX426
00271         MOVE SPACES TO R140-MESSAGE                               DTSBX426
00272         MOVE X149-PSEUDO-BATCH  TO R140-EMP-NO                    DTSBX426
00273         MOVE 'BATCH HEADER '   TO R140-RECORD-DESC                DTSBX426
00274         STRING                                                    DTSBX426
00275            'REPORT: INVALID HDR CHK SCAN DATE '                   DTSBX426
00276               X149-CHECK-SCAN-DATE                                DTSBX426
00277             DELIMITED BY SIZE                                     DTSBX426
00278             INTO R140-MESSAGE                                     DTSBX426
00279         END-STRING                                                DTSBX426
00280         PERFORM S946-WRITE-R140 THRU S946-EXIT                    DTSBX426
00281         DISPLAY R140-MESSAGE                                      DTSBX426
00282      ELSE                                                         DTSBX426
00283         MOVE L001-FED-8-DATE-9  TO W-CHK-SCAN-DATE                DTSBX426
00284      END-IF.                                                      DTSBX426
00285                                                                   DTSBX426
00286  P1100-EXIT.                                                      DTSBX426
00287      EXIT.                                                        DTSBX426
00288                                                                   DTSBX426
00289  P1200-SAVE-HEADER.                                               DTSBX426
00290      MOVE LOW-VALUES               TO AHDR-REC.                   DTSBX426
00291                                                                   DTSBX426
00292      PERFORM P1210-NEXT-BATCH-NBR  THRU P1210-EXIT.               DTSBX426
00293                                                                   DTSBX426
00294      MOVE +0                       TO AHDR-ITEM-NO.               DTSBX426
00295      SET AHDR-HDR-88               TO TRUE.                       DTSBX426
00296      SET AHDR-BATCH-BALANCED-YES-88   TO TRUE.                    DTSBX426
00297      SET AHDR-BATCH-HELD-NO-88     TO TRUE.                       DTSBX426
00298      MOVE X149-ESTB-OPID           TO AHDR-ESTB-OP-ID             DTSBX426
00299      MOVE MHDR-CURR-RUN-DATE       TO AHDR-ESTB-DATE.             DTSBX426
00300      MOVE SPACES                   TO AHDR-CHNG-OP-ID.            DTSBX426
00301      MOVE +0                       TO AHDR-CHNG-DATE.             DTSBX426
00302      MOVE W-DEPOSIT-DATE           TO AHDR-DEPOSIT-DATE.          DTSBX426
00303      MOVE W-RECEIVED-DATE          TO AHDR-RECEIVED-DATE.         DTSBX426
00304      MOVE X149-CONTROL-TRAN-CNT    TO AHDR-CONTROL-TRAN-CNT       DTSBX426
00305                                       AHDR-LAST-USED-ITEM-NO      DTSBX426
00306                                       AHDR-ATC-FILE-TRAN-CNT      DTSBX426
00307      MOVE X149-CONTROL-REMIT-AMT   TO AHDR-CONTROL-REMIT-AMT      DTSBX426
00308                                       AHDR-ATC-FILE-REMIT-AMT     DTSBX426
00309      MOVE W-CHK-SCAN-DATE          TO AHDR-CHK-SCAN-DATE.         DTSBX426
00310      MOVE +0                       TO AHDR-PROC-TRAN-CNT          DTSBX426
00311                                       AHDR-PROC-REMIT-AMT         DTSBX426
00312                                       AHDR-BANK-BATCH-NO.         DTSBX426
00313                                                                   DTSBX426
00314      PERFORM P1220-UPDATE-LINKAGE  THRU P1220-EXIT.               DTSBX426
00315                                                                   DTSBX426
00316      DISPLAY 'BX426 P1200 HDR: ' AHDR-BATCH-NO ' ' AHDR-ITEM-NO.  DTSBX426
00317  P1200-EXIT.                                                      DTSBX426
00318      EXIT.                                                        DTSBX426
00319                                                                   DTSBX426
00320  P1210-NEXT-BATCH-NBR.                                            DTSBX426
00321      IF MHDR-LAST-USED-BATCH-NO NOT NUMERIC                       DTSBX426
00322         DISPLAY 'BX426 P1210: MHDR BATCH NOT NUMERIC '            DTSBX426
00323      ELSE                                                         DTSBX426
00324         DISPLAY 'BX426 P1210: MHDR: '                             DTSBX426
00325            MHDR-LAST-USED-BATCH-NO                                DTSBX426
00326      END-IF.                                                      DTSBX426
00327                                                                   DTSBX426
00328      IF MHDR-LAST-USED-BATCH-NO < +99999                          DTSBX426
00329         COMPUTE AHDR-BATCH-NO                                     DTSBX426
00330            = MHDR-LAST-USED-BATCH-NO + 1                          DTSBX426
00331      ELSE                                                         DTSBX426
00332         MOVE +1 TO AHDR-BATCH-NO                                  DTSBX426
00333      END-IF.                                                      DTSBX426
00334                                                                   DTSBX426
00335      MOVE AHDR-BATCH-NO TO MHDR-LAST-USED-BATCH-NO.               DTSBX426
00336                                                                   DTSBX426
00337  P1210-EXIT.                                                      DTSBX426
00338      EXIT.                                                        DTSBX426
00339                                                                   DTSBX426
00340  P1220-UPDATE-LINKAGE.                                            DTSBX426
00341      MOVE AHDR-BATCH-NO             TO LX42-BATCH-NO.             DTSBX426
00342      MOVE AHDR-DEPOSIT-DATE         TO LX42-DEPOSIT-DATE.         DTSBX426
00343                                                                   DTSBX426
00344  P1220-EXIT.                                                      DTSBX426
00345      EXIT.                                                        DTSBX426
00346                                                                   DTSBX426
00347  P2000-NEW-BATCH.                                                 DTSBX426
00348 *&                                                                DTSBX426
00349      DISPLAY 'BX426 P2000 ' LX42-PSEUDO-BATCH-NO.                 DTSBX426
00350 *&                                                                DTSBX426
00351                                                                   DTSBX426
00352      IF LX42-PSEUDO-BATCH-NO = ZERO                               DTSBX426
00353         GO TO P2000-EXIT                                          DTSBX426
00354      ELSE                                                         DTSBX426
00355         PERFORM P2100-CHECK-COUNTS            THRU P2100-EXIT     DTSBX426
00356         IF LX42-BATCH-ERR-NO-88                                   DTSBX426
00357            MOVE AHDR-REC                      TO ASKL-REC         DTSBX426
00358            PERFORM S923-WRITE                 THRU S923-EXIT      DTSBX426
00359            DISPLAY 'BX426 WRITE ' AHDR-BATCH-NO                   DTSBX426
00360         ELSE                                                      DTSBX426
00361            DISPLAY 'BX426: ERROR - HEADER NOT WRITTEN '           DTSBX426
00362               AHDR-BATCH-NO                                       DTSBX426
00363         END-IF                                                    DTSBX426
00364      END-IF.                                                      DTSBX426
00365                                                                   DTSBX426
00366  P2000-EXIT.                                                      DTSBX426
00367      EXIT.                                                        DTSBX426
00368                                                                   DTSBX426
00369  P2100-CHECK-COUNTS.                                              DTSBX426
00370      COMPUTE W-TRAN-CNT = LX42-RPT-CNT + LX42-PAY-CNT.            DTSBX426
00371      COMPUTE W-REMIT-AMT =                                        DTSBX426
00372          (LX42-RPT-REMIT-AMT + LX42-PAY-REMIT-AMT).               DTSBX426
00373                                                                   DTSBX426
00374      IF W-TRAN-CNT NOT = AHDR-CONTROL-TRAN-CNT                    DTSBX426
00375         DISPLAY 'INVALID BATCH ' AHDR-BATCH-NO                    DTSBX426
00376            '  ' LX42-PSEUDO-BATCH-NO                              DTSBX426
00377            '. CONTROL COUNT ' AHDR-CONTROL-TRAN-CNT               DTSBX426
00378            '  ACTUAL COUNT ' W-TRAN-CNT                           DTSBX426
00379         SET LX42-BATCH-ERR-YES-88    TO TRUE                      DTSBX426
00380         GO TO P2100-EXIT                                          DTSBX426
00381      END-IF.                                                      DTSBX426
00382                                                                   DTSBX426
00383      IF W-REMIT-AMT NOT = AHDR-CONTROL-REMIT-AMT                  DTSBX426
00384         DISPLAY 'INVALID BATCH ' AHDR-BATCH-NO                    DTSBX426
00385            '  ' LX42-PSEUDO-BATCH-NO                              DTSBX426
00386            '. CONTROL REMIT ' AHDR-CONTROL-REMIT-AMT              DTSBX426
00387            '  ACTUAL REMIT ' W-REMIT-AMT                          DTSBX426
00388         SET LX42-BATCH-ERR-YES-88    TO TRUE                      DTSBX426
00389         GO TO P2100-EXIT                                          DTSBX426
00390      END-IF.                                                      DTSBX426
00391                                                                   DTSBX426
00392  P2100-EXIT.                                                      DTSBX426
00393      EXIT.                                                        DTSBX426
00394                                                                   DTSBX426
00395                                                                   DTSBX426
00396  T0000-TERMINATE.                                                 DTSBX426
00397      PERFORM T1000-UPDATE-MHDR-REC     THRU T1000-EXIT.           DTSBX426
00398                                                                   DTSBX426
00399      DISPLAY ' '.                                                 DTSBX426
00400                                                                   DTSBX426
00401      DISPLAY '*** DTSBX426 TERMINATION STATISTICS ***'.           DTSBX426
00402                                                                   DTSBX426
00403      DISPLAY ' '.                                                 DTSBX426
00404                                                                   DTSBX426
00405      DISPLAY '***        ACCT BATCH HEADER        ***'.           DTSBX426
00406                                                                   DTSBX426
00407      DISPLAY ' '.                                                 DTSBX426
00408                                                                   DTSBX426
00409      PERFORM T2000-DISPLAY-TOTALS         THRU T2000-EXIT.        DTSBX426
00410                                                                   DTSBX426
00411      DISPLAY '***************************************'.           DTSBX426
00412                                                                   DTSBX426
00413  T0000-EXIT.                                                      DTSBX426
00414      EXIT.                                                        DTSBX426
00415                                                                   DTSBX426
00416  T1000-UPDATE-MHDR-REC.                                           DTSBX426
00417      MOVE MHDR-KEY-AREA TO MSKL-KEY-AREA.                         DTSBX426
00418                                                                   DTSBX426
00419      PERFORM S910-READ THRU S910-EXIT.                            DTSBX426
00420                                                                   DTSBX426
00421      IF L910-OK-88                                                DTSBX426
00422         MOVE MHDR-REC TO MSKL-REC                                 DTSBX426
00423         PERFORM S910-REWRITE THRU S910-EXIT                       DTSBX426
00424      ELSE                                                         DTSBX426
00425         PERFORM S999-ABEND THRU S999-EXIT                         DTSBX426
00426      END-IF.                                                      DTSBX426
00427                                                                   DTSBX426
00428  T1000-EXIT.                                                      DTSBX426
00429      EXIT.                                                        DTSBX426
00430                                                                   DTSBX426
00431  T2000-DISPLAY-TOTALS.                                            DTSBX426
00432      DISPLAY 'HEADER RECORD WRITTEN:    '                         DTSBX426
00433              W-X149-CNT.                                          DTSBX426
00434                                                                   DTSBX426
00435      DISPLAY '  '.                                                DTSBX426
00436                                                                   DTSBX426
00437  T2000-EXIT.                                                      DTSBX426
00438      EXIT.                                                        DTSBX426
00439                                                                   DTSBX426
00440  S001-FROM-FED-8.                                                 DTSBX426
00441      SET L001-FROM-FED-8 TO TRUE.                                 DTSBX426
00442      GO TO S001-DATE.                                             DTSBX426
00443                                                                   DTSBX426
00444  S001-FROM-CAL-8.                                                 DTSBX426
00445      SET L001-FROM-CAL-8 TO TRUE.                                 DTSBX426
00446      GO TO S001-DATE.                                             DTSBX426
00447                                                                   DTSBX426
00448  S001-FROM-ABS-DAY.                                               DTSBX426
00449      SET L001-FROM-ABS-DAY TO TRUE.                               DTSBX426
00450      GO TO S001-DATE.                                             DTSBX426
00451                                                                   DTSBX426
00452  S001-DATE.                                                       DTSBX426
00453      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBX426
00454  S001-EXIT.                                                       DTSBX426
00455      EXIT.                                                        DTSBX426
00456                                                                   DTSBX426
00457  S003-AGENCY-DAY.                                                 DTSBX426
00458      SET L003-AGENCY-DAY TO TRUE.                                 DTSBX426
00459      GO TO S003-WORK-DAY.                                         DTSBX426
00460                                                                   DTSBX426
00461  S003-WORK-DAY.                                                   DTSBX426
00462      CALL 'DTSBU003' USING L003-LINK-AREA.                        DTSBX426
00463  S003-EXIT.                                                       DTSBX426
00464      EXIT.                                                        DTSBX426
00465                                                                   DTSBX426
00466  S004-FROM-5.                                                     DTSBX426
00467      SET L004-FROM-5        TO TRUE.                              DTSBX426
00468      GO TO S004-YRQ.                                              DTSBX426
00469                                                                   DTSBX426
00470  S004-FROM-DATE.                                                  DTSBX426
00471      SET L004-FROM-DATE     TO TRUE.                              DTSBX426
00472      GO TO S004-YRQ.                                              DTSBX426
00473                                                                   DTSBX426
00474  S004-FROM-ABS.                                                   DTSBX426
00475      SET L004-FROM-ABS      TO TRUE.                              DTSBX426
00476      GO TO S004-YRQ.                                              DTSBX426
00477                                                                   DTSBX426
00478  S004-YRQ.                                                        DTSBX426
00479      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBX426
00480                                                                   DTSBX426
00481  S004-EXIT.                                                       DTSBX426
00482      EXIT.                                                        DTSBX426
00483                                                                   DTSBX426
00484  S910-OPEN-READ.                                                  DTSBX426
00485      SET L910-OPEN-READ-88 TO TRUE.                               DTSBX426
00486      GO TO S910-MSTR-IO.                                          DTSBX426
00487                                                                   DTSBX426
00488  S910-READ.                                                       DTSBX426
00489      SET L910-READ-88 TO TRUE.                                    DTSBX426
00490      GO TO S910-MSTR-IO.                                          DTSBX426
00491                                                                   DTSBX426
00492  S910-START-BROWSE.                                               DTSBX426
00493      SET L910-START-BROWSE-88 TO TRUE.                            DTSBX426
00494      GO TO S910-MSTR-IO.                                          DTSBX426
00495                                                                   DTSBX426
00496  S910-READ-NEXT.                                                  DTSBX426
00497      SET L910-READ-NEXT-88 TO TRUE.                               DTSBX426
00498      GO TO S910-MSTR-IO.                                          DTSBX426
00499                                                                   DTSBX426
00500  S910-REWRITE.                                                    DTSBX426
00501      SET L910-REWRITE-88   TO TRUE.                               DTSBX426
00502      GO TO S910-MSTR-IO.                                          DTSBX426
00503                                                                   DTSBX426
00504  S910-CLOSE.                                                      DTSBX426
00505      SET L910-CLOSE-88     TO TRUE.                               DTSBX426
00506      GO TO S910-MSTR-IO.                                          DTSBX426
00507                                                                   DTSBX426
00508  S910-MSTR-IO.                                                    DTSBX426
00509      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBX426
00510                            MSKL-REC.                              DTSBX426
00511  S910-EXIT.                                                       DTSBX426
00512      EXIT.                                                        DTSBX426
00513                                                                   DTSBX426
00514  S923-OPEN-UPDATE.                                                DTSBX426
00515      SET L923-OPEN-UPDATE-88 TO TRUE.                             DTSBX426
00516      GO TO S923-ATC-CALL.                                         DTSBX426
00517                                                                   DTSBX426
00518  S923-WRITE.                                                      DTSBX426
00519      SET L923-WRITE-88 TO TRUE.                                   DTSBX426
00520      GO TO S923-ATC-CALL.                                         DTSBX426
00521                                                                   DTSBX426
00522  S923-CLOSE.                                                      DTSBX426
00523      SET L923-CLOSE-88 TO TRUE.                                   DTSBX426
00524      GO TO S923-ATC-CALL.                                         DTSBX426
00525                                                                   DTSBX426
00526  S923-ATC-CALL.                                                   DTSBX426
00527      CALL 'DTSBU923' USING L923-LINK-AREA                         DTSBX426
00528                            ASKL-REC.                              DTSBX426
00529  S923-EXIT.                                                       DTSBX426
00530      EXIT.                                                        DTSBX426
00531                                                                   DTSBX426
00532  S931-OPEN-READ.                                                  DTSBX426
00533      SET L931-OPEN-READ-88 TO TRUE.                               DTSBX426
00534      GO TO S931-REF-IO.                                           DTSBX426
00535                                                                   DTSBX426
00536  S931-CLOSE.                                                      DTSBX426
00537      SET L931-CLOSE-88 TO TRUE.                                   DTSBX426
00538      GO TO S931-REF-IO.                                           DTSBX426
00539                                                                   DTSBX426
00540  S931-REF-IO.                                                     DTSBX426
00541      CALL 'DTSBU931' USING L931-LINK-AREA                         DTSBX426
00542                            FSKL-REC.                              DTSBX426
00543  S931-EXIT.                                                       DTSBX426
00544      EXIT.                                                        DTSBX426
00545                                                                   DTSBX426
00546  S946-WRITE-R140.                                                 DTSBX426
00547      CALL 'DTSBU946' USING R140-REC.                              DTSBX426
00548                                                                   DTSBX426
00549  S946-EXIT.                                                       DTSBX426
00550      EXIT.                                                        DTSBX426
00551                                                                   DTSBX426
00552  S999-ABEND.                                                      DTSBX426
00553      CALL 'DTSBU999' USING W-ABEND-CD.                            DTSBX426
00554  S999-EXIT.                                                       DTSBX426
00555      EXIT.                                                        DTSBX426
00556                                                                   DTSBX426
