00001  IDENTIFICATION DIVISION.                                         09/07/00
00002  PROGRAM-ID.             DTSBE614.                                DTSBE614
00003  AUTHOR.                 TRW.                                        LV001
00004  DATE-WRITTEN.           AUGUST 2000.                             DTSBE614
00005  DATE-COMPILED.                                                   DTSBE614
00006      SKIP3                                                        DTSBE614
00007 *****                                                             DTSBE614
00008 *                                                                 DTSBE614
00009 *    FUNCTION:  EXTRACT PAYMENTS APPLIED TO QUARTERS WITH         DTSBE614
00010 *               ESTIMATED REPORTS.                                DTSBE614
00011 *                                                                 DTSBE614
00012 *                                                                 DTSBE614
00013 *    MODIFICATION LOG:                                            DTSBE614
00014 *                                                                 DTSBE614
00015 *    08/21/2000  INITIAL DEVELOPMENT.                             DTSBE614
00016 *                WORK ORDER:                      PROGRAMMER: GD  DTSBE614
00017 *                                                                 DTSBE614
00018 *    XX/XX/XXXX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX DTSBE614
00019 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX DTSBE614
00020 *                WORK ORDER:                      PROGRAMMER: XXX DTSBE614
00021 *                                                                 DTSBE614
00022 *                                                                 DTSBE614
00023 *  DESCRIPTION:                                                   DTSBE614
00024 *                                                                 DTSBE614
00025 *                                                                 DTSBE614
00026 *    INITIATION:                                                  DTSBE614
00027 *                                                                 DTSBE614
00028 *      SET LECM-MST-OPEN-READ-88 TO TRUE.                         DTSBE614
00029 *                                                                 DTSBE614
00030 *      EDIT PARAMTERS (SEE 614R1).                                DTSBE614
00031 *                                                                 DTSBE614
00032 *                                                                 DTSBE614
00033 *    PROCESSING:                                                  DTSBE614
00034 *                                                                 DTSBE614
00035 *      SEE PRINTED OUTPUTS DESCRIPTION AND LAYOUTS (614R1).       DTSBE614
00036 *                                                                 DTSBE614
00037 *                                                                 DTSBE614
00038 *    TERMINATION:                                                 DTSBE614
00039 *                                                                 DTSBE614
00040 *      NONE.                                                      DTSBE614
00041 *                                                                 DTSBE614
00042 *                                                                 DTSBE614
00043 *    RECORDS READ:                                                DTSBE614
00044 *                                                                 DTSBE614
00045 *      MASTER:                                                    DTSBE614
00046 *                                                                 DTSBE614
00047 *        MQTR                                                     DTSBE614
00048 *        MDST                                                     DTSBE614
00049 *                                                                 DTSBE614
00050 *                                                                 DTSBE614
00051 *      ALTERNATE INDEX:                                           DTSBE614
00052 *                                                                 DTSBE614
00053 *        NONE.                                                    DTSBE614
00054 *                                                                 DTSBE614
00055 *                                                                 DTSBE614
00056 *      REFERENCE:                                                 DTSBE614
00057 *                                                                 DTSBE614
00058 *        NONE.                                                    DTSBE614
00059 *                                                                 DTSBE614
00060 *                                                                 DTSBE614
00061 *    RECORDS UPDATED:                                             DTSBE614
00062 *                                                                 DTSBE614
00063 *        NONE.                                                    DTSBE614
00064 *                                                                 DTSBE614
00065 *                                                                 DTSBE614
00066 *    REPORT RECORDS WRITTEN:                                      DTSBE614
00067 *                                                                 DTSBE614
00068 *        R614  PAYMENTS APPLIED TO QUARTERS WITH ESTIMATED        DTSBE614
00069 *              REPORTS, LISTED IN FIELD REP ORDER.                DTSBE614
00070 *                                                                 DTSBE614
00071 *                                                                 DTSBE614
00072 *    BATCH TRANSACTION COLLECTION RECORDS WRITTEN:                DTSBE614
00073 *                                                                 DTSBE614
00074 *        NONE.                                                    DTSBE614
00075 *                                                                 DTSBE614
00076 *                                                                 DTSBE614
00077 *    MODULES CALLED:                                              DTSBE614
00078 *                                                                 DTSBE614
00079 *        DTSBU001  DATE CONVERSION/EDIT.                          DTSBE614
00080 *        DTSBU004  QUARTER EDIT/CONVERSION.                       DTSBE614
00081 *        DTSBU910  MASTER FILE I/O.                               DTSBE614
00082 *        DTSBU946  VARIABLE LENGTH RECORDS SEQUENTIAL OUTPUT 1.   DTSBE614
00083 *                                                                 DTSBE614
00084 *                                                                 DTSBE614
00085 *    MONTANA REFERENCE:                                           DTSBE614
00086 *                                                                 DTSBE614
00087 *        NONE                                                     DTSBE614
00088 *                                                                 DTSBE614
00089 *****                                                             DTSBE614
00090      SKIP3                                                        DTSBE614
00091  ENVIRONMENT DIVISION.                                            DTSBE614
00092      SKIP3                                                        DTSBE614
00093  DATA DIVISION.                                                   DTSBE614
00094      EJECT                                                        DTSBE614
00095  WORKING-STORAGE SECTION.                                         DTSBE614
000955 77  PAN-VALET PICTURE X(24) VALUE '001DTSBE614  09/07/00'.       DTSBE614
00096      SKIP3                                                        DTSBE614
00097  01  WRK-AREA.                                                    DTSBE614
00098      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +614.DTSBE614
00099      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBE614'.DTSBE614
00100                                                                   DTSBE614
00101      05  ABEND-MSG                       PIC  X(60).              DTSBE614
00102                                                                   DTSBE614
00103      05  WRK-CNT                         PIC S9(04)  COMP.        DTSBE614
00104                                                                   DTSBE614
00105      05  WRK-PROCESSED-DATE              PIC S9(09)  COMP-3.      DTSBE614
00106                                                                   DTSBE614
00107      05  WRK-TOT-PAYMENT                 PIC S9(09)V99  COMP-3.   DTSBE614
00108                                                                   DTSBE614
00109      05  WRK-CURR-PAYMENT                PIC S9(09)V99  COMP-3.   DTSBE614
00110                                                                   DTSBE614
00111      05  WRK-CURR-PAYMENT-CNT            PIC S9(07)     COMP-3.   DTSBE614
00112                                                                   DTSBE614
00113      05  WRK-MDST-IND                    PIC  X(01).              DTSBE614
00114          88  WRK-MDST-OK-88          VALUE 'Y'.                   DTSBE614
00115          88  WRK-MDST-NO-REC-88      VALUE 'N'.                   DTSBE614
00116                                                                   DTSBE614
00117      05  WRK-PARM-AREA.                                           DTSBE614
00118          10  WRK-PARM-START-DATE             PIC S9(09)  COMP-3.  DTSBE614
00119          10  WRK-PARM-END-DATE               PIC S9(09)  COMP-3.  DTSBE614
00120                                                                   DTSBE614
00121      EJECT                                                        DTSBE614
00122  01  L001-LINK-AREA.                                              DTSBE614
00123  ++INCLUDE DTSIL001                                               DTSBE614
00124      EJECT                                                        DTSBE614
00125  01  L004-LINK-AREA.                                              DTSBE614
00126  ++INCLUDE DTSIL004                                               DTSBE614
00127      EJECT                                                        DTSBE614
00128  01  L061-LINK-AREA.                                              DTSBE614
00129  ++INCLUDE DTSIL061                                               DTSBE614
00130      EJECT                                                        DTSBE614
00131  01  L910-LINK-AREA.                                              DTSBE614
00132  ++INCLUDE DTSIL910                                               DTSBE614
00133      SKIP3                                                        DTSBE614
00134  01  MSKL-REC.                                                    DTSBE614
00135  ++INCLUDE DTSIMSKL                                               DTSBE614
00136      SKIP3                                                        DTSBE614
00137  01  MHDR-REC.                                                    DTSBE614
00138  ++INCLUDE DTSIMHDR                                               DTSBE614
00139      SKIP3                                                        DTSBE614
00140  01  MQTR-REC.                                                    DTSBE614
00141  ++INCLUDE DTSIMQTR                                               DTSBE614
00142      SKIP3                                                        DTSBE614
00143  01  MDST-REC.                                                    DTSBE614
00144  ++INCLUDE DTSIMDST                                               DTSBE614
00145      SKIP3                                                        DTSBE614
00146  01  MPAY-REC.                                                    DTSBE614
00147  ++INCLUDE DTSIMPAY                                               DTSBE614
00148      EJECT                                                        DTSBE614
00149  01  R614-REC.                                                    DTSBE614
00150  ++INCLUDE DTSIR614                                               DTSBE614
00151      EJECT                                                        DTSBE614
00152  LINKAGE SECTION.                                                 DTSBE614
00153      SKIP3                                                        DTSBE614
00154  01  LECM-LINK-AREA.                                              DTSBE614
00155  ++INCLUDE DTSILECM                                               DTSBE614
00156      SKIP3                                                        DTSBE614
00157          10  FILLER REDEFINES LECM-EXTRACT-PARMS.                 DTSBE614
00158              15  LECM-PARM-START-DATE            PIC  X(06).      DTSBE614
00159              15  FILLER                          PIC  X(01).      DTSBE614
00160              15  LECM-PARM-END-DATE              PIC  X(06).      DTSBE614
00161              15  FILLER                          PIC  X(55).      DTSBE614
00162      EJECT                                                        DTSBE614
00163  01  MPRF-LINK-REC.                                               DTSBE614
00164  ++INCLUDE DTSIMPRF                                               DTSBE614
00165      EJECT                                                        DTSBE614
00166  PROCEDURE DIVISION USING LECM-LINK-AREA                          DTSBE614
00167                           MPRF-LINK-REC.                          DTSBE614
00168      SKIP2                                                        DTSBE614
00169      IF LECM-PROCESS-88                                           DTSBE614
00170          PERFORM P0000-PROCESS THRU P0000-EXIT                    DTSBE614
00171      ELSE                                                         DTSBE614
00172      IF LECM-INITIALIZE-88                                        DTSBE614
00173          PERFORM I0000-INITIALIZE THRU I0000-EXIT                 DTSBE614
00174      ELSE                                                         DTSBE614
00175      IF LECM-TERMINATE-88                                         DTSBE614
00176          PERFORM T0000-TERMINATE THRU T0000-EXIT                  DTSBE614
00177      ELSE                                                         DTSBE614
00178          MOVE 'INVALID LECM-CALL-TYPE-IND ENCOUNTERED'            DTSBE614
00179            TO ABEND-MSG                                           DTSBE614
00180          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00181      SKIP3                                                        DTSBE614
00182      GOBACK.                                                      DTSBE614
00183      EJECT                                                        DTSBE614
00184  I0000-INITIALIZE.                                                DTSBE614
00185      MOVE LENGTH OF R614-REC TO R614-LENGTH.                      DTSBE614
00186      MOVE '614'              TO R614-REC-TYPE.                    DTSBE614
00187      MOVE LECM-TRACE-IND TO L910-TRACE-IND.                       DTSBE614
00188      MOVE WRK-MOD-NAME TO L910-MOD-NAME.                          DTSBE614
00189                                                                   DTSBE614
00190      MOVE ZERO       TO WRK-CURR-PAYMENT-CNT.                     DTSBE614
00191                                                                   DTSBE614
00192      MOVE LOW-VALUES TO MHDR-KEY-AREA.                            DTSBE614
00193      MOVE +0 TO MHDR-EMP-NO.                                      DTSBE614
00194      SET MHDR-HDR-88 TO TRUE.                                     DTSBE614
00195      MOVE MHDR-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE614
00196      PERFORM S910-READ THRU S910-EXIT.                            DTSBE614
00197      IF L910-NO-REC-88                                            DTSBE614
00198          MOVE 'MASTER FILE HEADER RECORD MISSING'                 DTSBE614
00199            TO ABEND-MSG                                           DTSBE614
00200          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00201                                                                   DTSBE614
00202      MOVE MSKL-REC TO MHDR-REC.                                   DTSBE614
00203                                                                   DTSBE614
00204      PERFORM I1000-EDIT-AND-DEFAULT-PARMS THRU I1000-EXIT.        DTSBE614
00205                                                                   DTSBE614
00206      SET LECM-MST-OPEN-READ-88 TO TRUE.                           DTSBE614
00207      SET LECM-REF-OPEN-READ-88 TO TRUE.                           DTSBE614
00208                                                                   DTSBE614
00209  I0000-EXIT.                                                      DTSBE614
00210      EXIT.                                                        DTSBE614
00211      SKIP3                                                        DTSBE614
00212  I1000-EDIT-AND-DEFAULT-PARMS.                                    DTSBE614
00213      PERFORM I1100-START-DATE           THRU I1100-EXIT.          DTSBE614
00214      PERFORM I1200-END-DATE             THRU I1200-EXIT.          DTSBE614
00215                                                                   DTSBE614
00216      IF WRK-PARM-END-DATE < WRK-PARM-START-DATE                   DTSBE614
00217          MOVE 'PARM END DATE < PARM START DATE'                   DTSBE614
00218             TO ABEND-MSG                                          DTSBE614
00219          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00220                                                                   DTSBE614
00221      DISPLAY 'DTSBE614 PARM START DATE ' WRK-PARM-START-DATE.     DTSBE614
00222                                                                   DTSBE614
00223      DISPLAY 'DTSBE614 PARM END DATE ' WRK-PARM-END-DATE.         DTSBE614
00224                                                                   DTSBE614
00225  I1000-EXIT.                                                      DTSBE614
00226      EXIT.                                                        DTSBE614
00227      SKIP3                                                        DTSBE614
00228  I1100-START-DATE.                                                DTSBE614
00229      IF LECM-PARM-START-DATE = SPACES                             DTSBE614
00230          PERFORM I1110-DEFAULT-START-DATE THRU I1110-EXIT         DTSBE614
00231      ELSE                                                         DTSBE614
00232          PERFORM I1120-PARM-START-DATE    THRU I1120-EXIT.        DTSBE614
00233                                                                   DTSBE614
00234  I1100-EXIT.                                                      DTSBE614
00235      EXIT.                                                        DTSBE614
00236                                                                   DTSBE614
00237 **************************************************************    DTSBE614
00238 *  THE DEFAULT START DATE IS THE LAST COMPLETED WEEK BEGIN DATE   DTSBE614
00239 *  FROM THE HEADER RECORD (MHDR-CMPL-WEEK-BEGIN-DATE).  THIS IS   DTSBE614
00240 *  ALWAYS THE PREVIOUS SUNDAY.                                    DTSBE614
00241 **************************************************************    DTSBE614
00242  I1110-DEFAULT-START-DATE.                                        DTSBE614
00243      MOVE MHDR-CMPL-WEEK-BEGIN-DATE TO L001-FED-8-DATE-9.         DTSBE614
00244      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBE614
00245      IF L001-VALID-DATE                                           DTSBE614
00246          MOVE L001-FED-8-DATE-9 TO WRK-PARM-START-DATE            DTSBE614
00247      ELSE                                                         DTSBE614
00248          MOVE 'MHDR-CMPL-WEEK-BEGIN-DATE NOT VALID'               DTSBE614
00249             TO ABEND-MSG                                          DTSBE614
00250          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00251                                                                   DTSBE614
00252  I1110-EXIT.                                                      DTSBE614
00253      EXIT.                                                        DTSBE614
00254                                                                   DTSBE614
00255  I1120-PARM-START-DATE.                                           DTSBE614
00256      MOVE LECM-PARM-START-DATE TO L001-CAL-6-DATE-X.              DTSBE614
00257      PERFORM S001-FROM-CAL-6 THRU S001-EXIT.                      DTSBE614
00258      IF L001-VALID-DATE                                           DTSBE614
00259          MOVE L001-FED-8-DATE-9 TO WRK-PARM-START-DATE            DTSBE614
00260      ELSE                                                         DTSBE614
00261          MOVE 'PARM-START-DATE NOT VALID'                         DTSBE614
00262            TO ABEND-MSG                                           DTSBE614
00263          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00264                                                                   DTSBE614
00265  I1120-EXIT.                                                      DTSBE614
00266      EXIT.                                                        DTSBE614
00267                                                                   DTSBE614
00268  I1200-END-DATE.                                                  DTSBE614
00269      IF LECM-PARM-END-DATE = SPACES                               DTSBE614
00270          PERFORM I1210-DEFAULT-END-DATE THRU I1210-EXIT           DTSBE614
00271      ELSE                                                         DTSBE614
00272          PERFORM I1220-PARM-END-DATE    THRU I1220-EXIT.          DTSBE614
00273                                                                   DTSBE614
00274  I1200-EXIT.                                                      DTSBE614
00275      EXIT.                                                        DTSBE614
00276                                                                   DTSBE614
00277 **************************************************************    DTSBE614
00278 *  THE DEFAULT END DATE IS THE PRIOR RUN DATE.  SINCE THIS        DTSBE614
00279 *  PROGRAM RUNS AFTER THE DAILY BATCH UPDATE, THE PRIOR RUN       DTSBE614
00280 *  DATE IS THE CURRENT DATE.                                      DTSBE614
00281 **************************************************************    DTSBE614
00282  I1210-DEFAULT-END-DATE.                                          DTSBE614
00283      MOVE MHDR-PRIOR-RUN-DATE TO L001-FED-8-DATE-9.               DTSBE614
00284      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBE614
00285      IF L001-VALID-DATE                                           DTSBE614
00286          MOVE L001-FED-8-DATE-9 TO WRK-PARM-END-DATE              DTSBE614
00287      ELSE                                                         DTSBE614
00288          MOVE 'MHDR-PRIOR-RUN-DATE NOT VALID'                     DTSBE614
00289             TO ABEND-MSG                                          DTSBE614
00290          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00291                                                                   DTSBE614
00292  I1210-EXIT.                                                      DTSBE614
00293      EXIT.                                                        DTSBE614
00294                                                                   DTSBE614
00295  I1220-PARM-END-DATE.                                             DTSBE614
00296      MOVE LECM-PARM-END-DATE TO L001-CAL-6-DATE-X.                DTSBE614
00297      PERFORM S001-FROM-CAL-6 THRU S001-EXIT.                      DTSBE614
00298      IF L001-VALID-DATE                                           DTSBE614
00299          MOVE L001-FED-8-DATE-9 TO WRK-PARM-END-DATE              DTSBE614
00300      ELSE                                                         DTSBE614
00301          MOVE 'PARM-END-DATE NOT VALID'                           DTSBE614
00302            TO ABEND-MSG                                           DTSBE614
00303          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE614
00304                                                                   DTSBE614
00305  I1220-EXIT.                                                      DTSBE614
00306      EXIT.                                                        DTSBE614
00307      EJECT                                                        DTSBE614
00308  P0000-PROCESS.                                                   DTSBE614
00309      IF MPRF-CLASS-SUB-88                                         DTSBE614
00310          NEXT SENTENCE                                            DTSBE614
00311      ELSE                                                         DTSBE614
00312          GO TO P0000-EXIT.                                        DTSBE614
00313                                                                   DTSBE614
00314      MOVE LOW-VALUES  TO MQTR-KEY-AREA.                           DTSBE614
00315      MOVE MPRF-EMP-NO TO MQTR-EMP-NO.                             DTSBE614
00316      SET  MQTR-QTR-88 TO TRUE.                                    DTSBE614
00317      MOVE MQTR-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE614
00318                                                                   DTSBE614
00319      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE614
00320      PERFORM P1000-SCAN-MQTR THRU P1000-EXIT                      DTSBE614
00321          UNTIL L910-NO-REC-88.                                    DTSBE614
00322                                                                   DTSBE614
00323  P0000-EXIT.                                                      DTSBE614
00324      EXIT.                                                        DTSBE614
00325      SKIP3                                                        DTSBE614
00326  P1000-SCAN-MQTR.                                                 DTSBE614
00327      MOVE MSKL-REC TO MQTR-REC.                                   DTSBE614
00328                                                                   DTSBE614
00329      IF MQTR-CURR-ESTIM-88                                        DTSBE614
00330          MOVE ZERO TO WRK-TOT-PAYMENT                             DTSBE614
00331                       WRK-CURR-PAYMENT                            DTSBE614
00332          PERFORM P2000-CHK-PAYMENTS THRU P2000-EXIT               DTSBE614
00333          IF WRK-CURR-PAYMENT NOT = ZERO                           DTSBE614
00334             PERFORM P3000-BUILD-R614 THRU P3000-EXIT.             DTSBE614
00335                                                                   DTSBE614
00336      MOVE MQTR-REC TO MSKL-REC.                                   DTSBE614
00337      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE614
00338      PERFORM S910-READ-NEXT    THRU S910-EXIT.                    DTSBE614
00339                                                                   DTSBE614
00340  P1000-EXIT.                                                      DTSBE614
00341      EXIT.                                                        DTSBE614
00342      SKIP3                                                        DTSBE614
00343  P2000-CHK-PAYMENTS.                                              DTSBE614
00344      SET WRK-MDST-OK-88 TO TRUE.                                  DTSBE614
00345      MOVE LOW-VALUES  TO MDST-KEY-AREA.                           DTSBE614
00346      MOVE MPRF-EMP-NO TO MDST-EMP-NO.                             DTSBE614
00347      MOVE MQTR-YRQ    TO MDST-YRQ.                                DTSBE614
00348      SET  MDST-DST-88 TO TRUE.                                    DTSBE614
00349      MOVE MDST-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE614
00350                                                                   DTSBE614
00351      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE614
00352      IF L910-OK-88                                                DTSBE614
00353         PERFORM P2100-SCAN-MDST THRU P2100-EXIT                   DTSBE614
00354             UNTIL WRK-MDST-NO-REC-88.                             DTSBE614
00355                                                                   DTSBE614
00356  P2000-EXIT.                                                      DTSBE614
00357      EXIT.                                                        DTSBE614
00358      EJECT                                                        DTSBE614
00359  P2100-SCAN-MDST.                                                 DTSBE614
00360      MOVE MSKL-REC TO MDST-REC.                                   DTSBE614
00361                                                                   DTSBE614
00362      IF MDST-YRQ = MQTR-YRQ                                       DTSBE614
00363         NEXT SENTENCE                                             DTSBE614
00364      ELSE                                                         DTSBE614
00365         IF MDST-YRQ > MQTR-YRQ                                    DTSBE614
00366            SET WRK-MDST-NO-REC-88 TO TRUE                         DTSBE614
00367            GO TO P2100-EXIT                                       DTSBE614
00368         ELSE                                                      DTSBE614
00369            GO TO P2100-READ-NEXT                                  DTSBE614
00370         END-IF                                                    DTSBE614
00371      END-IF.                                                      DTSBE614
00372                                                                   DTSBE614
00373      MOVE ZERO                  TO WRK-PROCESSED-DATE.            DTSBE614
00374      PERFORM P2110-READ-MPAY    THRU P2110-EXIT.                  DTSBE614
00375                                                                   DTSBE614
00376      PERFORM P2120-SUM-PAYMENTS THRU P2120-EXIT.                  DTSBE614
00377                                                                   DTSBE614
00378  P2100-READ-NEXT.                                                 DTSBE614
00379      MOVE MDST-REC TO MSKL-REC.                                   DTSBE614
00380      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE614
00381      PERFORM S910-READ-NEXT    THRU S910-EXIT.                    DTSBE614
00382      IF L910-NO-REC-88                                            DTSBE614
00383         SET WRK-MDST-NO-REC-88 TO TRUE.                           DTSBE614
00384                                                                   DTSBE614
00385  P2100-EXIT.                                                      DTSBE614
00386      EXIT.                                                        DTSBE614
00387                                                                   DTSBE614
00388  P2110-READ-MPAY.                                                 DTSBE614
00389      MOVE LOW-VALUES           TO MPAY-KEY-AREA.                  DTSBE614
00390      MOVE MPRF-EMP-NO          TO MPAY-EMP-NO.                    DTSBE614
00391      MOVE MDST-DOC-NO          TO MPAY-DOC-NO.                    DTSBE614
00392      SET  MPAY-PAY-88          TO TRUE.                           DTSBE614
00393      MOVE MPAY-KEY-AREA        TO MSKL-KEY-AREA.                  DTSBE614
00394                                                                   DTSBE614
00395      PERFORM S910-READ         THRU S910-EXIT.                    DTSBE614
00396      IF L910-OK-88                                                DTSBE614
00397         MOVE MSKL-REC          TO MPAY-REC                        DTSBE614
00398         MOVE MPAY-ESTB-DATE    TO WRK-PROCESSED-DATE.             DTSBE614
00399                                                                   DTSBE614
00400  P2110-EXIT.                                                      DTSBE614
00401      EXIT.                                                        DTSBE614
00402                                                                   DTSBE614
00403  P2120-SUM-PAYMENTS.                                              DTSBE614
00404      PERFORM                                                      DTSBE614
00405         VARYING MDST-ACCT-IDX FROM +1 BY +1                       DTSBE614
00406         UNTIL MDST-ACCT-IDX > MDST-ACCT-CNT                       DTSBE614
00407            ADD MDST-AMT (MDST-ACCT-IDX)    TO WRK-TOT-PAYMENT     DTSBE614
00408            IF WRK-PROCESSED-DATE < WRK-PARM-START-DATE            DTSBE614
00409            OR WRK-PROCESSED-DATE > WRK-PARM-END-DATE              DTSBE614
00410               CONTINUE                                            DTSBE614
00411            ELSE                                                   DTSBE614
00412               ADD MDST-AMT (MDST-ACCT-IDX) TO WRK-CURR-PAYMENT    DTSBE614
00413            END-IF                                                 DTSBE614
00414      END-PERFORM.                                                 DTSBE614
00415                                                                   DTSBE614
00416  P2120-EXIT.                                                      DTSBE614
00417      EXIT.                                                        DTSBE614
00418                                                                   DTSBE614
00419  P3000-BUILD-R614.                                                DTSBE614
00420      PERFORM P3100-GET-FIELD-REP     THRU P3100-EXIT.             DTSBE614
00421      MOVE L061-FLD-REP-ID            TO R614-FIELD-REP-ID.        DTSBE614
00422                                                                   DTSBE614
00423      MOVE MPRF-EMP-NO                TO R614-EMP-NO.              DTSBE614
00424      MOVE MQTR-YRQ                   TO R614-YRQ.                 DTSBE614
00425                                                                   DTSBE614
00426      INITIALIZE R614-DATA-AREA.                                   DTSBE614
00427                                                                   DTSBE614
00428      MOVE WRK-TOT-PAYMENT            TO R614-TOT-PAYMENT.         DTSBE614
00429      MOVE WRK-CURR-PAYMENT           TO R614-CURR-PAYMENT.        DTSBE614
00430      MOVE MPRF-PRIMARY-NAME          TO R614-PRIMARY-NAME.        DTSBE614
00431      MOVE WRK-PARM-START-DATE        TO R614-PARM-START-DATE.     DTSBE614
00432      MOVE WRK-PARM-END-DATE          TO R614-PARM-END-DATE.       DTSBE614
00433                                                                   DTSBE614
00434      PERFORM S946-WRITE-R614 THRU S946-EXIT.                      DTSBE614
00435                                                                   DTSBE614
00436  P3000-EXIT.                                                      DTSBE614
00437      EXIT.                                                        DTSBE614
00438                                                                   DTSBE614
00439  P3100-GET-FIELD-REP.                                             DTSBE614
00440      MOVE MPRF-FLD-ZIP    TO L061-FLD-ZIP.                        DTSBE614
00441      MOVE MPRF-FLD-ST     TO L061-FLD-ST.                         DTSBE614
00442      MOVE MPRF-EMP-NO     TO L061-EMP-NO.                         DTSBE614
00443                                                                   DTSBE614
00444      PERFORM S061-DETERMINE-FLD-ZIP THRU S061-EXIT.               DTSBE614
00445                                                                   DTSBE614
00446  P3100-EXIT.                                                      DTSBE614
00447      EXIT.                                                        DTSBE614
00448                                                                   DTSBE614
00449      EJECT                                                        DTSBE614
00450  S001-FROM-CAL-6.                                                 DTSBE614
00451      SET L001-FROM-CAL-6 TO TRUE.                                 DTSBE614
00452      GO TO S001-DATE.                                             DTSBE614
00453      SKIP1                                                        DTSBE614
00454  S001-FROM-FED-8.                                                 DTSBE614
00455      SET L001-FROM-FED-8 TO TRUE.                                 DTSBE614
00456      GO TO S001-DATE.                                             DTSBE614
00457      SKIP1                                                        DTSBE614
00458  S001-FROM-ABS-DAY.                                               DTSBE614
00459      SET L001-FROM-ABS-DAY TO TRUE.                               DTSBE614
00460      GO TO S001-DATE.                                             DTSBE614
00461      SKIP1                                                        DTSBE614
00462  S001-DATE.                                                       DTSBE614
00463      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBE614
00464  S001-EXIT.                                                       DTSBE614
00465      EXIT.                                                        DTSBE614
00466      SKIP3                                                        DTSBE614
00467  S061-DETERMINE-FLD-ZIP.                                          DTSBE614
00468      CALL 'DTSBU061' USING L061-LINK-AREA.                        DTSBE614
00469  S061-EXIT.                                                       DTSBE614
00470      EXIT.                                                        DTSBE614
00471      SKIP3                                                        DTSBE614
00472  S910-READ.                                                       DTSBE614
00473      SET L910-READ-88 TO TRUE.                                    DTSBE614
00474      GO TO S910-MSTR-IO.                                          DTSBE614
00475      SKIP1                                                        DTSBE614
00476  S910-START-BROWSE.                                               DTSBE614
00477      SET L910-START-BROWSE-88 TO TRUE.                            DTSBE614
00478      GO TO S910-MSTR-IO.                                          DTSBE614
00479      SKIP1                                                        DTSBE614
00480  S910-READ-NEXT.                                                  DTSBE614
00481      SET L910-READ-NEXT-88 TO TRUE.                               DTSBE614
00482      GO TO S910-MSTR-IO.                                          DTSBE614
00483      SKIP1                                                        DTSBE614
00484 *S910-COUNT.                                                      DTSBE614
00485 *    SET L910-COUNT-88 TO TRUE.                                   DTSBE614
00486 *    GO TO S910-MSTR-IO.                                          DTSBE614
00487      SKIP1                                                        DTSBE614
00488  S910-MSTR-IO.                                                    DTSBE614
00489      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBE614
00490                            MSKL-REC.                              DTSBE614
00491  S910-EXIT.                                                       DTSBE614
00492      EXIT.                                                        DTSBE614
00493      SKIP3                                                        DTSBE614
00494  S946-WRITE-R614.                                                 DTSBE614
00495      CALL 'DTSBU946' USING R614-REC.                              DTSBE614
00496  S946-EXIT.                                                       DTSBE614
00497      EXIT.                                                        DTSBE614
00498      SKIP3                                                        DTSBE614
00499  S999-ABEND.                                                      DTSBE614
00500      DISPLAY '*** DTSBE614 ABENDING.  '   ABEND-MSG.              DTSBE614
00501      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBE614
00502  S999-EXIT.                                                       DTSBE614
00503      EXIT.                                                        DTSBE614
00504      EJECT                                                        DTSBE614
00505  T0000-TERMINATE.                                                 DTSBE614
00506      SKIP1                                                        DTSBE614
00507      CONTINUE.                                                    DTSBE614
00508      SKIP1                                                        DTSBE614
00509  T0000-EXIT.                                                      DTSBE614
00510      EXIT.                                                        DTSBE614
