00001  IDENTIFICATION DIVISION.                                         10/15/98
00002  PROGRAM-ID.             DTSBD399.                                DTSBD399
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV007
00004  DATE-WRITTEN.           JANUARY 1991.                            DTSBD399
00005  DATE-COMPILED.                                                   DTSBD399
00006      SKIP3                                                        DTSBD399
00007 *****                                                             DTSBD399
00008 *                                                                 DTSBD399
00009 *    FUNCTION:  HEADER RECORD NEXT/CURR/PRIOR MAINTENANCE.        DTSBD399
00010 *                                                                 DTSBD399
00011 *                                                                 DTSBD399
00012 *    MODIFICATION LOG:                                            DTSBD399
00013 *                                                                 DTSBD399
00014 *    01/25/92  INITIAL DEVELOPMENT.                               DTSBD399
00015 *              WORK ORDER:                      PROGRAMMER: TCL   DTSBD399
00016 *                                                                    CL**2
00017 *    10/15/1998  REVIEWED AND MODIFIED FOR DC.                       CL**2
00018 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH      CL**2
00019 *                                                                    CL**2
00020 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**2
00021 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**2
00022 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX      CL**2
00023 *                                                                 DTSBD399
00024 *                                                                 DTSBD399
00025 *  DESCRIPTION:                                                   DTSBD399
00026 *                                                                 DTSBD399
00027 *      UPDATE MHDR-LAST-USED-BATCH-NO AND MHDR-LAST-USED-         DTSBD399
00028 *      ASSIGN-NO (FROM CORRESPONDING LBCM FIELDS).                DTSBD399
00029 *                                                                 DTSBD399
00030 *      MODIFY THE MHDR-NEXT-DATA, MHDR-CURR-DATA, MHDR-PRIOR-DATA,DTSBD399
00031 *      AND MHDR-CMPL-*-DATA AREAS.  USE THE DATE EDIT/CONVERSION  DTSBD399
00032 *      AND HOLIDAY MODULES TO DETERMINE THE NEXT WORKING DAY,     DTSBD399
00033 *      NEXT MAIL DATE, WHEN THE LAST UPDATE RUN OF A PERIOD HAS   DTSBD399
00034 *      OCCURRED AND WHAT THE FIRST DATE AND LAST DATE OF THE      DTSBD399
00035 *      COMPLETED PERIODS ARE.                                     DTSBD399
00036 *                                                                 DTSBD399
00037 *      MODIFY MHDR-DEFAULT-RCV-DATE.  THE LOGIC IS A BIT TRICKY.  DTSBD399
00038 *      SEE MHDR-DEFAULT-RCV-DATE DATA ELEMENT DEFINITION.         DTSBD399
00039 *                                                                 DTSBD399
00040 *      WRITE A R904 RECORD REFLECTING THE BEFORE/AFTER MHDR       DTSBD399
00041 *      RECORD VALUES.                                             DTSBD399
00042 *                                                                 DTSBD399
00043 *                                                                 DTSBD399
00044 *      MASTER FILE RECORDS READ:                                  DTSBD399
00045 *                                                                 DTSBD399
00046 *        NONE                                                     DTSBD399
00047 *                                                                 DTSBD399
00048 *                                                                 DTSBD399
00049 *      MASTER FILE RECORDS UPDATED:                               DTSBD399
00050 *                                                                 DTSBD399
00051 *        NONE                                                     DTSBD399
00052 *                                                                 DTSBD399
00053 *                                                                 DTSBD399
00054 *      REPORT RECORDS WRITTEN:                                    DTSBD399
00055 *                                                                 DTSBD399
00056 *        R904  DAILY UPDATE CONTROL.                              DTSBD399
00057 *                                                                 DTSBD399
00058 *                                                                 DTSBD399
00059 *      MODULES CALLED:                                            DTSBD399
00060 *                                                                 DTSBD399
00061 *        DTSBU001 DATE EDIT/CONVERSION.                              CL**2
00062 *        DTSBU003 HOLIDAY DETERMINATION.                             CL**2
00063 *        DTSBU004 QUARTER EDIT/CONVERSION.                           CL**2
00064 *        DTSBU946 VARIABLE LENGTH RECORD SEQUENTIAL OUTPUT 1.        CL**2
00065 *                                                                 DTSBD399
00066 *                                                                 DTSBD399
00067 *****                                                             DTSBD399
00068      SKIP3                                                        DTSBD399
00069  ENVIRONMENT DIVISION.                                            DTSBD399
00070      EJECT                                                        DTSBD399
00071  DATA DIVISION.                                                   DTSBD399
00072      SKIP3                                                        DTSBD399
00073  WORKING-STORAGE SECTION.                                         DTSBD399
000735 77  PAN-VALET PICTURE X(24) VALUE '007DTSBD399  10/15/98'.       DTSBD399
00074      SKIP3                                                        DTSBD399
00075  01  WRK-AREA.                                                    DTSBD399
00076      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +399.DTSBD399
00077                                                                      CL**2
00078      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBD399'.   CL**2
00079                                                                      CL**2
00080      05  WRK-R904-AREA               PIC S9(04)  COMP.            DTSBD399
00081                                                                      CL**2
00082      05  WRK-LAST-USED-ASSIGN-NO     PIC  9(09).                  DTSBD399
00083      05  FILLER REDEFINES WRK-LAST-USED-ASSIGN-NO.                DTSBD399
00084          10  WRK-LAST-USED-ASSIGN-YEAR   PIC  9(04).              DTSBD399
00085          10  WRK-LAST-USED-ASSIGN-SEQ    PIC  9(05).              DTSBD399
00086                                                                      CL**2
00087      05  WRK-LAST-USED-LEVY-NO       PIC  9(08).                     CL**2
00088      05  FILLER REDEFINES WRK-LAST-USED-LEVY-NO.                     CL**2
00089          10  WRK-LAST-USED-LEVY-YEAR     PIC  9(04).                 CL**2
00090          10  WRK-LAST-USED-LEVY-SEQ      PIC  9(04).                 CL**2
00091                                                                      CL**2
00092      05  WRK-LAST-USED-LIEN-NO       PIC  9(08).                     CL**2
00093      05  FILLER REDEFINES WRK-LAST-USED-LIEN-NO.                     CL**2
00094          10  WRK-LAST-USED-LIEN-YEAR     PIC  9(04).                 CL**2
00095          10  WRK-LAST-USED-LIEN-SEQ      PIC  9(04).                 CL**2
00096                                                                      CL**2
00097      05  WRK-LAST-USED-REFUND-NO     PIC  9(08).                     CL**2
00098      05  FILLER REDEFINES WRK-LAST-USED-REFUND-NO.                   CL**2
00099          10  WRK-LAST-USED-REFUND-YEAR   PIC  9(04).                 CL**2
00100          10  WRK-LAST-USED-REFUND-SEQ    PIC  9(04).                 CL**2
00101                                                                      CL**2
00102      05  WRK-WORK-DAY-CNT            PIC S9(04)  COMP.            DTSBD399
00103      SKIP3                                                        DTSBD399
00104  01  R904-REC.                                                    DTSBD399
00105  ++INCLUDE DTSIR904                                                  CL**2
00106      EJECT                                                        DTSBD399
00107  01  L001-LINK-AREA.                                              DTSBD399
00108  ++INCLUDE DTSIL001                                                  CL**2
00109      EJECT                                                        DTSBD399
00110  01  L003-LINK-AREA.                                              DTSBD399
00111  ++INCLUDE DTSIL003                                                  CL**2
00112      EJECT                                                        DTSBD399
00113  01  L004-LINK-AREA.                                              DTSBD399
00114  ++INCLUDE DTSIL004                                                  CL**2
00115      EJECT                                                        DTSBD399
00116  LINKAGE SECTION.                                                 DTSBD399
00117      SKIP3                                                        DTSBD399
00118  01  LBCM-LINK-AREA.                                              DTSBD399
00119  ++INCLUDE DTSILBCM                                                  CL**2
00120      EJECT                                                        DTSBD399
00121  01  MHDR-REC.                                                    DTSBD399
00122  ++INCLUDE DTSIMHDR                                                  CL**2
00123      EJECT                                                        DTSBD399
00124  PROCEDURE DIVISION USING LBCM-LINK-AREA                          DTSBD399
00125                           MHDR-REC.                               DTSBD399
00126                                                                      CL**2
00127                                                                      CL**2
00128      PERFORM P1000-PROCESS THRU P1000-EXIT.                       DTSBD399
00129                                                                      CL**2
00130                                                                      CL**2
00131      GOBACK.                                                      DTSBD399
00132      EJECT                                                        DTSBD399
00133  P1000-PROCESS.                                                   DTSBD399
00134                                                                      CL**2
00135      MOVE 1 TO WRK-R904-AREA.                                        CL**3
00136                                                                      CL**3
00137      PERFORM P1100-R904-REC THRU P1100-EXIT.                         CL**3
00138                                                                      CL**2
00139      PERFORM P1300-CHK-WEEK-DATA THRU P1300-EXIT.                    CL**3
00140                                                                      CL**3
00141      PERFORM P1400-CHK-MONTH-DATA THRU P1400-EXIT.                DTSBD399
00142                                                                      CL**3
00143      PERFORM P1500-CHK-QTR-DATA THRU P1500-EXIT.                     CL**3
00144                                                                      CL**3
00145      PERFORM P1600-CHK-YEAR-DATA THRU P1600-EXIT.                    CL**3
00146                                                                      CL**2
00147      MOVE LBCM-LAST-USED-ASSIGN-NO TO MHDR-LAST-USED-ASSIGN-NO.   DTSBD399
00148                                                                      CL**2
00149      MOVE LBCM-LAST-BATCH-NO TO MHDR-LAST-USED-BATCH-NO.          DTSBD399
00150                                                                      CL**3
00151      MOVE LBCM-LAST-USED-LEVY-NO TO MHDR-LAST-USED-LEVY-NO.          CL**5
00152                                                                      CL**3
00153      MOVE LBCM-LAST-USED-LIEN-NO TO MHDR-LAST-USED-LIEN-NO.          CL**5
00154                                                                      CL**3
00155      MOVE LBCM-LAST-USED-REFUND-NO TO MHDR-LAST-USED-REFUND-NO.      CL**5
00156                                                                      CL**2
00157      MOVE MHDR-CURR-RUN-DATE TO MHDR-PRIOR-RUN-DATE.                 CL**3
00158                                                                      CL**3
00159      MOVE MHDR-CURR-MAIL-DATE TO MHDR-PRIOR-MAIL-DATE.               CL**3
00160                                                                      CL**2
00161      MOVE MHDR-NEXT-RUN-DATE TO MHDR-CURR-RUN-DATE.                  CL**3
00162                                                                      CL**3
00163      MOVE MHDR-NEXT-MAIL-DATE TO MHDR-CURR-MAIL-DATE                 CL**3
00164                                  MHDR-NEXT-RUN-DATE.                 CL**3
00165                                                                      CL**2
00166      PERFORM P1200-NEXT-MAIL THRU P1200-EXIT.                        CL**3
00167                                                                      CL**2
00168      PERFORM P2000-LAST-USED-ASSIGN-NO THRU P2000-EXIT.           DTSBD399
00169                                                                      CL**2
00170      PERFORM P3000-DEFAULT-RCV-DATE THRU P3000-EXIT.              DTSBD399
00171                                                                      CL**2
00172      PERFORM P4000-LAST-USED-LEVY-NO THRU P4000-EXIT.                CL**3
00173                                                                      CL**3
00174      PERFORM P5000-LAST-USED-LIEN-NO THRU P5000-EXIT.                CL**3
00175                                                                      CL**3
00176      PERFORM P6000-LAST-USED-REFUND-NO THRU P6000-EXIT.              CL**3
00177                                                                      CL**3
00178                                                                      CL**3
00179      MOVE 2 TO WRK-R904-AREA.                                        CL**3
00180                                                                      CL**3
00181      PERFORM P1100-R904-REC THRU P1100-EXIT.                         CL**3
00182                                                                      CL**2
00183      PERFORM S946-R904-REC THRU S946-EXIT.                           CL**3
00184  P1000-EXIT.                                                      DTSBD399
00185      EXIT.                                                        DTSBD399
00186      SKIP3                                                        DTSBD399
00187  P1100-R904-REC.                                                  DTSBD399
00188      MOVE LENGTH OF R904-REC TO R904-LENGTH.                         CL**7
00189                                                                      CL**7
00190      MOVE LBCM-RUN-TYPE TO R904-RUN-TYPE.                            CL**3
00191                                                                      CL**3
00192      MOVE MHDR-NEXT-DATA TO R904-NEXT-DATA(WRK-R904-AREA).           CL**3
00193                                                                      CL**3
00194      MOVE MHDR-CURR-DATA TO R904-CURR-DATA(WRK-R904-AREA).           CL**3
00195                                                                      CL**3
00196      MOVE MHDR-PRIOR-DATA TO R904-PRIOR-DATA(WRK-R904-AREA).         CL**3
00197                                                                      CL**3
00198      MOVE MHDR-CMPL-WEEK-DATA                                        CL**3
00199        TO R904-CMPL-WEEK-DATA(WRK-R904-AREA).                        CL**3
00200                                                                      CL**3
00201      MOVE MHDR-CMPL-MONTH-DATA                                       CL**3
00202        TO R904-CMPL-MONTH-DATA(WRK-R904-AREA).                       CL**3
00203                                                                      CL**3
00204      MOVE MHDR-CMPL-QTR-DATA                                         CL**3
00205        TO R904-CMPL-QTR-DATA(WRK-R904-AREA).                         CL**3
00206                                                                      CL**3
00207      MOVE MHDR-CMPL-YEAR-DATA                                        CL**3
00208        TO R904-CMPL-YEAR-DATA(WRK-R904-AREA).                        CL**3
00209                                                                      CL**3
00210      MOVE MHDR-MISC-DATA TO R904-MISC-DATA(WRK-R904-AREA).           CL**3
00211                                                                      CL**3
00212      MOVE MHDR-REPORT-DATA                                        DTSBD399
00213        TO R904-REPORT-DATA (WRK-R904-AREA).                       DTSBD399
00214                                                                      CL**3
00215      MOVE MHDR-RATE-DATA                                          DTSBD399
00216        TO R904-RATE-DATA (WRK-R904-AREA).                         DTSBD399
00217                                                                      CL**3
00218      MOVE MHDR-LAST-MJRN-PURGE-DATE                               DTSBD399
00219        TO R904-LAST-MJRN-PURGE-DATE (WRK-R904-AREA).              DTSBD399
00220  P1100-EXIT.                                                      DTSBD399
00221      EXIT.                                                        DTSBD399
00222      SKIP3                                                        DTSBD399
00223  P1200-NEXT-MAIL.                                                 DTSBD399
00224      MOVE MHDR-NEXT-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00225                                                                      CL**3
00226      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBD399
00227                                                                      CL**3
00228      ADD  +1  TO L001-JUL-ABS-DAY.                                DTSBD399
00229                                                                      CL**3
00230      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00231                                                                      CL**3
00232      MOVE L001-FED-8-DATE-9 TO L003-DATE.                         DTSBD399
00233                                                                      CL**3
00234      PERFORM S003-AGENCY-DAY THRU S003-EXIT.                      DTSBD399
00235                                                                      CL**3
00236      PERFORM P1210-DATE-LOOP THRU P1210-EXIT                      DTSBD399
00237              UNTIL L003-IS-WORK-DAY.                              DTSBD399
00238                                                                      CL**3
00239      MOVE L001-FED-8-DATE-9 TO MHDR-NEXT-MAIL-DATE.                  CL**3
00240  P1200-EXIT.                                                      DTSBD399
00241      EXIT.                                                        DTSBD399
00242      SKIP3                                                        DTSBD399
00243  P1210-DATE-LOOP.                                                 DTSBD399
00244      ADD  +1  TO L001-JUL-ABS-DAY.                                DTSBD399
00245                                                                      CL**3
00246      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00247                                                                      CL**3
00248      MOVE L001-FED-8-DATE-9 TO L003-DATE.                         DTSBD399
00249                                                                      CL**3
00250      PERFORM S003-AGENCY-DAY THRU S003-EXIT.                      DTSBD399
00251  P1210-EXIT.                                                      DTSBD399
00252      EXIT.                                                        DTSBD399
00253      SKIP3                                                        DTSBD399
00254  P1300-CHK-WEEK-DATA.                                             DTSBD399
00255      MOVE MHDR-CMPL-WEEK-END-DATE TO L001-FED-8-DATE-9.              CL**3
00256                                                                      CL**3
00257      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBD399
00258                                                                      CL**3
00259      ADD +7 TO L001-JUL-ABS-DAY.                                  DTSBD399
00260                                                                      CL**3
00261      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00262                                                                      CL**3
00263      IF MHDR-NEXT-RUN-DATE > L001-FED-8-DATE-9                    DTSBD399
00264         PERFORM P1310-SET-WEEK-DATA THRU P1310-EXIT.                 CL**3
00265  P1300-EXIT.                                                      DTSBD399
00266      EXIT.                                                        DTSBD399
00267      SKIP3                                                        DTSBD399
00268  P1310-SET-WEEK-DATA.                                             DTSBD399
00269      MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-WEEK-END-DATE.           DTSBD399
00270                                                                      CL**3
00271      SUBTRACT 6 FROM L001-JUL-ABS-DAY.                            DTSBD399
00272                                                                      CL**3
00273      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00274                                                                      CL**3
00275      MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-WEEK-BEGIN-DATE.         DTSBD399
00276  P1310-EXIT.                                                      DTSBD399
00277      EXIT.                                                        DTSBD399
00278      SKIP3                                                        DTSBD399
00279  P1400-CHK-MONTH-DATA.                                            DTSBD399
00280      MOVE MHDR-NEXT-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00281                                                                      CL**3
00282      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBD399
00283                                                                      CL**3
00284      COMPUTE L001-JUL-ABS-DAY = L001-JUL-ABS-DAY                  DTSBD399
00285                                   - L001-FED-8-DA.                   CL**3
00286                                                                      CL**2
00287      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00288                                                                      CL**3
00289      MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-MONTH-END-DATE.          DTSBD399
00290                                                                      CL**3
00291      MOVE '01' TO L001-FED-8-DA.                                  DTSBD399
00292                                                                      CL**3
00293      MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-MONTH-BEGIN-DATE.        DTSBD399
00294   P1400-EXIT.                                                     DTSBD399
00295      EXIT.                                                        DTSBD399
00296      EJECT                                                        DTSBD399
00297  P1500-CHK-QTR-DATA.                                              DTSBD399
00298      MOVE MHDR-NEXT-RUN-DATE TO L004-DATE.                           CL**3
00299                                                                      CL**3
00300      PERFORM S004-FROM-DATE THRU S004-EXIT.                       DTSBD399
00301                                                                   DTSBD399
00302      SUBTRACT 1 FROM L004-ABS-QTR.                                   CL**3
00303                                                                      CL**3
00304      PERFORM S004-FROM-ABS THRU S004-EXIT.                        DTSBD399
00305                                                                   DTSBD399
00306      IF L004-QTR-START-DATE > MHDR-CMPL-QTR-BEGIN-DATE            DTSBD399
00307         MOVE L004-QTR-START-DATE TO MHDR-CMPL-QTR-BEGIN-DATE      DTSBD399
00308         MOVE L004-QTR-END-DATE TO MHDR-CMPL-QTR-END-DATE.            CL**3
00309  P1500-EXIT.                                                      DTSBD399
00310      EXIT.                                                        DTSBD399
00311      SKIP3                                                        DTSBD399
00312  P1600-CHK-YEAR-DATA.                                             DTSBD399
00313      MOVE MHDR-NEXT-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00314                                                                      CL**3
00315      SUBTRACT 1 FROM L001-FED-8-YR.                                  CL**3
00316                                                                      CL**3
00317      IF L001-FED-8-DATE-9 > MHDR-CMPL-YEAR-END-DATE               DTSBD399
00318         MOVE 01 TO L001-FED-8-DA                                     CL**3
00319                    L001-FED-8-MO                                     CL**3
00320         MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-YEAR-BEGIN-DATE          CL**3
00321         MOVE 31 TO L001-FED-8-DA                                     CL**3
00322         MOVE 12 TO L001-FED-8-MO                                     CL**3
00323         MOVE L001-FED-8-DATE-9 TO MHDR-CMPL-YEAR-END-DATE.           CL**3
00324  P1600-EXIT.                                                      DTSBD399
00325      EXIT.                                                        DTSBD399
00326      EJECT                                                        DTSBD399
00327  P2000-LAST-USED-ASSIGN-NO.                                       DTSBD399
00328      MOVE MHDR-CURR-RUN-DATE TO L001-FED-8-DATE-9.                DTSBD399
00329                                                                      CL**3
00330      MOVE MHDR-LAST-USED-ASSIGN-NO TO WRK-LAST-USED-ASSIGN-NO.    DTSBD399
00331                                                                      CL**3
00332      IF L001-FED-8-YR > WRK-LAST-USED-ASSIGN-YEAR                 DTSBD399
00333          MOVE L001-FED-8-YR TO WRK-LAST-USED-ASSIGN-YEAR          DTSBD399
00334          MOVE 0 TO WRK-LAST-USED-ASSIGN-SEQ                       DTSBD399
00335          MOVE WRK-LAST-USED-ASSIGN-NO                             DTSBD399
00336            TO MHDR-LAST-USED-ASSIGN-NO.                           DTSBD399
00337  P2000-EXIT.                                                      DTSBD399
00338      EXIT.                                                        DTSBD399
00339      EJECT                                                        DTSBD399
00340  P3000-DEFAULT-RCV-DATE.                                          DTSBD399
00341      MOVE MHDR-LAST-UC30-MASS-MAIL-YRQ TO L004-QTR-5-9.              CL**5
00342                                                                      CL**3
00343      PERFORM S004-FROM-5 THRU S004-EXIT.                          DTSBD399
00344                                                                      CL**2
00345      MOVE L004-QTR-DEFAULT-DUE-DATE TO L001-FED-8-DATE-9.         DTSBD399
00346                                                                      CL**3
00347      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBD399
00348                                                                      CL**2
00349      MOVE +0 TO WRK-WORK-DAY-CNT.                                 DTSBD399
00350                                                                      CL**3
00351      PERFORM P3100-WORK-DAY-LOOP THRU P3100-EXIT                  DTSBD399
00352          UNTIL WRK-WORK-DAY-CNT > +4.                             DTSBD399
00353                                                                      CL**2
00354      IF (MHDR-CURR-RUN-DATE > L001-FED-8-DATE-9)                  DTSBD399
00355               OR                                                  DTSBD399
00356         (MHDR-CURR-RUN-DATE < L004-QTR-DEFAULT-DUE-DATE)          DTSBD399
00357          MOVE MHDR-CURR-RUN-DATE TO MHDR-DEFAULT-RCV-DATE         DTSBD399
00358      ELSE                                                         DTSBD399
00359          MOVE L004-QTR-DEFAULT-DUE-DATE TO MHDR-DEFAULT-RCV-DATE. DTSBD399
00360  P3000-EXIT.                                                      DTSBD399
00361      EXIT.                                                        DTSBD399
00362      SKIP3                                                        DTSBD399
00363  P3100-WORK-DAY-LOOP.                                             DTSBD399
00364      ADD +1 TO L001-JUL-ABS-DAY.                                  DTSBD399
00365                                                                      CL**3
00366      PERFORM S001-FROM-ABS-DAY THRU S001-EXIT.                    DTSBD399
00367                                                                      CL**3
00368      MOVE L001-FED-8-DATE-9 TO L003-DATE.                         DTSBD399
00369                                                                      CL**3
00370      PERFORM S003-AGENCY-DAY THRU S003-EXIT.                      DTSBD399
00371                                                                      CL**3
00372      IF L003-IS-WORK-DAY                                          DTSBD399
00373          ADD +1 TO WRK-WORK-DAY-CNT.                              DTSBD399
00374  P3100-EXIT.                                                      DTSBD399
00375      EXIT.                                                        DTSBD399
00376      EJECT                                                        DTSBD399
00377  P4000-LAST-USED-LEVY-NO.                                            CL**3
00378      MOVE MHDR-CURR-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00379                                                                      CL**3
00380      MOVE MHDR-LAST-USED-LEVY-NO TO WRK-LAST-USED-LEVY-NO.           CL**3
00381                                                                      CL**3
00382      IF L001-FED-8-YR > WRK-LAST-USED-LEVY-YEAR                      CL**3
00383          MOVE L001-FED-8-YR TO WRK-LAST-USED-LEVY-YEAR               CL**3
00384          MOVE 0 TO WRK-LAST-USED-LEVY-SEQ                            CL**3
00385          MOVE WRK-LAST-USED-LEVY-NO                                  CL**3
00386            TO MHDR-LAST-USED-LEVY-NO.                                CL**3
00387  P4000-EXIT.                                                         CL**3
00388      EXIT.                                                           CL**3
00389      EJECT                                                           CL**3
00390  P5000-LAST-USED-LIEN-NO.                                            CL**3
00391      MOVE MHDR-CURR-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00392                                                                      CL**3
00393      IF L001-FED-8-MO = 10 OR 11 OR 12                               CL**4
00394          ADD 1 TO L001-FED-8-YR.                                     CL**4
00395                                                                      CL**4
00396      MOVE MHDR-LAST-USED-LIEN-NO TO WRK-LAST-USED-LIEN-NO.           CL**3
00397                                                                      CL**3
00398      IF L001-FED-8-YR > WRK-LAST-USED-LIEN-YEAR                      CL**4
00399          MOVE L001-FED-8-YR TO WRK-LAST-USED-LIEN-YEAR               CL**4
00400          MOVE 0 TO WRK-LAST-USED-LIEN-SEQ                            CL**4
00401          MOVE WRK-LAST-USED-LIEN-NO                                  CL**4
00402            TO MHDR-LAST-USED-LIEN-NO.                                CL**4
00403  P5000-EXIT.                                                         CL**3
00404      EXIT.                                                           CL**3
00405      EJECT                                                           CL**3
00406  P6000-LAST-USED-REFUND-NO.                                          CL**4
00407      MOVE MHDR-CURR-RUN-DATE TO L001-FED-8-DATE-9.                   CL**3
00408                                                                      CL**3
00409      MOVE MHDR-LAST-USED-REFUND-NO TO WRK-LAST-USED-REFUND-NO.       CL**4
00410                                                                      CL**3
00411      IF L001-FED-8-YR > WRK-LAST-USED-REFUND-YEAR                    CL**4
00412          MOVE L001-FED-8-YR TO WRK-LAST-USED-REFUND-YEAR             CL**4
00413          MOVE 0 TO WRK-LAST-USED-REFUND-SEQ                          CL**4
00414          MOVE WRK-LAST-USED-REFUND-NO                                CL**4
00415            TO MHDR-LAST-USED-REFUND-NO.                              CL**4
00416  P6000-EXIT.                                                         CL**4
00417      EXIT.                                                           CL**3
00418      EJECT                                                           CL**3
00419  S001-FROM-FED-8.                                                 DTSBD399
00420      SET L001-FROM-FED-8 TO TRUE.                                 DTSBD399
00421      GO TO S001-DATE.                                             DTSBD399
00422                                                                      CL**2
00423  S001-FROM-ABS-DAY.                                               DTSBD399
00424      SET L001-FROM-ABS-DAY TO TRUE.                               DTSBD399
00425      GO TO S001-DATE.                                             DTSBD399
00426                                                                      CL**2
00427  S001-DATE.                                                       DTSBD399
00428      CALL 'DTSBU001' USING L001-LINK-AREA.                           CL**2
00429  S001-EXIT.                                                       DTSBD399
00430      EXIT.                                                        DTSBD399
00431      SKIP3                                                        DTSBD399
00432  S003-AGENCY-DAY.                                                 DTSBD399
00433      SET L003-AGENCY-DAY TO TRUE.                                 DTSBD399
00434      GO TO S003-WORK-DAY.                                         DTSBD399
00435                                                                      CL**2
00436  S003-WORK-DAY.                                                   DTSBD399
00437      CALL 'DTSBU003' USING L003-LINK-AREA.                           CL**2
00438  S003-EXIT.                                                       DTSBD399
00439      EXIT.                                                        DTSBD399
00440      SKIP3                                                        DTSBD399
00441  S004-FROM-5.                                                     DTSBD399
00442      SET L004-FROM-5 TO TRUE.                                     DTSBD399
00443      GO TO S004-QTR.                                              DTSBD399
00444                                                                      CL**2
00445  S004-FROM-ABS.                                                   DTSBD399
00446      SET L004-FROM-ABS TO TRUE.                                   DTSBD399
00447      GO TO S004-QTR.                                              DTSBD399
00448                                                                      CL**2
00449  S004-FROM-DATE.                                                  DTSBD399
00450      SET L004-FROM-DATE TO TRUE.                                  DTSBD399
00451      GO TO S004-QTR.                                              DTSBD399
00452                                                                      CL**2
00453  S004-QTR.                                                        DTSBD399
00454      CALL 'DTSBU004' USING L004-LINK-AREA.                           CL**2
00455  S004-EXIT.                                                       DTSBD399
00456      EXIT.                                                        DTSBD399
00457      SKIP3                                                        DTSBD399
00458  S946-R904-REC.                                                   DTSBD399
00459      CALL 'DTSBU946' USING R904-REC.                                 CL**2
00460  S946-EXIT.                                                       DTSBD399
00461      EXIT.                                                        DTSBD399
00462      SKIP3                                                        DTSBD399
00463 *S999-ABEND.                                                         CL**6
00464 *****CALL 'DTSBU999' USING WRK-ABEND-CD.                             CL**6
00465 *S999-EXIT.                                                          CL**6
00466 *****EXIT.                                                           CL**6
