00001  IDENTIFICATION DIVISION.                                         12/18/13
00002  PROGRAM-ID.             DTSBU516.                                DTSBU516
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV017
00004  DATE-WRITTEN.           JANUARY 1991.                            DTSBU516
00005  DATE-COMPILED.                                                   DTSBU516
00006      SKIP3                                                        DTSBU516
00007 *****                                                             DTSBU516
00008 *                                                                 DTSBU516
00009 *    FUNCTION:  DETERMINE LIABILITY, DUE DATE, AND RATE FOR       DTSBU516
00010 *               A GIVEN QUARTER.                                  DTSBU516
00011 *                                                                 DTSBU516
00012 *                                                                 DTSBU516
00013 *    MODIFICATION LOG:                                            DTSBU516
00014 *                                                                 DTSBU516
00015 *    01/25/92  INITIAL DEVELOPMENT.                               DTSBU516
00016 *              WORK ORDER:                      PROGRAMMER: TCL   DTSBU516
00017 *                                                                 DTSBU516
00018 *    06/05/95  CHANGE DUE DATE LOGIC.                             DTSBU516
00019 *              WORK ORDER: CR092                PROGRAMMER: RHC   DTSBU516
00020 *                                                                 DTSBU516
00021 *    10/09/1998  REVIEWED AND MODIFIED FOR DC.                    DTSBU516
00022 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH   DTSBU516
00023 *                                                                 DTSBU516
00024 *    02/26/1999  TO SUPPORT DC SELF INSURED TAX DUE DATE          DTSBU516
00025 *                REQUIREMENTS, CHANGED L516-DEFAULT-DUE-DATE      DTSBU516
00026 *                TO L516-DEFAULT-RPT-DUE-DATE AND ADDED           DTSBU516
00027 *                L516-DEFAULT-TAX-DUE-DATE.  ADDED LOGIC          DTSBU516
00028 *                TO LOOKUP DEFAULT SELF INSURED TAX DUE DATE      DTSBU516
00029 *                ON THE REFERENCE FILE.                           DTSBU516
00030 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH   DTSBU516
00031 *                                                                 DTSBU516
00032 *    10/31/2001  MODIFIED FOR HOUSEHOLD.  WILL RETURN EITHER      DTSBU516
00033 *                THE QUARTERLY DEFAULT REPORT DUE DATE OR THE     DTSBU516
00034 *                THE ANNUAL DEFAULT REPORT DUE DATE FOR THE       DTSBU516
00035 *                SUBJECT QUARTER, DEPENDING ON THE EMPLOYER'S     DTSBU516
00036 *                FILING SCHEDULE.  THE CALLING PROGRAM MAY SET    DTSBU516
00037 *                THE 'FORCE SCHEDULE' INDICATOR TO FIND THE       DTSBU516
00038 *                QUARTERLY OR ANNUAL DUE DATE REGARDLESS OF THE   DTSBU516
00039 *                EMPLOYER'S FILING SCHEDULE.                      DTSBU516
00040 *                REFERENCE: HOUSEHOLD           PROGRAMMER: GD    DTSBU516
00041 *                                                                 DTSBU516
00042 *    06/05/2013  ADDED P4000 TO CHECK FOR ANNUAL LIABILITY.       DTSBU516
00043 *                IF ANY QUARTER WITHIN THE YEAR IS LIABLE,        DTSBU516
00044 *                RETURN L516-LIABLE-88                            DTSBU516
00045 *                REFERENCE: TICKET 1780         PROGRAMMER: GD    DTSBU516
00046 *                                                                 DTSBU516
00047 *    07/17/2013  MODIFIED P0000 TO SET L410-NULL-SCHED-88 TO      DTSBU516
00048 *                TRUE BEFORE THE CALL TO P2000.  SINCE THE        DTSBU516
00049 *                L410-FILING-SCHED INDICATOR HAD NOT BEEN         DTSBU516
00050 *                INITIALIZED, THE PROCESS WAS OCCASIONALLY        DTSBU516
00051 *                CALLING P4000 FOR NON-ANNUAL EMPLOYERS.          DTSBU516
00052 *                THIS RESULTED IN A CHANGE IN THE                 DTSBU516
00053 *                L516-LIABLE-IND FROM NOT-LIABLE TO LIABLE        DTSBU516
00054 *                WHEN A QUARTER WITHIN THE YEAR WAS LIABLE.       DTSBU516
00055 *                REFERENCE: TICKET 1932         PROGRAMMER: GD    DTSBU516
00056 *                                                                 DTSBU516
00057 *    09/27/2013  MODIFIED TO SET L516-ANN-LIABLE-IND TO 'Y'       DTSBU516
00058 *                WHEN THE YEAR IS REPORTED ANNUALLY AND THE       DTSBU516
00059 *                EMPLOYER IS LIABLE FOR ONE OR MORE QUARTERS      DTSBU516
00060 *                DURING THE YEAR.  IF AN EMPLOYER'S LIABILITY     DTSBU516
00061 *                BEGAN IN THE MIDDLE OF A YEAR, THE EARLIER       DTSBU516
00062 *                QUARTERS WILL HAVE L516-LIABLE-IND SET TO        DTSBU516
00063 *                'N' WHILE L516-ANN-LIABLE-IND WILL BE SET        DTSBU516
00064 *                TO 'Y'.                                          DTSBU516
00065 *                REFERENCE: TICKET 2081         PROGRAMMER: GD    DTSBU516
00066 *                                                                 DTSBU516
00067 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU516
00068 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU516
00069 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DTSBU516
00070 *                                                                 DTSBU516
00071 *                                                                 DTSBU516
00072 *  DESCRIPTION:                                                   DTSBU516
00073 *                                                                 DTSBU516
00074 *      BROWSE MSOL RECORDS TO DETERMINE WHETHER OR NOT            DTSBU516
00075 *      WAS LIABLE DURING THE SUBJECT QUARTER.                     DTSBU516
00076 *                                                                 DTSBU516
00077 *      IF THE EMPLOYER IS LIABLE, THEN USE THE MSOL RECORD AND    DTSBU516
00078 *      DTSBU004 TO DETERMINE THE DEFAULT REPORT DUE DATE.         DTSBU516
00079 *                                                                 DTSBU516
00080 *      IF THE EMPLOYER IS TAXABLE, THEN CALL DTSBU006 TO DETERMINEDTSBU516
00081 *      THE RATE START-YRQ AND READ THE MRTE RECORD TO FIND        DTSBU516
00082 *      THE RATE FOR THE SUBJECT QUARTER.                          DTSBU516
00083 *                                                                 DTSBU516
00084 *                                                                 DTSBU516
00085 *      MASTER FILE RECORDS READ:                                  DTSBU516
00086 *                                                                 DTSBU516
00087 *        MSOL                                                     DTSBU516
00088 *        MRTE                                                     DTSBU516
00089 *        MFSC                                                     DTSBU516
00090 *                                                                 DTSBU516
00091 *                                                                 DTSBU516
00092 *      REFERENCE FILE RECORDS READ:                               DTSBU516
00093 *                                                                 DTSBU516
00094 *        FQTR                                                     DTSBU516
00095 *                                                                 DTSBU516
00096 *                                                                 DTSBU516
00097 *      MASTER FILE RECORDS UPDATED:                               DTSBU516
00098 *                                                                 DTSBU516
00099 *        NONE.                                                    DTSBU516
00100 *                                                                 DTSBU516
00101 *                                                                 DTSBU516
00102 *                                                                 DTSBU516
00103 *                                                                 DTSBU516
00104 *      REPORT RECORDS WRITTEN:                                    DTSBU516
00105 *                                                                 DTSBU516
00106 *        NONE                                                     DTSBU516
00107 *                                                                 DTSBU516
00108 *                                                                 DTSBU516
00109 *      MODULES CALLED:                                            DTSBU516
00110 *                                                                 DTSBU516
00111 *        DTSBU004 QUARTER EDIT/CONVERSION.                        DTSBU516
00112 *        DTSBU006 RATE QUARTER BEGIN/END.                         DTSBU516
00113 *        DTSBU410 FIND FILING SCHEDULE.                           DTSBU516
00114 *        DTSBU910 MASTER FILE I/O DRIVER.                         DTSBU516
00115 *        DTSBU931 REFERENCE FILE I/O DRIVER.                      DTSBU516
00116 *                                                                 DTSBU516
00117 *                                                                 DTSBU516
00118 *****                                                             DTSBU516
00119      SKIP3                                                        DTSBU516
00120  ENVIRONMENT DIVISION.                                            DTSBU516
00121      EJECT                                                        DTSBU516
00122  DATA DIVISION.                                                   DTSBU516
00123      SKIP3                                                        DTSBU516
00124  WORKING-STORAGE SECTION.                                         DTSBU516
001245 77  PAN-VALET PICTURE X(24) VALUE '017DTSBU516  12/18/13'.       DTSBU516
00125  77  PAN-VALET PICTURE X(24) VALUE '006DTSBU516  12/04/13'.       DTSBU516
00126  77  PAN-VALET PICTURE X(24) VALUE '015DTSBU516  07/17/13'.       DTSBU516
00127  77  PAN-VALET PICTURE X(24) VALUE '006DTSBU516  07/17/13'.       DTSBU516
00128  77  PAN-VALET PICTURE X(24) VALUE '013DTSBU516  07/01/13'.       DTSBU516
00129  77  PAN-VALET PICTURE X(24) VALUE '006DTSBU516  06/20/13'.       DTSBU516
00130  77  PAN-VALET PICTURE X(24) VALUE '011DTSBU516  11/11/02'.       DTSBU516
00131      SKIP3                                                        DTSBU516
00132  01  WRK-AREA.                                                    DTSBU516
00133      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +516.DTSBU516
00134                                                                   DTSBU516
00135      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBU516'.DTSBU516
00136                                                                   DTSBU516
00137      05  FIRST-TIME-IND              PIC  X(01)  VALUE 'Y'.       DTSBU516
00138                                                                   DTSBU516
00139      05  WRK-START-YRQ               PIC S9(05)  COMP-3           DTSBU516
00140                                        VALUE +0.                  DTSBU516
00141      05  WRK-END-YRQ                 PIC S9(05)  COMP-3           DTSBU516
00142                                        VALUE +0.                  DTSBU516
00143                                                                   DTSBU516
00144  01  L910-LINK-AREA.                                              DTSBU516
00145  ++INCLUDE DTSIL910                                               DTSBU516
00146      SKIP3                                                        DTSBU516
00147  01  MSKL-REC.                                                    DTSBU516
00148  ++INCLUDE DTSIMSKL                                               DTSBU516
00149      SKIP3                                                        DTSBU516
00150  01  MSOL-REC.                                                    DTSBU516
00151  ++INCLUDE DTSIMSOL                                               DTSBU516
00152      SKIP3                                                        DTSBU516
00153  01  MRTE-REC.                                                    DTSBU516
00154  ++INCLUDE DTSIMRTE                                               DTSBU516
00155      EJECT                                                        DTSBU516
00156  01  L931-LINK-AREA.                                              DTSBU516
00157  ++INCLUDE DTSIL931                                               DTSBU516
00158      SKIP3                                                        DTSBU516
00159  01  FSKL-REC.                                                    DTSBU516
00160  ++INCLUDE DTSIFSKL                                               DTSBU516
00161      SKIP3                                                        DTSBU516
00162  01  FQTR-REC.                                                    DTSBU516
00163  ++INCLUDE DTSIFQTR                                               DTSBU516
00164      EJECT                                                        DTSBU516
00165  01  L004-LINK-AREA.                                              DTSBU516
00166  ++INCLUDE DTSIL004                                               DTSBU516
00167      SKIP3                                                        DTSBU516
00168  01  L006-LINK-AREA.                                              DTSBU516
00169  ++INCLUDE DTSIL006                                               DTSBU516
00170      EJECT                                                        DTSBU516
00171  01  L410-LINK-AREA.                                              DTSBU516
00172  ++INCLUDE DTSIL410                                               DTSBU516
00173      EJECT                                                        DTSBU516
00174  LINKAGE SECTION.                                                 DTSBU516
00175      SKIP3                                                        DTSBU516
00176  01  L516-LINK-AREA.                                              DTSBU516
00177  ++INCLUDE DTSIL516                                               DTSBU516
00178      EJECT                                                        DTSBU516
00179  01  MPRF-REC.                                                    DTSBU516
00180  ++INCLUDE DTSIMPRF                                               DTSBU516
00181      EJECT                                                        DTSBU516
00182  PROCEDURE DIVISION USING L516-LINK-AREA                          DTSBU516
00183                           MPRF-REC.                               DTSBU516
00184                                                                   DTSBU516
00185                                                                   DTSBU516
00186      IF FIRST-TIME-IND = 'Y'                                      DTSBU516
00187          PERFORM I0000-INITIATE THRU I0000-EXIT                   DTSBU516
00188          MOVE 'N' TO FIRST-TIME-IND.                              DTSBU516
00189                                                                   DTSBU516
00190                                                                   DTSBU516
00191      SET L516-NOT-LIABLE-88        TO TRUE.                       DTSBU516
00192      SET L516-ANN-LIABLE-NULL-88   TO TRUE.                       DTSBU516
00193                                                                   DTSBU516
00194      SET L516-RATE-NOT-FOUND-88    TO TRUE.                       DTSBU516
00195                                                                   DTSBU516
00196      MOVE +0 TO L516-DEFAULT-RPT-DUE-DATE                         DTSBU516
00197                 L516-DEFAULT-TAX-DUE-DATE.                        DTSBU516
00198                                                                   DTSBU516
00199      MOVE -9.9999 TO L516-UI-RATE.                                DTSBU516
00200                                                                   DTSBU516
00201      SET L516-SCHED-NULL-88 TO TRUE.                              DTSBU516
00202                                                                   DTSBU516
00203      PERFORM P0000-PROCESS THRU P0000-EXIT.                       DTSBU516
00204                                                                   DTSBU516
00205                                                                   DTSBU516
00206      GOBACK.                                                      DTSBU516
00207      EJECT                                                        DTSBU516
00208  I0000-INITIATE.                                                  DTSBU516
00209      MOVE L516-TRACE-IND TO L910-TRACE-IND                        DTSBU516
00210                             L931-TRACE-IND.                       DTSBU516
00211                                                                   DTSBU516
00212      MOVE WRK-MOD-NAME TO L910-MOD-NAME                           DTSBU516
00213                           L931-MOD-NAME.                          DTSBU516
00214  I0000-EXIT.                                                      DTSBU516
00215      EXIT.                                                        DTSBU516
00216      EJECT                                                        DTSBU516
00217  P0000-PROCESS.                                                   DTSBU516
00218      MOVE LOW-VALUES TO MSOL-KEY-AREA.                            DTSBU516
00219      MOVE MPRF-EMP-NO TO MSOL-EMP-NO.                             DTSBU516
00220      SET MSOL-SOL-88 TO TRUE.                                     DTSBU516
00221      MOVE MSOL-KEY-AREA TO MSKL-KEY-AREA.                         DTSBU516
00222                                                                   DTSBU516
00223      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBU516
00224                                                                   DTSBU516
00225      PERFORM P1000-MSOL-SCAN THRU P1000-EXIT                      DTSBU516
00226          UNTIL (L516-LIABLE-88)                                   DTSBU516
00227                    OR                                             DTSBU516
00228                (L910-NO-REC-88).                                  DTSBU516
00229                                                                   DTSBU516
00230      SET L410-NULL-SCHED-88     TO TRUE.                          DTSBU516
00231      PERFORM P2000-DUE-DATE     THRU P2000-EXIT.                  DTSBU516
00232                                                                   DTSBU516
00233      PERFORM P3000-RATE THRU P3000-EXIT.                          DTSBU516
00234                                                                   DTSBU516
00235      IF L410-ANN-SCHED-88                                         DTSBU516
00236 ***  AND L516-NOT-LIABLE-88                                       DTSBU516
00237         PERFORM P4000-ANN-LIABILITY    THRU P4000-EXIT            DTSBU516
00238      END-IF.                                                      DTSBU516
00239                                                                   DTSBU516
00240  P0000-EXIT.                                                      DTSBU516
00241      EXIT.                                                        DTSBU516
00242      EJECT                                                        DTSBU516
00243  P1000-MSOL-SCAN.                                                 DTSBU516
00244      MOVE MSKL-REC TO MSOL-REC.                                   DTSBU516
00245                                                                   DTSBU516
00246      IF (L516-YRQ < MSOL-FIRST-LIAB-YRQ)                          DTSBU516
00247                OR                                                 DTSBU516
00248         (L516-YRQ > MSOL-LAST-LIAB-YRQ)                           DTSBU516
00249          PERFORM S910-READ-NEXT THRU S910-EXIT                    DTSBU516
00250      ELSE                                                         DTSBU516
00251          SET L516-LIABLE-88 TO TRUE.                              DTSBU516
00252  P1000-EXIT.                                                      DTSBU516
00253      EXIT.                                                        DTSBU516
00254      EJECT                                                        DTSBU516
00255  P2000-DUE-DATE.                                                  DTSBU516
00256      IF MPRF-ORG-HSEHLD-DMSTIC-88                                 DTSBU516
00257         PERFORM P2100-CHK-FILE-SCHED  THRU P2100-EXIT             DTSBU516
00258         IF L410-QTRLY-SCHED-88                                    DTSBU516
00259            PERFORM P2200-QTRLY-DUE-DATE THRU P2200-EXIT           DTSBU516
00260         ELSE                                                      DTSBU516
00261            IF L410-ANN-SCHED-88                                   DTSBU516
00262               PERFORM P2300-ANN-DUE-DATE THRU P2300-EXIT          DTSBU516
00263            ELSE                                                   DTSBU516
00264               PERFORM P2400-NO-SCHEDULE  THRU P2400-EXIT          DTSBU516
00265            END-IF                                                 DTSBU516
00266         END-IF                                                    DTSBU516
00267      ELSE                                                         DTSBU516
00268         PERFORM P2200-QTRLY-DUE-DATE THRU P2200-EXIT              DTSBU516
00269      END-IF.                                                      DTSBU516
00270                                                                   DTSBU516
00271  P2000-EXIT.                                                      DTSBU516
00272      EXIT.                                                        DTSBU516
00273      EJECT                                                        DTSBU516
00274  P2100-CHK-FILE-SCHED.                                            DTSBU516
00275      SET L410-MODE-INPUT-YRQ-88 TO TRUE.                          DTSBU516
00276      MOVE MPRF-EMP-NO       TO L410-EMP-NO.                       DTSBU516
00277      MOVE L516-YRQ          TO L410-YRQ.                          DTSBU516
00278                                                                   DTSBU516
00279      PERFORM S410-FILING-SCHEDULE  THRU S410-EXIT.                DTSBU516
00280                                                                   DTSBU516
00281      MOVE L410-FILING-SCHED TO L516-FILING-SCHED-CD.              DTSBU516
00282  P2100-EXIT.                                                      DTSBU516
00283      EXIT.                                                        DTSBU516
00284                                                                   DTSBU516
00285  P2200-QTRLY-DUE-DATE.                                            DTSBU516
00286      MOVE L516-YRQ TO L004-QTR-5-9.                               DTSBU516
00287                                                                   DTSBU516
00288      PERFORM S004-FROM-5 THRU S004-EXIT.                          DTSBU516
00289                                                                   DTSBU516
00290      IF L004-INVALID-QTR                                          DTSBU516
00291          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU516
00292                                                                   DTSBU516
00293      MOVE L004-QTR-DEFAULT-DUE-DATE                               DTSBU516
00294        TO L516-DEFAULT-RPT-DUE-DATE                               DTSBU516
00295           L516-DEFAULT-TAX-DUE-DATE.                              DTSBU516
00296                                                                   DTSBU516
00297      IF MPRF-CLASS-SELF-INS-88                                    DTSBU516
00298          NEXT SENTENCE                                            DTSBU516
00299      ELSE                                                         DTSBU516
00300          GO TO P2200-EXIT.                                        DTSBU516
00301                                                                   DTSBU516
00302      MOVE LOW-VALUES TO FQTR-KEY-AREA.                            DTSBU516
00303                                                                   DTSBU516
00304      SET FQTR-QTR-88 TO TRUE.                                     DTSBU516
00305                                                                   DTSBU516
00306      MOVE L516-YRQ TO FQTR-YRQ.                                   DTSBU516
00307                                                                   DTSBU516
00308      MOVE FQTR-KEY-AREA TO FSKL-KEY-AREA.                         DTSBU516
00309                                                                   DTSBU516
00310      PERFORM S931-READ THRU S931-EXIT.                            DTSBU516
00311                                                                   DTSBU516
00312      IF L931-NO-REC-88                                            DTSBU516
00313          GO TO P2200-EXIT.                                        DTSBU516
00314                                                                   DTSBU516
00315      MOVE FSKL-REC TO FQTR-REC.                                   DTSBU516
00316                                                                   DTSBU516
00317      IF (FQTR-SELF-INS-TAX-DUE-DATE NOT NUMERIC)                  DTSBU516
00318              OR                                                   DTSBU516
00319         (FQTR-SELF-INS-TAX-DUE-DATE = +0)                         DTSBU516
00320          GO TO P2200-EXIT.                                        DTSBU516
00321                                                                   DTSBU516
00322      MOVE FQTR-SELF-INS-TAX-DUE-DATE                              DTSBU516
00323        TO L516-DEFAULT-TAX-DUE-DATE.                              DTSBU516
00324  P2200-EXIT.                                                      DTSBU516
00325      EXIT.                                                        DTSBU516
00326                                                                   DTSBU516
00327  P2300-ANN-DUE-DATE.                                              DTSBU516
00328      MOVE L516-YRQ TO L004-QTR-5-9.                               DTSBU516
00329                                                                   DTSBU516
00330      PERFORM S004-FROM-5 THRU S004-EXIT.                          DTSBU516
00331                                                                   DTSBU516
00332      IF L004-INVALID-QTR                                          DTSBU516
00333          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU516
00334                                                                   DTSBU516
00335      MOVE L004-ANN-DEFAULT-DUE-DATE                               DTSBU516
00336        TO L516-DEFAULT-RPT-DUE-DATE                               DTSBU516
00337           L516-DEFAULT-TAX-DUE-DATE.                              DTSBU516
00338                                                                   DTSBU516
00339  P2300-EXIT.                                                      DTSBU516
00340      EXIT.                                                        DTSBU516
00341                                                                   DTSBU516
00342  P2400-NO-SCHEDULE.                                               DTSBU516
00343      IF L410-PENDING-SCHED-88                                     DTSBU516
00344      OR L410-NULL-SCHED-88                                        DTSBU516
00345         IF L516-FORCE-QTRLY-88                                    DTSBU516
00346            PERFORM P2200-QTRLY-DUE-DATE THRU P2200-EXIT           DTSBU516
00347         ELSE                                                      DTSBU516
00348            IF L516-FORCE-ANN-88                                   DTSBU516
00349               PERFORM P2300-ANN-DUE-DATE THRU P2300-EXIT          DTSBU516
00350            ELSE                                                   DTSBU516
00351               PERFORM P2200-QTRLY-DUE-DATE THRU P2200-EXIT        DTSBU516
00352            END-IF                                                 DTSBU516
00353         END-IF                                                    DTSBU516
00354      ELSE                                                         DTSBU516
00355         PERFORM P2200-QTRLY-DUE-DATE THRU P2200-EXIT              DTSBU516
00356      END-IF.                                                      DTSBU516
00357                                                                   DTSBU516
00358  P2400-EXIT.                                                      DTSBU516
00359      EXIT.                                                        DTSBU516
00360                                                                   DTSBU516
00361  P3000-RATE.                                                      DTSBU516
00362      IF MPRF-CLASS-SELF-INS-88                                    DTSBU516
00363          GO TO P3000-EXIT.                                        DTSBU516
00364                                                                   DTSBU516
00365 **   IF MPRF-EMP-NO = 028104 OR 075175 OR 123653                  DTSBU516
00366 *       DISPLAY 'BU516 ANN ' L410-FILING-SCHED                    DTSBU516
00367 *          '  ' L516-FILING-SCHED-CD                              DTSBU516
00368 *          '  ' L516-YRQ                                          DTSBU516
00369 **   END-IF.                                                      DTSBU516
00370                                                                   DTSBU516
00371      IF L410-ANN-SCHED-88                                         DTSBU516
00372         MOVE L516-YRQ          TO L004-QTR-5-9                    DTSBU516
00373         MOVE 1                 TO L004-QTR-5-Q                    DTSBU516
00374         MOVE L004-QTR-5-9      TO L006-YRQ                        DTSBU516
00375      ELSE                                                         DTSBU516
00376         MOVE L516-YRQ          TO L006-YRQ                        DTSBU516
00377      END-IF.                                                      DTSBU516
00378                                                                   DTSBU516
00379      PERFORM S006-FROM-QTR THRU S006-EXIT.                        DTSBU516
00380                                                                   DTSBU516
00381                                                                   DTSBU516
00382      MOVE LOW-VALUES TO MRTE-KEY-AREA.                            DTSBU516
00383                                                                   DTSBU516
00384      MOVE MPRF-EMP-NO TO MRTE-EMP-NO.                             DTSBU516
00385                                                                   DTSBU516
00386      SET MRTE-RTE-88 TO TRUE.                                     DTSBU516
00387                                                                   DTSBU516
00388      MOVE L006-RTE-YR-START-YRQ TO MRTE-EFF-YRQ.                  DTSBU516
00389                                                                   DTSBU516
00390      MOVE MRTE-KEY-AREA TO MSKL-KEY-AREA.                         DTSBU516
00391                                                                   DTSBU516
00392      PERFORM S910-READ THRU S910-EXIT.                            DTSBU516
00393                                                                   DTSBU516
00394      IF L910-OK-88                                                DTSBU516
00395          MOVE MSKL-REC TO MRTE-REC                                DTSBU516
00396          MOVE MRTE-UI-RATE TO L516-UI-RATE                        DTSBU516
00397          IF MRTE-RATE-TYPE-ESTIM-88                               DTSBU516
00398             SET L516-ESTIMATED-RATE-88 TO TRUE                    DTSBU516
00399          ELSE                                                     DTSBU516
00400             SET L516-RATE-88 TO TRUE.                             DTSBU516
00401                                                                   DTSBU516
00402  P3000-EXIT.                                                      DTSBU516
00403      EXIT.                                                        DTSBU516
00404                                                                   DTSBU516
00405  P4000-ANN-LIABILITY.                                             DTSBU516
00406      SET L516-NOT-ANN-LIABLE-88   TO TRUE.                        DTSBU516
00407                                                                   DTSBU516
00408      MOVE L516-YRQ                TO L004-QTR-5-9.                DTSBU516
00409      MOVE 1                       TO L004-QTR-5-Q.                DTSBU516
00410      MOVE L004-QTR-5-9            TO WRK-START-YRQ.               DTSBU516
00411      MOVE 4                       TO L004-QTR-5-Q.                DTSBU516
00412      MOVE L004-QTR-5-9            TO WRK-END-YRQ.                 DTSBU516
00413                                                                   DTSBU516
00414      MOVE LOW-VALUES              TO MSOL-KEY-AREA.               DTSBU516
00415      MOVE MPRF-EMP-NO             TO MSOL-EMP-NO.                 DTSBU516
00416      SET MSOL-SOL-88              TO TRUE.                        DTSBU516
00417      MOVE MSOL-KEY-AREA           TO MSKL-KEY-AREA.               DTSBU516
00418      PERFORM S910-START-BROWSE    THRU S910-EXIT.                 DTSBU516
00419                                                                   DTSBU516
00420      PERFORM UNTIL L516-ANN-LIABLE-88 OR L910-NO-REC-88           DTSBU516
00421         MOVE MSKL-REC             TO MSOL-REC                     DTSBU516
00422                                                                   DTSBU516
00423         IF WRK-START-YRQ <= MSOL-LAST-LIAB-YRQ                    DTSBU516
00424         AND WRK-END-YRQ >= MSOL-FIRST-LIAB-YRQ                    DTSBU516
00425            SET L516-ANN-LIABLE-88 TO TRUE                         DTSBU516
00426 ***        SET L516-LIABLE-88     TO TRUE                         DTSBU516
00427         ELSE                                                      DTSBU516
00428            PERFORM S910-READ-NEXT THRU S910-EXIT                  DTSBU516
00429         END-IF                                                    DTSBU516
00430      END-PERFORM.                                                 DTSBU516
00431                                                                   DTSBU516
00432 **   DISPLAY 'BU516 P4000: ' MPRF-EMP-NO '  ' L516-YRQ            DTSBU516
00433 *     '  LIAB IND ' L516-LIABLE-IND ' ANN  ' L516-ANN-LIABLE-IND  DTSBU516
00434 **    '  SCHED ' L516-FILING-SCHED-CD.                            DTSBU516
00435  P4000-EXIT.                                                      DTSBU516
00436      EXIT.                                                        DTSBU516
00437                                                                   DTSBU516
00438  S004-FROM-5.                                                     DTSBU516
00439      SET L004-FROM-5 TO TRUE.                                     DTSBU516
00440      GO TO S004-YRQ.                                              DTSBU516
00441                                                                   DTSBU516
00442 *S004-FROM-DATE.                                                  DTSBU516
00443 *****SET L004-FROM-DATE TO TRUE.                                  DTSBU516
00444 *****GO TO S004-YRQ.                                              DTSBU516
00445                                                                   DTSBU516
00446  S004-YRQ.                                                        DTSBU516
00447      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBU516
00448  S004-EXIT.                                                       DTSBU516
00449      EXIT.                                                        DTSBU516
00450      SKIP3                                                        DTSBU516
00451  S006-FROM-QTR.                                                   DTSBU516
00452      SET L006-FROM-QTR TO TRUE.                                   DTSBU516
00453      GO TO S006-RATE-YRQ.                                         DTSBU516
00454                                                                   DTSBU516
00455  S006-RATE-YRQ.                                                   DTSBU516
00456      CALL 'DTSBU006' USING L006-LINK-AREA.                        DTSBU516
00457  S006-EXIT.                                                       DTSBU516
00458      EXIT.                                                        DTSBU516
00459      SKIP3                                                        DTSBU516
00460  S410-FILING-SCHEDULE.                                            DTSBU516
00461      CALL 'DTSBU410' USING L410-LINK-AREA.                        DTSBU516
00462  S410-EXIT.                                                       DTSBU516
00463      EXIT.                                                        DTSBU516
00464      SKIP3                                                        DTSBU516
00465  S910-READ.                                                       DTSBU516
00466      SET L910-READ-88 TO TRUE.                                    DTSBU516
00467      GO TO S910-MSTR-CALL.                                        DTSBU516
00468                                                                   DTSBU516
00469  S910-START-BROWSE.                                               DTSBU516
00470      SET L910-START-BROWSE-88 TO TRUE.                            DTSBU516
00471      GO TO S910-MSTR-CALL.                                        DTSBU516
00472                                                                   DTSBU516
00473  S910-READ-NEXT.                                                  DTSBU516
00474      SET L910-READ-NEXT-88 TO TRUE.                               DTSBU516
00475      GO TO S910-MSTR-CALL.                                        DTSBU516
00476                                                                   DTSBU516
00477  S910-MSTR-CALL.                                                  DTSBU516
00478      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBU516
00479                            MSKL-REC.                              DTSBU516
00480  S910-EXIT.                                                       DTSBU516
00481      EXIT.                                                        DTSBU516
00482      SKIP3                                                        DTSBU516
00483  S931-READ.                                                       DTSBU516
00484      SET L931-READ-88 TO TRUE.                                    DTSBU516
00485      GO TO S931-REF-CALL.                                         DTSBU516
00486                                                                   DTSBU516
00487  S931-REF-CALL.                                                   DTSBU516
00488      CALL 'DTSBU931' USING L931-LINK-AREA                         DTSBU516
00489                            FSKL-REC.                              DTSBU516
00490  S931-EXIT.                                                       DTSBU516
00491      EXIT.                                                        DTSBU516
00492      SKIP3                                                        DTSBU516
00493  S999-ABEND.                                                      DTSBU516
00494      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBU516
00495  S999-EXIT.                                                       DTSBU516
00496      EXIT.                                                        DTSBU516
