00001  IDENTIFICATION DIVISION.                                         08/05/04
00002  PROGRAM-ID.             DTSBE122.                                DTSBE122
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD                   LV014
00004                          UPDATED BY TRW/BDM OCT. 1998.            DTSBE122
00005  DATE-WRITTEN.           AUGUST 1994.                             DTSBE122
00006  DATE-COMPILED.                                                   DTSBE122
00007      SKIP3                                                        DTSBE122
00008 *****                                                             DTSBE122
00009 *    CALLING SEQUENCE:  DTSBD400 CALLS                            DTSBE122
00010 *                       DTSBE122 WHICH UPDATES DTSIR122           DTSBE122
00011 *                       DTSBR122 READS DTSIR122 RECORDS.          DTSBE122
00012 *                                                                 DTSBE122
00013 *                                                                 DTSBE122
00014 *    FUNCTION:  LIABILITY DETERMINATION ACTIVITY LIST EXTRACT.    DTSBE122
00015 *                                                                 DTSBE122
00016 *                                                                 DTSBE122
00017 *    MODIFICATION LOG:                                            DTSBE122
00018 *                                                                 DTSBE122
00019 *    06/10/2004  ADDED OPERATOR ID AND INACTIVATION DATE.         DTSBE122
00020 *                WORK ORDER:                      PROGRAMMER: GD  DTSBE122
00021 *                                                                 DTSBE122
00022 *    XX/XX/XXXX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX DTSBE122
00023 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX DTSBE122
00024 *                WORK ORDER:                      PROGRAMMER: XXX DTSBE122
00025 *                                                                 DTSBE122
00026 *                                                                 DTSBE122
00027 *  DESCRIPTION:                                                   DTSBE122
00028 *                                                                 DTSBE122
00029 *                                                                 DTSBE122
00030 *    INITIATION:                                                  DTSBE122
00031 *                                                                 DTSBE122
00032 *      SET LECM-MST-OPEN-READ-88 TO TRUE.                         DTSBE122
00033 *      SET LECM-REF-OPEN-READ-88 TO TRUE.                         DTSBE122
00034 *                                                                 DTSBE122
00035 *      EDIT AND DEFAULT PARAMETERS.  SEE PRINTED OUTPUTS          DTSBE122
00036 *      DESCRIPTIONS AND LAYOUTS (122R1).                          DTSBE122
00037 *                                                                 DTSBE122
00038 *                                                                 DTSBE122
00039 *                                                                 DTSBE122
00040 *    PROCESSING:                                                  DTSBE122
00041 *                                                                 DTSBE122
00042 *      SEE PRINTED OUTPUTS DESCRIPTION AND LAYOUTS (122R1).       DTSBE122
00043 *                                                                 DTSBE122
00044 *      THE EXTERNAL DESIGN CALLS FOR SCANING MSOL RECORDS.        DTSBE122
00045 *                                                                 DTSBE122
00046 *      THE EXTERNAL DESIGN IS OUT OF DATE.  IT WILL BE EASIER     DTSBE122
00047 *      (AND WILL YIELD RESULTS WHICH ARE IDENTICAL TO ETA581      DTSBE122
00048 *      RESULTS - A GOOD RESULT) TO SCAN MERD RECORDS.             DTSBE122
00049 *                                                                 DTSBE122
00050 *      SCAN THE MERD RECORDS ASSOCIATED WITH THE EMPLOYER.        DTSBE122
00051 *                                                                 DTSBE122
00052 *      BYPASS THE MERD RECORDS WITH MERD-ESTB-DATE OUTSIDE        DTSBE122
00053 *      THE RANGE WRK-PARM-PERIOD-START-DATE                       DTSBE122
00054 *      THRU WRK-PARM-PERIOD-END-DATE.                             DTSBE122
00055 *                                                                 DTSBE122
00056 *      THE "TIME LAPSE" IS ALWAYS THE NUMBER OF DAYS FROM THE     DTSBE122
00057 *      LAST DAY OF THE QUARTER IN WHICH MERD-EFFECTIVE-DATE FALLS DTSBE122
00058 *      THRU MERD-ESTB-DATE (IF NEGATIVE, MAKE TIME LAPSE ZERO).   DTSBE122
00059 *                                                                 DTSBE122
00060 *      R122-LIAB-ENTRY-DATE, R122-INAC-R-DATE, AND R122-INAC-     DTSBE122
00061 *      E-DATE ARE ALL EQUAL TO MERD-ESTB-DATE.                    DTSBE122
00062 *                                                                 DTSBE122
00063 *      R122-LIAB-ESTAB-DATE IS EQUAL TO MERD-EFFECTIVE-DATE.      DTSBE122
00064 *                                                                 DTSBE122
00065 *                                                                 DTSBE122
00066 *      IF MERD-DETER-INACT-88                                     DTSBE122
00067 *          WRITE A R122-INACT-ENTERED-88 RECORD                   DTSBE122
00068 *      ELSE                                                       DTSBE122
00069 *      IF MERD-SCREEN-ID = '17'                                   DTSBE122
00070 *          WRITE A R122-INACT-REVERSED-88 RECORD                  DTSBE122
00071 *      ELSE                                                       DTSBE122
00072 *          IF MERD-DETER-NEW-88                                   DTSBE122
00073 *              WRITE A R122-LIAB-ENTERED-NEW-88 RECORD            DTSBE122
00074 *          ELSE                                                   DTSBE122
00075 *              WRITE A R122-LIAB-ENTERED-SUCC-88 RECORD.          DTSBE122
00076 *                                                                 DTSBE122
00077 *                                                                 DTSBE122
00078 *    TERMINATION:                                                 DTSBE122
00079 *                                                                 DTSBE122
00080 *      NONE.                                                      DTSBE122
00081 *                                                                 DTSBE122
00082 *                                                                 DTSBE122
00083 *    RECORDS READ:                                                DTSBE122
00084 *                                                                 DTSBE122
00085 *      MASTER:                                                    DTSBE122
00086 *                                                                 DTSBE122
00087 *        MERD                                                     DTSBE122
00088 *                                                                 DTSBE122
00089 *                                                                 DTSBE122
00090 *      ALTERNATE INDEX:                                           DTSBE122
00091 *                                                                 DTSBE122
00092 *        NONE.                                                    DTSBE122
00093 *                                                                 DTSBE122
00094 *                                                                 DTSBE122
00095 *      REFERENCE:                                                 DTSBE122
00096 *                                                                 DTSBE122
00097 *        NONE.                                                    DTSBE122
00098 *                                                                 DTSBE122
00099 *                                                                 DTSBE122
00100 *    RECORDS UPDATED:                                             DTSBE122
00101 *                                                                 DTSBE122
00102 *        NONE.                                                    DTSBE122
00103 *                                                                 DTSBE122
00104 *                                                                 DTSBE122
00105 *    REPORT RECORDS WRITTEN:                                      DTSBE122
00106 *                                                                 DTSBE122
00107 *        R122  LIABILITY DETERMINATION ACTIVITY LIST.             DTSBE122
00108 *                                                                 DTSBE122
00109 *                                                                 DTSBE122
00110 *    BATCH TRANSACTION COLLECTION RECORDS WRITTEN:                DTSBE122
00111 *                                                                 DTSBE122
00112 *        NONE.                                                    DTSBE122
00113 *                                                                 DTSBE122
00114 *                                                                 DTSBE122
00115 *    MODULES CALLED:                                              DTSBE122
00116 *                                                                 DTSBE122
00117 *        DTSBU001  DATE CONVERSION/EDIT.                          DTSBE122
00118 *        DTSBU004  QUARTER CONVERSION/EDIT.                       DTSBE122
00119 *        DTSBU910  MASTER FILE I/O.                               DTSBE122
00120 *        DTSBU946  VARIABLE LENGTH RECORDS SEQUENTIAL OUTPUT 1.   DTSBE122
00121 *                                                                 DTSBE122
00122 *                                                                 DTSBE122
00123 *    VERMONT REFERENCE:                                           DTSBE122
00124 *                                                                 DTSBE122
00125 *        TXBE302                                                  DTSBE122
00126 *                                                                 DTSBE122
00127 *****                                                             DTSBE122
00128      SKIP3                                                        DTSBE122
00129  ENVIRONMENT DIVISION.                                            DTSBE122
00130      SKIP3                                                        DTSBE122
00131  DATA DIVISION.                                                   DTSBE122
00132      SKIP3                                                        DTSBE122
00133  WORKING-STORAGE SECTION.                                         DTSBE122
001335 77  PAN-VALET PICTURE X(24) VALUE '014DTSBE122  08/05/04'.       DTSBE122
00134      SKIP3                                                        DTSBE122
00135  01  WRK-AREA.                                                    DTSBE122
00136      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +122.DTSBE122
00137      SKIP1                                                        DTSBE122
00138      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBE122'.DTSBE122
00139      SKIP3                                                        DTSBE122
00140      05  ABEND-MSG                   PIC  X(60).                  DTSBE122
00141      SKIP3                                                        DTSBE122
00142      05  WRK-PARM-PERIOD-START-DATE  PIC S9(09)  COMP-3.          DTSBE122
00143      SKIP1                                                        DTSBE122
00144      05  WRK-PARM-PERIOD-END-DATE    PIC S9(09)  COMP-3.          DTSBE122
00145      SKIP1                                                        DTSBE122
00146      05  WRK-3-MONTHS-AGO            PIC S9(09)  COMP-3.          DTSBE122
00147      SKIP1                                                        DTSBE122
00148      05  WRK-6-MONTHS-AGO            PIC S9(09)  COMP-3.          DTSBE122
00149      SKIP1                                                        DTSBE122
00150      05  WRK-LIAB-ENTRY-DATE         PIC S9(09)  COMP-3.          DTSBE122
00151      SKIP1                                                        DTSBE122
00152      05  WRK-ENTRY-JUL-ABS-DAY       PIC S9(08)   COMP.           DTSBE122
00153      SKIP1                                                        DTSBE122
00154      05  WRK-TIME-LAPSE-DAYS         PIC S9(08)   COMP.           DTSBE122
00155      EJECT                                                        DTSBE122
00156  01  L001-LINK-AREA.                                              DTSBE122
00157  ++INCLUDE DTSIL001                                               DTSBE122
00158      EJECT                                                        DTSBE122
00159  01  L004-LINK-AREA.                                              DTSBE122
00160  ++INCLUDE DTSIL004                                               DTSBE122
00161      EJECT                                                        DTSBE122
00162  01  L910-LINK-AREA.                                              DTSBE122
00163  ++INCLUDE DTSIL910                                               DTSBE122
00164      SKIP3                                                        DTSBE122
00165  01  MSKL-REC.                                                    DTSBE122
00166  ++INCLUDE DTSIMSKL                                               DTSBE122
00167      SKIP3                                                        DTSBE122
00168  01  MERD-REC.                                                    DTSBE122
00169  ++INCLUDE DTSIMERD                                               DTSBE122
00170      EJECT                                                        DTSBE122
00171  01  MERA-REC.                                                    DTSBE122
00172  ++INCLUDE DTSIMERA                                               DTSBE122
00173      EJECT                                                        DTSBE122
00174  01  MSOL-REC.                                                    DTSBE122
00175  ++INCLUDE DTSIMSOL                                               DTSBE122
00176      EJECT                                                        DTSBE122
00177  01  R122-REC.                                                    DTSBE122
00178  ++INCLUDE DTSIR122                                               DTSBE122
00179      EJECT                                                        DTSBE122
00180  LINKAGE SECTION.                                                 DTSBE122
00181      SKIP3                                                        DTSBE122
00182  01  LECM-LINK-AREA.                                              DTSBE122
00183  ++INCLUDE DTSILECM                                               DTSBE122
00184      SKIP3                                                        DTSBE122
00185          10  LECM-PARM-AREA REDEFINES LECM-EXTRACT-PARMS.         DTSBE122
00186              15  LECM-PARM-PERIOD-START-DATE PIC  X(06).          DTSBE122
00187              15  FILLER                      PIC  X(01).          DTSBE122
00188              15  LECM-PARM-PERIOD-END-DATE   PIC  X(06).          DTSBE122
00189              15  FILLER                      PIC  X(55).          DTSBE122
00190      EJECT                                                        DTSBE122
00191  01  MPRF-LINK-REC.                                               DTSBE122
00192  ++INCLUDE DTSIMPRF                                               DTSBE122
00193      EJECT                                                        DTSBE122
00194  PROCEDURE DIVISION USING LECM-LINK-AREA                          DTSBE122
00195                           MPRF-LINK-REC.                          DTSBE122
00196      SKIP2                                                        DTSBE122
00197      IF LECM-PROCESS-88                                           DTSBE122
00198          PERFORM P0000-PROCESS THRU P0000-EXIT                    DTSBE122
00199      ELSE                                                         DTSBE122
00200      IF LECM-INITIALIZE-88                                        DTSBE122
00201          PERFORM I0000-INITIALIZE THRU I0000-EXIT                 DTSBE122
00202      ELSE                                                         DTSBE122
00203      IF LECM-TERMINATE-88                                         DTSBE122
00204          PERFORM T0000-TERMINATE THRU T0000-EXIT                  DTSBE122
00205      ELSE                                                         DTSBE122
00206          MOVE 'INVALID LECM-CALL-TYPE-IND ENCOUNTERED'            DTSBE122
00207            TO ABEND-MSG                                           DTSBE122
00208          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE122
00209      SKIP2                                                        DTSBE122
00210      GOBACK.                                                      DTSBE122
00211      EJECT                                                        DTSBE122
00212  I0000-INITIALIZE.                                                DTSBE122
00213      SKIP2                                                        DTSBE122
00214      MOVE LENGTH OF R122-REC TO R122-LENGTH.                      DTSBE122
00215      MOVE '122'              TO R122-REC-TYPE.                    DTSBE122
00216      MOVE LECM-TRACE-IND           TO  L910-TRACE-IND.            DTSBE122
00217      MOVE WRK-MOD-NAME             TO  L910-MOD-NAME.             DTSBE122
00218                                                                   DTSBE122
00219      PERFORM I1000-EDIT-AND-DEFAULT-PARMS THRU I1000-EXIT.        DTSBE122
00220      SKIP1                                                        DTSBE122
00221      SET LECM-MST-OPEN-READ-88     TO  TRUE.                      DTSBE122
00222      SET LECM-REF-OPEN-READ-88     TO  TRUE.                      DTSBE122
00223      SKIP2                                                        DTSBE122
00224  I0000-EXIT.                                                      DTSBE122
00225      EXIT.                                                        DTSBE122
00226      SKIP3                                                        DTSBE122
00227  I1000-EDIT-AND-DEFAULT-PARMS.                                    DTSBE122
00228      PERFORM I1100-PERIOD-START-DATE THRU I1100-EXIT.             DTSBE122
00229                                                                   DTSBE122
00230      PERFORM I1200-PERIOD-END-DATE THRU I1200-EXIT.               DTSBE122
00231                                                                   DTSBE122
00232      PERFORM I1300-PENDING-DETERM-DATES  THRU I1300-EXIT.         DTSBE122
00233                                                                   DTSBE122
00234  I1000-EXIT.                                                      DTSBE122
00235      EXIT.                                                        DTSBE122
00236      SKIP3                                                        DTSBE122
00237  I1100-PERIOD-START-DATE.                                         DTSBE122
00238      IF LECM-PARM-PERIOD-START-DATE = SPACES                      DTSBE122
00239          IF LECM-PERIOD-START-DATE > +0                           DTSBE122
00240              MOVE LECM-PERIOD-START-DATE                          DTSBE122
00241                TO WRK-PARM-PERIOD-START-DATE                      DTSBE122
00242          ELSE                                                     DTSBE122
00243              MOVE 'PERIOD-START-DATE MISSING'                     DTSBE122
00244                TO ABEND-MSG                                       DTSBE122
00245              PERFORM S999-ABEND THRU S999-EXIT                    DTSBE122
00246      ELSE                                                         DTSBE122
00247          MOVE LECM-PARM-PERIOD-START-DATE TO L001-CAL-6-DATE-X    DTSBE122
00248          PERFORM S001-FROM-CAL-6 THRU S001-EXIT                   DTSBE122
00249          IF L001-VALID-DATE                                       DTSBE122
00250              MOVE L001-FED-8-DATE-9 TO WRK-PARM-PERIOD-START-DATE DTSBE122
00251          ELSE                                                     DTSBE122
00252              MOVE 'PERIOD-START-DATE NOT VALID'                   DTSBE122
00253                TO ABEND-MSG                                       DTSBE122
00254              PERFORM S999-ABEND THRU S999-EXIT.                   DTSBE122
00255  I1100-EXIT.                                                      DTSBE122
00256      EXIT.                                                        DTSBE122
00257      SKIP3                                                        DTSBE122
00258  I1200-PERIOD-END-DATE.                                           DTSBE122
00259      IF LECM-PARM-PERIOD-END-DATE = SPACES                        DTSBE122
00260          IF LECM-PERIOD-END-DATE > +0                             DTSBE122
00261              MOVE LECM-PERIOD-END-DATE                            DTSBE122
00262                TO WRK-PARM-PERIOD-END-DATE                        DTSBE122
00263          ELSE                                                     DTSBE122
00264              MOVE 'PERIOD-END-DATE MISSING'                       DTSBE122
00265                TO ABEND-MSG                                       DTSBE122
00266              PERFORM S999-ABEND THRU S999-EXIT                    DTSBE122
00267      ELSE                                                         DTSBE122
00268          MOVE LECM-PARM-PERIOD-END-DATE TO L001-CAL-6-DATE-X      DTSBE122
00269          PERFORM S001-FROM-CAL-6 THRU S001-EXIT                   DTSBE122
00270          IF L001-VALID-DATE                                       DTSBE122
00271              MOVE L001-FED-8-DATE-9 TO WRK-PARM-PERIOD-END-DATE   DTSBE122
00272          ELSE                                                     DTSBE122
00273              MOVE 'PERIOD-END-DATE NOT VALID'                     DTSBE122
00274                TO ABEND-MSG                                       DTSBE122
00275              PERFORM S999-ABEND THRU S999-EXIT.                   DTSBE122
00276                                                                   DTSBE122
00277      IF WRK-PARM-PERIOD-START-DATE > WRK-PARM-PERIOD-END-DATE     DTSBE122
00278          MOVE 'PERIOD START DATE IS GREATER THAN PERIOD END DATE' DTSBE122
00279            TO ABEND-MSG                                           DTSBE122
00280          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE122
00281  I1200-EXIT.                                                      DTSBE122
00282      EXIT.                                                        DTSBE122
00283                                                                   DTSBE122
00284  I1300-PENDING-DETERM-DATES.                                      DTSBE122
00285      MOVE LECM-CURR-RUN-DATE          TO L001-FED-8-DATE-9.       DTSBE122
00286      PERFORM S001-FROM-FED-8          THRU S001-EXIT.             DTSBE122
00287      SUBTRACT 60                      FROM L001-JUL-ABS-DAY.      DTSBE122
00288      PERFORM S001-FROM-ABS-DAY        THRU S001-EXIT.             DTSBE122
00289      MOVE L001-FED-8-DATE-9           TO WRK-3-MONTHS-AGO.        DTSBE122
00290      SUBTRACT 180                     FROM L001-JUL-ABS-DAY.      DTSBE122
00291      PERFORM S001-FROM-ABS-DAY        THRU S001-EXIT.             DTSBE122
00292      MOVE L001-FED-8-DATE-9           TO WRK-6-MONTHS-AGO.        DTSBE122
00293                                                                   DTSBE122
00294      DISPLAY '3 MONTHS AGO ' WRK-3-MONTHS-AGO.                    DTSBE122
00295      DISPLAY '6 MONTHS AGO ' WRK-6-MONTHS-AGO.                    DTSBE122
00296  I1300-EXIT.                                                      DTSBE122
00297      EXIT.                                                        DTSBE122
00298      EJECT                                                        DTSBE122
00299 ***************************************************************** DTSBE122
00300 *   THIS MODULE PROCESSES THE EMPLOYER PROFILES PASSED FROM THE   DTSBE122
00301 *   I/O MODULE.                                                   DTSBE122
00302 ***************************************************************** DTSBE122
00303                                                                   DTSBE122
00304  P0000-PROCESS.                                                   DTSBE122
00305                                                                   DTSBE122
00306      MOVE LOW-VALUES                  TO  MERD-KEY-AREA.          DTSBE122
00307      MOVE MPRF-EMP-NO                 TO  MERD-EMP-NO.            DTSBE122
00308      SET MERD-ERD-88                  TO  TRUE.                   DTSBE122
00309      MOVE MERD-KEY-AREA               TO  MSKL-KEY-AREA.          DTSBE122
00310                                                                   DTSBE122
00311      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE122
00312      PERFORM P1000-SCAN-MERD THRU P1000-EXIT                      DTSBE122
00313          UNTIL L910-NO-REC-88.                                    DTSBE122
00314                                                                   DTSBE122
00315      IF MPRF-STATUS-ACT-88                                        DTSBE122
00316          SET R122-ACTIVE-EMPLOYER-88  TO  TRUE                    DTSBE122
00317          MOVE SPACES                  TO  R122-DATA-VAR-AREA      DTSBE122
00318          MOVE MERD-EMP-NO             TO  R122-EMP-NO             DTSBE122
00319          MOVE MPRF-EMP-CLASS          TO  R122-ACTIVE-EMP-CLASS   DTSBE122
00320          MOVE WRK-PARM-PERIOD-START-DATE                          DTSBE122
00321            TO R122-PERIOD-START-DATE                              DTSBE122
00322          MOVE WRK-PARM-PERIOD-END-DATE                            DTSBE122
00323            TO R122-PERIOD-END-DATE                                DTSBE122
00324          PERFORM S946-WRITE-R122 THRU S946-EXIT                   DTSBE122
00325          PERFORM P2000-CHK-FR500-DATE   THRU P2000-EXIT           DTSBE122
00326      ELSE                                                         DTSBE122
00327          PERFORM P3000-PENDING-DETERMS  THRU P3000-EXIT           DTSBE122
00328      END-IF.                                                      DTSBE122
00329                                                                   DTSBE122
00330  P0000-EXIT.                                                      DTSBE122
00331      EXIT.                                                        DTSBE122
00332      EJECT                                                        DTSBE122
00333 ***************************************************************** DTSBE122
00334 *   THIS MODULE READS ALL OF THE EMPLOYER REGISTRATION            DTSBE122
00335 *   DETERMINATIONS FOR THE EMPLOYER.                              DTSBE122
00336 ***************************************************************** DTSBE122
00337                                                                   DTSBE122
00338  P1000-SCAN-MERD.                                                 DTSBE122
00339                                                                   DTSBE122
00340      MOVE MSKL-REC                    TO  MERD-REC.               DTSBE122
00341                                                                   DTSBE122
00342      IF (MERD-ESTB-DATE < WRK-PARM-PERIOD-START-DATE)             DTSBE122
00343              OR                                                   DTSBE122
00344         (MERD-ESTB-DATE > WRK-PARM-PERIOD-END-DATE)               DTSBE122
00345          NEXT SENTENCE                                            DTSBE122
00346      ELSE                                                         DTSBE122
00347          PERFORM P1100-PROCESS-MERD THRU P1100-EXIT.              DTSBE122
00348                                                                   DTSBE122
00349      PERFORM S910-READ-NEXT THRU S910-EXIT.                       DTSBE122
00350  P1000-EXIT.                                                      DTSBE122
00351      EXIT.                                                        DTSBE122
00352      EJECT                                                        DTSBE122
00353 ***************************************************************** DTSBE122
00354 *  THIS MODULE CONSTRUCTS AND WRITES THE R122 RECORDS.            DTSBE122
00355 ***************************************************************** DTSBE122
00356                                                                   DTSBE122
00357  P1100-PROCESS-MERD.                                              DTSBE122
00358                                                                   DTSBE122
00359      IF MERD-DETER-INACT-88                                       DTSBE122
00360          SET R122-INACT-ENTERED-88  TO  TRUE                      DTSBE122
00361          MOVE SPACES                TO  R122-DATA-VAR-AREA        DTSBE122
00362          MOVE MERD-EMP-NO           TO  R122-EMP-NO               DTSBE122
00363          MOVE MERD-OP-ID            TO  R122-OP-ID                DTSBE122
00364          MOVE WRK-PARM-PERIOD-START-DATE                          DTSBE122
00365                                     TO  R122-PERIOD-START-DATE    DTSBE122
00366          MOVE WRK-PARM-PERIOD-END-DATE                            DTSBE122
00367                                     TO  R122-PERIOD-END-DATE      DTSBE122
00368          MOVE MPRF-PRIMARY-NAME     TO  R122-INAC-E-PRIMARY-NAME  DTSBE122
00369          MOVE MERD-ESTB-DATE        TO  R122-INAC-E-DATE          DTSBE122
00370          MOVE MERD-EFFECTIVE-DATE   TO R122-INAC-E-INACT-DATE     DTSBE122
00371          PERFORM S946-WRITE-R122  THRU S946-EXIT                  DTSBE122
00372       ELSE                                                        DTSBE122
00373          IF MERD-SCREEN-ID       EQUAL  '17'                      DTSBE122
00374              SET R122-INACT-REVERSED-88 TO  TRUE                  DTSBE122
00375              MOVE SPACES            TO  R122-DATA-VAR-AREA        DTSBE122
00376              MOVE MERD-EMP-NO       TO  R122-EMP-NO               DTSBE122
00377              MOVE MERD-OP-ID        TO  R122-OP-ID                DTSBE122
00378              MOVE WRK-PARM-PERIOD-START-DATE                      DTSBE122
00379                                     TO  R122-PERIOD-START-DATE    DTSBE122
00380              MOVE WRK-PARM-PERIOD-END-DATE                        DTSBE122
00381                                     TO  R122-PERIOD-END-DATE      DTSBE122
00382              MOVE MPRF-PRIMARY-NAME                               DTSBE122
00383                                     TO  R122-INAC-R-PRIMARY-NAME  DTSBE122
00384              MOVE MERD-ESTB-DATE    TO  R122-INAC-R-DATE          DTSBE122
00385              PERFORM P1110-COMPUTE-LAPSE-TIME THRU P1110-EXIT     DTSBE122
00386              MOVE WRK-TIME-LAPSE-DAYS                             DTSBE122
00387                                     TO  R122-INAC-R-TIME-LAPSE    DTSBE122
00388              PERFORM S946-WRITE-R122  THRU S946-EXIT              DTSBE122
00389          ELSE                                                     DTSBE122
00390             IF MERD-DETER-NEW-88                                  DTSBE122
00391                 SET R122-LIAB-ENTERED-NEW-88  TO TRUE             DTSBE122
00392                 MOVE SPACES          TO  R122-DATA-VAR-AREA       DTSBE122
00393                 MOVE MERD-EMP-NO     TO  R122-EMP-NO              DTSBE122
00394                 MOVE MERD-OP-ID      TO  R122-OP-ID               DTSBE122
00395                 MOVE WRK-PARM-PERIOD-START-DATE                   DTSBE122
00396                                      TO  R122-PERIOD-START-DATE   DTSBE122
00397                 MOVE WRK-PARM-PERIOD-END-DATE                     DTSBE122
00398                                      TO  R122-PERIOD-END-DATE     DTSBE122
00399                 MOVE MPRF-PRIMARY-NAME                            DTSBE122
00400                                      TO  R122-LIAB-PRIMARY-NAME   DTSBE122
00401                 MOVE MERD-EFFECTIVE-DATE TO R122-LIAB-ESTAB-DATE  DTSBE122
00402                 MOVE MERD-ESTB-DATE  TO  R122-LIAB-ENTRY-DATE     DTSBE122
00403                 PERFORM P1110-COMPUTE-LAPSE-TIME THRU P1110-EXIT  DTSBE122
00404                 MOVE WRK-TIME-LAPSE-DAYS                          DTSBE122
00405                                      TO  R122-LIAB-TIME-LAPSE     DTSBE122
00406                 PERFORM S946-WRITE-R122  THRU S946-EXIT           DTSBE122
00407             ELSE                                                  DTSBE122
00408                 SET R122-LIAB-ENTERED-SUCC-88  TO TRUE            DTSBE122
00409                 MOVE SPACES          TO  R122-DATA-VAR-AREA       DTSBE122
00410                 MOVE MERD-EMP-NO     TO  R122-EMP-NO              DTSBE122
00411                 MOVE MERD-OP-ID      TO  R122-OP-ID               DTSBE122
00412                 MOVE WRK-PARM-PERIOD-START-DATE                   DTSBE122
00413                                      TO  R122-PERIOD-START-DATE   DTSBE122
00414                 MOVE WRK-PARM-PERIOD-END-DATE                     DTSBE122
00415                                      TO  R122-PERIOD-END-DATE     DTSBE122
00416                 MOVE MPRF-PRIMARY-NAME                            DTSBE122
00417                                      TO  R122-LIAB-PRIMARY-NAME   DTSBE122
00418                 MOVE MERD-EFFECTIVE-DATE TO R122-LIAB-ESTAB-DATE  DTSBE122
00419                 MOVE MERD-ESTB-DATE     TO  R122-LIAB-ENTRY-DATE  DTSBE122
00420                 PERFORM P1110-COMPUTE-LAPSE-TIME THRU P1110-EXIT  DTSBE122
00421                 MOVE WRK-TIME-LAPSE-DAYS                          DTSBE122
00422                                      TO  R122-LIAB-TIME-LAPSE     DTSBE122
00423                 PERFORM S946-WRITE-R122  THRU S946-EXIT.          DTSBE122
00424                                                                   DTSBE122
00425  P1100-EXIT.                                                      DTSBE122
00426      EXIT.                                                        DTSBE122
00427      EJECT                                                        DTSBE122
00428 ******************************************************************DTSBE122
00429 *  THIS MODULE COMPUTES THE LAPSE TIME                            DTSBE122
00430 ******************************************************************DTSBE122
00431                                                                   DTSBE122
00432  P1110-COMPUTE-LAPSE-TIME.                                        DTSBE122
00433                                                                   DTSBE122
00434      MOVE MERD-ESTB-DATE          TO  L001-FED-8-DATE-9.          DTSBE122
00435      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBE122
00436      MOVE L001-JUL-ABS-DAY        TO  WRK-ENTRY-JUL-ABS-DAY.      DTSBE122
00437                                                                   DTSBE122
00438      MOVE MERD-EFFECTIVE-DATE     TO  L004-DATE.                  DTSBE122
00439      PERFORM S004-FROM-DATE THRU S004-EXIT.                       DTSBE122
00440      MOVE L004-QTR-END-DATE       TO  L001-FED-8-DATE-9.          DTSBE122
00441      PERFORM S001-FROM-FED-8 THRU S001-EXIT.                      DTSBE122
00442                                                                   DTSBE122
00443      COMPUTE WRK-TIME-LAPSE-DAYS  EQUAL                           DTSBE122
00444          WRK-ENTRY-JUL-ABS-DAY    -                               DTSBE122
00445          L001-JUL-ABS-DAY.                                        DTSBE122
00446                                                                   DTSBE122
00447      IF WRK-TIME-LAPSE-DAYS  LESS THAN  ZERO                      DTSBE122
00448          MOVE ZEROS               TO  WRK-TIME-LAPSE-DAYS.        DTSBE122
00449                                                                   DTSBE122
00450  P1110-EXIT.                                                      DTSBE122
00451      EXIT.                                                        DTSBE122
00452                                                                   DTSBE122
00453  P2000-CHK-FR500-DATE.                                            DTSBE122
00454      IF MPRF-ESTB-DATE < WRK-3-MONTHS-AGO                         DTSBE122
00455         GO TO P2000-EXIT                                          DTSBE122
00456      END-IF.                                                      DTSBE122
00457                                                                   DTSBE122
00458      MOVE LOW-VALUES TO MERA-KEY-AREA.                            DTSBE122
00459      MOVE MPRF-EMP-NO TO MERA-EMP-NO.                             DTSBE122
00460      SET MERA-ERA-88 TO TRUE.                                     DTSBE122
00461      MOVE MERA-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE122
00462                                                                   DTSBE122
00463      PERFORM S910-READ THRU S910-EXIT.                            DTSBE122
00464      IF L910-OK-88                                                DTSBE122
00465         MOVE MSKL-REC TO MERA-REC                                 DTSBE122
00466         IF MERA-RECEIVED-DATE = ZERO                              DTSBE122
00467            PERFORM P2100-BUILD-FR500-R122   THRU P2100-EXIT       DTSBE122
00468         END-IF                                                    DTSBE122
00469      END-IF.                                                      DTSBE122
00470                                                                   DTSBE122
00471  P2000-EXIT.                                                      DTSBE122
00472      EXIT.                                                        DTSBE122
00473                                                                   DTSBE122
00474  P2100-BUILD-FR500-R122.                                          DTSBE122
00475      SET R122-MISSING-FR500-88      TO TRUE.                      DTSBE122
00476      MOVE SPACES          TO  R122-DATA-VAR-AREA.                 DTSBE122
00477      MOVE MPRF-EMP-NO     TO  R122-EMP-NO.                        DTSBE122
00478      MOVE MPRF-PRIMARY-NAME   TO  R122-FR500-PRIMARY-NAME         DTSBE122
00479      MOVE MERA-SOURCE-CD      TO R122-FR500-SOURCE                DTSBE122
00480      MOVE MERA-RESPONSIBLE-OP-ID  TO R122-OP-ID.                  DTSBE122
00481      MOVE ZERO            TO  R122-PERIOD-START-DATE              DTSBE122
00482                               R122-PERIOD-END-DATE.               DTSBE122
00483                                                                   DTSBE122
00484      MOVE ZERO            TO WRK-LIAB-ENTRY-DATE.                 DTSBE122
00485      MOVE LOW-VALUES TO MSOL-KEY-AREA.                            DTSBE122
00486      MOVE MPRF-EMP-NO TO MSOL-EMP-NO.                             DTSBE122
00487      SET MSOL-SOL-88 TO TRUE.                                     DTSBE122
00488      MOVE MSOL-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE122
00489                                                                   DTSBE122
00490      PERFORM S910-START-BROWSE      THRU S910-EXIT.               DTSBE122
00491      PERFORM UNTIL L910-NO-REC-88                                 DTSBE122
00492         MOVE MSKL-REC               TO MSOL-REC                   DTSBE122
00493         IF MSOL-INACT-WITHDRAWN-88                                DTSBE122
00494            MOVE ZERO                TO WRK-LIAB-ENTRY-DATE        DTSBE122
00495         ELSE                                                      DTSBE122
00496            IF MSOL-INACT-ACTIVE-88                                DTSBE122
00497               MOVE MSOL-ESTB-DATE   TO WRK-LIAB-ENTRY-DATE        DTSBE122
00498            END-IF                                                 DTSBE122
00499         END-IF                                                    DTSBE122
00500         PERFORM S910-READ-NEXT      THRU S910-EXIT                DTSBE122
00501      END-PERFORM.                                                 DTSBE122
00502                                                                   DTSBE122
00503      IF WRK-LIAB-ENTRY-DATE > ZERO                                DTSBE122
00504         MOVE WRK-LIAB-ENTRY-DATE    TO R122-FR500-LIAB-DATE       DTSBE122
00505         PERFORM S946-WRITE-R122  THRU S946-EXIT                   DTSBE122
00506         DISPLAY 'FR500 ' MPRF-EMP-NO '  ' WRK-LIAB-ENTRY-DATE     DTSBE122
00507               '  ' MERA-SOURCE-CD                                 DTSBE122
00508      END-IF.                                                      DTSBE122
00509                                                                   DTSBE122
00510  P2100-EXIT.                                                      DTSBE122
00511      EXIT.                                                        DTSBE122
00512                                                                   DTSBE122
00513  P3000-PENDING-DETERMS.                                           DTSBE122
00514      IF MPRF-ESTB-DATE > WRK-6-MONTHS-AGO                         DTSBE122
00515         IF MPRF-STATUS-UNK-88                                     DTSBE122
00516            NEXT SENTENCE                                          DTSBE122
00517         ELSE                                                      DTSBE122
00518            GO TO P3000-EXIT                                       DTSBE122
00519         END-IF                                                    DTSBE122
00520      ELSE                                                         DTSBE122
00521         GO TO P3000-EXIT                                          DTSBE122
00522      END-IF.                                                      DTSBE122
00523                                                                   DTSBE122
00524                                                                   DTSBE122
00525      MOVE LOW-VALUES TO MERA-KEY-AREA.                            DTSBE122
00526      MOVE MPRF-EMP-NO TO MERA-EMP-NO.                             DTSBE122
00527      SET MERA-ERA-88 TO TRUE.                                     DTSBE122
00528      MOVE MERA-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE122
00529                                                                   DTSBE122
00530      PERFORM S910-READ THRU S910-EXIT.                            DTSBE122
00531      IF L910-OK-88                                                DTSBE122
00532         MOVE MSKL-REC TO MERA-REC                                 DTSBE122
00533         PERFORM P3100-BUILD-PEND-R122   THRU P3100-EXIT           DTSBE122
00534      END-IF.                                                      DTSBE122
00535                                                                   DTSBE122
00536  P3000-EXIT.                                                      DTSBE122
00537      EXIT.                                                        DTSBE122
00538                                                                   DTSBE122
00539  P3100-BUILD-PEND-R122.                                           DTSBE122
00540      SET R122-PENDING-DETERM-88     TO TRUE.                      DTSBE122
00541      MOVE SPACES          TO  R122-DATA-VAR-AREA.                 DTSBE122
00542      MOVE MPRF-EMP-NO     TO  R122-EMP-NO.                        DTSBE122
00543      MOVE MPRF-PRIMARY-NAME   TO  R122-PEND-PRIMARY-NAME          DTSBE122
00544      MOVE MERA-RESPONSIBLE-OP-ID  TO R122-OP-ID.                  DTSBE122
00545      MOVE ZERO            TO  R122-PERIOD-START-DATE              DTSBE122
00546                               R122-PERIOD-END-DATE                DTSBE122
00547                               R122-PEND-ACTION-DATE.              DTSBE122
00548                                                                   DTSBE122
00549      IF MPRF-ESTB-DATE > ZERO                                     DTSBE122
00550         MOVE MPRF-ESTB-DATE TO R122-PEND-REG-DATE                 DTSBE122
00551      ELSE                                                         DTSBE122
00552         MOVE MERA-ESTB-DATE TO R122-PEND-REG-DATE                 DTSBE122
00553      END-IF.                                                      DTSBE122
00554                                                                   DTSBE122
00555      IF MERA-MAIL-DATE-1 > ZERO                                   DTSBE122
00556         MOVE MERA-MAIL-DATE-1        TO R122-PEND-ACTION-DATE     DTSBE122
00557         SET R122-PEND-ACT-LTR1-88    TO TRUE                      DTSBE122
00558      END-IF.                                                      DTSBE122
00559                                                                   DTSBE122
00560      IF MERA-STATUS-RECD-88                                       DTSBE122
00561         MOVE MERA-RECEIVED-DATE     TO R122-PEND-ACTION-DATE      DTSBE122
00562         SET R122-PEND-ACT-RCVD-88   TO TRUE                       DTSBE122
00563         PERFORM P3110-WRITE         THRU P3110-EXIT               DTSBE122
00564         GO TO P3100-EXIT                                          DTSBE122
00565      END-IF.                                                      DTSBE122
00566                                                                   DTSBE122
00567      IF MERA-MAIL-DATE-2 > ZERO                                   DTSBE122
00568         MOVE MERA-MAIL-DATE-2        TO R122-PEND-ACTION-DATE     DTSBE122
00569         SET R122-PEND-ACT-LTR1-88    TO TRUE                      DTSBE122
00570      END-IF.                                                      DTSBE122
00571                                                                   DTSBE122
00572      IF MERA-FIELD-ASSIGN-DATE > ZERO                             DTSBE122
00573         MOVE MERA-FIELD-ASSIGN-DATE  TO R122-PEND-ACTION-DATE     DTSBE122
00574         SET R122-PEND-ACT-FLD-88     TO TRUE                      DTSBE122
00575      END-IF.                                                      DTSBE122
00576                                                                   DTSBE122
00577      IF MERA-COOP-AGENCY-REQ-DATE > ZERO                          DTSBE122
00578         MOVE MERA-COOP-AGENCY-REQ-DATE                            DTSBE122
00579                                      TO R122-PEND-ACTION-DATE     DTSBE122
00580         SET R122-PEND-ACT-COOP-88    TO TRUE                      DTSBE122
00581      END-IF.                                                      DTSBE122
00582                                                                   DTSBE122
00583      IF R122-PEND-ACTION-DATE = ZERO                              DTSBE122
00584         IF MERA-STATUS-NOT-LIAB-88                                DTSBE122
00585            DISPLAY 'NOT LIAB ' MPRF-EMP-NO '  '                   DTSBE122
00586                 MERA-DETER-NOTSUB-DATE                            DTSBE122
00587            GO TO P3100-EXIT                                       DTSBE122
00588         ELSE                                                      DTSBE122
00589            DISPLAY '*UNK   ' MPRF-EMP-NO                          DTSBE122
00590            GO TO P3100-EXIT                                       DTSBE122
00591         END-IF                                                    DTSBE122
00592      END-IF.                                                      DTSBE122
00593                                                                   DTSBE122
00594      PERFORM P3110-WRITE         THRU P3110-EXIT.                 DTSBE122
00595  P3100-EXIT.                                                      DTSBE122
00596      EXIT.                                                        DTSBE122
00597                                                                   DTSBE122
00598  P3110-WRITE.                                                     DTSBE122
00599      PERFORM S946-WRITE-R122  THRU S946-EXIT                      DTSBE122
00600      DISPLAY 'UNK   ' MPRF-EMP-NO '  ' R122-PEND-REG-DATE         DTSBE122
00601         '  ' R122-PEND-ACTION-DATE                                DTSBE122
00602         '  ' R122-PEND-ACT-TYPE.                                  DTSBE122
00603  P3110-EXIT.                                                      DTSBE122
00604      EXIT.                                                        DTSBE122
00605                                                                   DTSBE122
00606  T0000-TERMINATE.                                                 DTSBE122
00607      SKIP2                                                        DTSBE122
00608      SKIP2                                                        DTSBE122
00609  T0000-EXIT.                                                      DTSBE122
00610      EXIT.                                                        DTSBE122
00611      EJECT                                                        DTSBE122
00612  S001-FROM-FED-8.                                                 DTSBE122
00613      SET L001-FROM-FED-8 TO TRUE.                                 DTSBE122
00614      GO TO S001-DATE.                                             DTSBE122
00615      SKIP1                                                        DTSBE122
00616  S001-FROM-CAL-6.                                                 DTSBE122
00617      SET L001-FROM-CAL-6 TO TRUE.                                 DTSBE122
00618      GO TO S001-DATE.                                             DTSBE122
00619                                                                   DTSBE122
00620     S001-FROM-ABS-DAY.                                            DTSBE122
00621         SET L001-FROM-ABS-DAY TO TRUE.                            DTSBE122
00622         GO TO S001-DATE.                                          DTSBE122
00623                                                                   DTSBE122
00624  S001-DATE.                                                       DTSBE122
00625      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBE122
00626  S001-EXIT.                                                       DTSBE122
00627      EXIT.                                                        DTSBE122
00628                                                                   DTSBE122
00629 *** S004-FROM-5.                                                  DTSBE122
00630 ***     SET L004-FROM-5 TO TRUE.                                  DTSBE122
00631 ***     GO TO S004-QTR.                                           DTSBE122
00632                                                                   DTSBE122
00633 *** S004-FROM-ABS.                                                DTSBE122
00634 ***     SET L004-FROM-ABS TO TRUE.                                DTSBE122
00635 ***     GO TO S004-QTR.                                           DTSBE122
00636                                                                   DTSBE122
00637 *** S004-FROM-3.                                                  DTSBE122
00638 ***     SET L004-FROM-3 TO TRUE.                                  DTSBE122
00639 ***     GO TO S004-QTR.                                           DTSBE122
00640                                                                   DTSBE122
00641  S004-FROM-DATE.                                                  DTSBE122
00642      SET L004-FROM-DATE TO TRUE.                                  DTSBE122
00643      GO TO S004-QTR.                                              DTSBE122
00644      SKIP1                                                        DTSBE122
00645  S004-QTR.                                                        DTSBE122
00646      SKIP1                                                        DTSBE122
00647      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBE122
00648      SKIP1                                                        DTSBE122
00649  S004-EXIT.                                                       DTSBE122
00650      EXIT.                                                        DTSBE122
00651      SKIP3                                                        DTSBE122
00652 *** S910-READ.                                                    DTSBE122
00653 ***     SET L910-READ-88 TO TRUE.                                 DTSBE122
00654 ***     GO TO S910-MSTR-IO.                                       DTSBE122
00655                                                                   DTSBE122
00656  S910-START-BROWSE.                                               DTSBE122
00657      SET L910-START-BROWSE-88 TO TRUE.                            DTSBE122
00658      GO TO S910-MSTR-IO.                                          DTSBE122
00659      SKIP1                                                        DTSBE122
00660  S910-READ-NEXT.                                                  DTSBE122
00661      SET L910-READ-NEXT-88 TO TRUE.                               DTSBE122
00662      GO TO S910-MSTR-IO.                                          DTSBE122
00663      SKIP1                                                        DTSBE122
00664  S910-READ.                                                       DTSBE122
00665      SET L910-READ-88      TO TRUE.                               DTSBE122
00666      GO TO S910-MSTR-IO.                                          DTSBE122
00667      SKIP1                                                        DTSBE122
00668 *** S910-COUNT.                                                   DTSBE122
00669 ***     SET L910-COUNT-88 TO TRUE.                                DTSBE122
00670 ***     GO TO S910-MSTR-IO.                                       DTSBE122
00671                                                                   DTSBE122
00672  S910-MSTR-IO.                                                    DTSBE122
00673      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBE122
00674                            MSKL-REC.                              DTSBE122
00675  S910-EXIT.                                                       DTSBE122
00676      EXIT.                                                        DTSBE122
00677      SKIP3                                                        DTSBE122
00678  S946-WRITE-R122.                                                 DTSBE122
00679      CALL 'DTSBU946' USING R122-REC.                              DTSBE122
00680      GO TO S946-EXIT.                                             DTSBE122
00681      SKIP1                                                        DTSBE122
00682  S946-EXIT.                                                       DTSBE122
00683      EXIT.                                                        DTSBE122
00684      SKIP3                                                        DTSBE122
00685  S999-ABEND.                                                      DTSBE122
00686      DISPLAY '*** DTSBE122 ABENDING.  '                           DTSBE122
00687              ABEND-MSG.                                           DTSBE122
00688      SKIP1                                                        DTSBE122
00689      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBE122
00690  S999-EXIT.                                                       DTSBE122
00691      EXIT.                                                        DTSBE122
