00001  IDENTIFICATION DIVISION.                                         07/18/11
00002  PROGRAM-ID.             DTSBE530.                                DTSBE530
00003  AUTHOR.                 TRW.                                        LV003
00004  DATE-WRITTEN.           APRIL 2001.                              DTSBE530
00005  DATE-COMPILED.                                                   DTSBE530
00006      SKIP3                                                        DTSBE530
00007 *****                                                             DTSBE530
00008 *                                                                 DTSBE530
00009 *    FUNCTION:  CALCULATE THE AVERAGE TAX AND TOTAL TAX RATES     DTSBE530
00010 *               AND PASS IT TO DTSBD790 FOR THE ETA-204 RPT.      DTSBE530
00011 *                                                                 DTSBE530
00012 *                                                                 DTSBE530
00013 *    MODIFICATION LOG:                                            DTSBE530
00014 *                                                                 DTSBE530
00015 *    04/02/2001  INITIAL DEVELOPMENT.                             DTSBE530
00016 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: GD    DTSBE530
00017 *                                                                 DTSBE530
00018 *                                                                 DTSBE530
00019 *    07/01/2011  MODIFIED PROGRAM TO MEET DOL NEW REQUIREMENTS    DTSBE530
00020 *                THE ETA-205 REPORT IS CANCELLED AND THE          DTSBE530
00021 *                AVERAGE TAX AND TOTAL RATE FIELDS IS MERGED      DTSBE530
00022 *                INTO THE ETA-204 REPORT. NEW PORGRAM WILL        DTSBE530
00023 *                WRITE THE R530 FILE TO CONTAIN THE RATE FEILDS   DTSBE530
00024 *                AND PASS IT TO PROGRAM DTSBD790 WHICH CREATES    DTSBE530
00025 *                THE ETA-204 REPORT.                              DTSBE530
00026 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: ZL1   DTSBE530
00027 *                                                                 DTSBE530
00028 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBE530
00029 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBE530
00030 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DTSBE530
00031 *                                                                 DTSBE530
00032 *                                                                 DTSBE530
00033 *  DESCRIPTION:                                                   DTSBE530
00034 *                                                                 DTSBE530
00035 *                                                                 DTSBE530
00036 *    INITIATION:                                                  DTSBE530
00037 *                                                                 DTSBE530
00038 *      SET LECM-MST-OPEN-READ-88 TO TRUE.                         DTSBE530
00039 *      SET LECM-REF-OPEN-READ-88 TO TRUE.                         DTSBE530
00040 *                                                                 DTSBE530
00041 *      EDIT PARAMTERS (SEE 530R1).                                DTSBE530
00042 *                                                                 DTSBE530
00043 *    PROCESSING:                                                  DTSBE530
00044 *                                                                 DTSBE530
00045 *      CALCULATE TAX RATES.                                       DTSBE530
00046 *                                                                 DTSBE530
00047 *                                                                 DTSBE530
00048 *    TERMINATION:                                                 DTSBE530
00049 *                                                                 DTSBE530
00050 *      NONE.                                                      DTSBE530
00051 *                                                                 DTSBE530
00052 *                                                                 DTSBE530
00053 *    RECORDS READ:                                                DTSBE530
00054 *                                                                 DTSBE530
00055 *      MASTER:                                                    DTSBE530
00056 *                                                                 DTSBE530
00057 *        MRCT                                                     DTSBE530
00058 *        MSOL                                                     DTSBE530
00059 *        MQTR                                                     DTSBE530
00060 *                                                                 DTSBE530
00061 *                                                                 DTSBE530
00062 *      ALTERNATE INDEX:                                           DTSBE530
00063 *                                                                 DTSBE530
00064 *        NONE.                                                    DTSBE530
00065 *                                                                 DTSBE530
00066 *                                                                 DTSBE530
00067 *      REFERENCE:                                                 DTSBE530
00068 *                                                                 DTSBE530
00069 *        NONE.                                                    DTSBE530
00070 *                                                                 DTSBE530
00071 *                                                                 DTSBE530
00072 *    RECORDS UPDATED:                                             DTSBE530
00073 *                                                                 DTSBE530
00074 *        NONE.                                                    DTSBE530
00075 *                                                                 DTSBE530
00076 *                                                                 DTSBE530
00077 *    REPORT RECORDS WRITTEN:                                      DTSBE530
00078 *                                                                 DTSBE530
00079 *        R520  ETA-205 REPORT.                                    DTSBE530
00080 *                                                                 DTSBE530
00081 *                                                                 DTSBE530
00082 *    BATCH TRANSACTION COLLECTION RECORDS WRITTEN:                DTSBE530
00083 *                                                                 DTSBE530
00084 *        NONE.                                                    DTSBE530
00085 *                                                                 DTSBE530
00086 *                                                                 DTSBE530
00087 *    MODULES CALLED:                                              DTSBE530
00088 *                                                                 DTSBE530
00089 *        DTSBU001  DATE CONVERSION/EDIT.                          DTSBE530
00090 *        DTSBU004  QUARTER EDIT/CONVERSION.                       DTSBE530
00091 *        DTSBU004  RATE YEAR START/END QUARTER AND DATE.          DTSBE530
00092 *        DTSBU054  UI RATE DETERMINATION.                         DTSBE530
00093 *        DTSBU055  RATING EXPERIENCE PERIOD RELATED DATES.        DTSBE530
00094 *        DTSBU910  MASTER FILE I/O.                               DTSBE530
00095 *        DTSBU931  REFERENCE FILE I/O.                            DTSBE530
00096 *        DTSBU946  VARIABLE LENGTH RECORDS SEQUENTIAL OUTPUT 1.   DTSBE530
00097 *                                                                 DTSBE530
00098 *****                                                             DTSBE530
00099      SKIP3                                                        DTSBE530
00100  ENVIRONMENT DIVISION.                                            DTSBE530
00101      SKIP3                                                        DTSBE530
00102  DATA DIVISION.                                                   DTSBE530
00103      EJECT                                                        DTSBE530
00104  WORKING-STORAGE SECTION.                                         DTSBE530
001045 77  PAN-VALET PICTURE X(24) VALUE '003DTSBE530  07/18/11'.       DTSBE530
00105      SKIP3                                                        DTSBE530
00106  01  WRK-AREA.                                                    DTSBE530
00107      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +530.DTSBE530
00108                                                                   DTSBE530
00109      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DTSBE530'.DTSBE530
00110                                                                   DTSBE530
00111                                                                   DTSBE530
00112      05  ABEND-MSG                   PIC  X(60).                  DTSBE530
00113                                                                   DTSBE530
00114      05  WRK-BYPASS-IND              PIC  X(01).                  DTSBE530
00115          88  WRK-BYPASS-YES       VALUE 'Y'.                      DTSBE530
00116          88  WRK-BYPASS-NO        VALUE 'N'.                      DTSBE530
00117                                                                   DTSBE530
00118      05  WRK-PARM-CURR-YEAR          PIC S9(09)  COMP-3.          DTSBE530
00119      05  WRK-CURR-YEAR-END           PIC S9(09)  COMP-3.          DTSBE530
00120      05  WRK-PAYMENT-SUM             PIC S9(09)V9(02)  COMP-3     DTSBE530
00121                                   VALUE +0.                       DTSBE530
00122                                                                   DTSBE530
00123                                                                   DTSBE530
00124      05  WRK-YR2-DATE                PIC S9(09)        COMP-3.    DTSBE530
00125      05  WRK-YR2-YEAR                PIC S9(04)        COMP-3.    DTSBE530
00126      05  WRK-YR2-START-YRQ           PIC S9(05)        COMP-3.    DTSBE530
00127      05  WRK-YR2-TOT-WAGE-SUM        PIC S9(11)V9(02)  COMP-3     DTSBE530
00128                                   VALUE +0.                       DTSBE530
00129      05  WRK-YR2-TAX-WAGE-SUM        PIC S9(11)V9(02)  COMP-3     DTSBE530
00130                                   VALUE +0.                       DTSBE530
00131      05  WRK-YR2-PAYMENT-SUM         PIC S9(11)V9(02)  COMP-3     DTSBE530
00132                                   VALUE +0.                       DTSBE530
00133      05  WRK-YR-2-AVG-TAX-RATE       PIC S9(11)V9(04)  COMP-3     DTSBE530
00134                                   VALUE +0.                       DTSBE530
00135      05  WRK-YR-2-AVG-TOT-RATE       PIC S9(11)V9(04)  COMP-3     DTSBE530
00136                                   VALUE +0.                       DTSBE530
00137      05  WRK-YR2-START-ABSTIME       PIC S9(15) COMP-3.           DTSBE530
00138                                                                   DTSBE530
00139      EJECT                                                        DTSBE530
00140  01  L001-LINK-AREA.                                              DTSBE530
00141  ++INCLUDE DTSIL001                                               DTSBE530
00142      SKIP3                                                        DTSBE530
00143  01  L004-LINK-AREA.                                              DTSBE530
00144  ++INCLUDE DTSIL004                                               DTSBE530
00145      SKIP3                                                        DTSBE530
00146  01  L005-LINK-AREA.                                              DTSBE530
00147  ++INCLUDE DTSIL005                                               DTSBE530
00148      SKIP3                                                        DTSBE530
00149  01  L910-LINK-AREA.                                              DTSBE530
00150  ++INCLUDE DTSIL910                                               DTSBE530
00151      SKIP3                                                        DTSBE530
00152  01  MSKL-REC.                                                    DTSBE530
00153  ++INCLUDE DTSIMSKL                                               DTSBE530
00154      SKIP3                                                        DTSBE530
00155  01  MRCT-REC.                                                    DTSBE530
00156  ++INCLUDE DTSIMRCT                                               DTSBE530
00157      SKIP3                                                        DTSBE530
00158  01  MQTR-REC.                                                    DTSBE530
00159  ++INCLUDE DTSIMQTR                                               DTSBE530
00160      EJECT                                                        DTSBE530
00161  01  MJRN-REC.                                                    DTSBE530
00162  ++INCLUDE DTSIMJRN                                               DTSBE530
00163      EJECT                                                        DTSBE530
00164  01  R530-REC.                                                    DTSBE530
00165  ++INCLUDE DTSIR530                                               DTSBE530
00166      EJECT                                                        DTSBE530
00167  01  MMAX-LITERALS.                                               DTSBE530
00168  ++INCLUDE DTSIMMAX                                               DTSBE530
00169      EJECT                                                        DTSBE530
00170  LINKAGE SECTION.                                                 DTSBE530
00171      SKIP3                                                        DTSBE530
00172  01  LECM-LINK-AREA.                                              DTSBE530
00173  ++INCLUDE DTSILECM                                               DTSBE530
00174      SKIP3                                                        DTSBE530
00175          10  FILLER REDEFINES LECM-EXTRACT-PARMS.                 DTSBE530
00176              15  LECM-PARM-CURR-YEAR         PIC  X(04).          DTSBE530
00177              15  FILLER                      PIC  X(64).          DTSBE530
00178      EJECT                                                        DTSBE530
00179  01  MPRF-LINK-REC.                                               DTSBE530
00180  ++INCLUDE DTSIMPRF                                               DTSBE530
00181      EJECT                                                        DTSBE530
00182  PROCEDURE DIVISION USING LECM-LINK-AREA                          DTSBE530
00183                           MPRF-LINK-REC.                          DTSBE530
00184                                                                   DTSBE530
00185                                                                   DTSBE530
00186      IF LECM-PROCESS-88                                           DTSBE530
00187          PERFORM P0000-PROCESS THRU P0000-EXIT                    DTSBE530
00188      ELSE                                                         DTSBE530
00189      IF LECM-INITIALIZE-88                                        DTSBE530
00190          PERFORM I0000-INITIALIZE THRU I0000-EXIT                 DTSBE530
00191      ELSE                                                         DTSBE530
00192      IF LECM-TERMINATE-88                                         DTSBE530
00193          PERFORM T0000-TERMINATE THRU T0000-EXIT                  DTSBE530
00194      ELSE                                                         DTSBE530
00195          MOVE 'INVALID LECM-CALL-TYPE-IND ENCOUNTERED'            DTSBE530
00196            TO ABEND-MSG                                           DTSBE530
00197          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE530
00198                                                                   DTSBE530
00199                                                                   DTSBE530
00200      GOBACK.                                                      DTSBE530
00201      EJECT                                                        DTSBE530
00202  I0000-INITIALIZE.                                                DTSBE530
00203      MOVE LECM-TRACE-IND TO L910-TRACE-IND.                       DTSBE530
00204                                                                   DTSBE530
00205      MOVE WRK-MOD-NAME TO L910-MOD-NAME.                          DTSBE530
00206                                                                   DTSBE530
00207                                                                   DTSBE530
00208      PERFORM I1000-EDIT-AND-DEFAULT-PARMS THRU I1000-EXIT.        DTSBE530
00209                                                                   DTSBE530
00210                                                                   DTSBE530
00211      MOVE LENGTH OF R530-REC TO R530-LENGTH.                      DTSBE530
00212                                                                   DTSBE530
00213      MOVE '530' TO R530-REC-TYPE.                                 DTSBE530
00214                                                                   DTSBE530
00215      SET LECM-MST-OPEN-READ-88 TO TRUE.                           DTSBE530
00216                                                                   DTSBE530
00217      SET LECM-REF-OPEN-READ-88 TO TRUE.                           DTSBE530
00218  I0000-EXIT.                                                      DTSBE530
00219      EXIT.                                                        DTSBE530
00220      SKIP3                                                        DTSBE530
00221  I1000-EDIT-AND-DEFAULT-PARMS.                                    DTSBE530
00222      PERFORM I1100-CURR-YEAR THRU I1100-EXIT.                     DTSBE530
00223      PERFORM I1200-YR2-DATES THRU I1200-EXIT.                     DTSBE530
00224                                                                   DTSBE530
00225      DISPLAY 'DTSBE530 DATES: '                                   DTSBE530
00226      DISPLAY '   CURR YEAR:      ' WRK-PARM-CURR-YEAR.            DTSBE530
00227      DISPLAY '   CURR YEAR END:  ' WRK-CURR-YEAR-END.             DTSBE530
00228      DISPLAY '   YEAR 2 DATE:    ' WRK-YR2-DATE.                  DTSBE530
00229      DISPLAY '   YEAR 2 YEAR:    ' WRK-YR2-YEAR.                  DTSBE530
00230  I1000-EXIT.                                                      DTSBE530
00231      EXIT.                                                        DTSBE530
00232      SKIP3                                                        DTSBE530
00233  I1100-CURR-YEAR.                                                 DTSBE530
00234      IF LECM-PARM-CURR-YEAR = SPACES                              DTSBE530
00235          PERFORM I1110-DEFAULT-YEAR    THRU I1110-EXIT            DTSBE530
00236      ELSE                                                         DTSBE530
00237          MOVE 'LECM LAST RATE YRQ RESULTS IN INVALID YEAR'        DTSBE530
00238            TO ABEND-MSG                                           DTSBE530
00239          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE530
00240                                                                   DTSBE530
00241  I1100-EXIT.                                                      DTSBE530
00242      EXIT.                                                        DTSBE530
00243                                                                   DTSBE530
00244  I1110-DEFAULT-YEAR.                                              DTSBE530
00245      MOVE LECM-LAST-RATE-END-YRQ   TO L004-QTR-5-9.               DTSBE530
00246      PERFORM S004-FROM-5           THRU S004-EXIT.                DTSBE530
00247      IF L004-VALID-QTR                                            DTSBE530
00248         MOVE L004-QTR-END-DATE     TO WRK-CURR-YEAR-END           DTSBE530
00249      ELSE                                                         DTSBE530
00250          MOVE 'LECM LAST RATE YRQ RESULTS IN INVALID YEAR'        DTSBE530
00251            TO ABEND-MSG                                           DTSBE530
00252          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE530
00253                                                                   DTSBE530
00254      MOVE 1                        TO L004-QTR-5-Q.               DTSBE530
00255      PERFORM S004-FROM-5           THRU S004-EXIT.                DTSBE530
00256      IF L004-VALID-QTR                                            DTSBE530
00257         MOVE L004-QTR-START-DATE   TO WRK-PARM-CURR-YEAR          DTSBE530
00258      ELSE                                                         DTSBE530
00259          MOVE 'LECM LAST RATE YRQ RESULTS IN INVALID YEAR'        DTSBE530
00260            TO ABEND-MSG                                           DTSBE530
00261          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE530
00262                                                                   DTSBE530
00263      DISPLAY 'DEFAULT CURR YEAR ' WRK-PARM-CURR-YEAR.             DTSBE530
00264                                                                   DTSBE530
00265  I1110-EXIT.                                                      DTSBE530
00266      EXIT.                                                        DTSBE530
00267                                                                   DTSBE530
00268  I1200-YR2-DATES.                                                 DTSBE530
00269      MOVE WRK-PARM-CURR-YEAR       TO L001-FED-8-DATE-9.          DTSBE530
00270      SUBTRACT 1 FROM L001-FED-8-YR.                               DTSBE530
00271      PERFORM S001-FROM-FED-8       THRU S001-EXIT.                DTSBE530
00272      MOVE L001-FED-8-DATE-9        TO WRK-YR2-DATE.               DTSBE530
00273      MOVE L001-FED-8-YR            TO WRK-YR2-YEAR.               DTSBE530
00274                                                                   DTSBE530
00275      MOVE WRK-YR2-YEAR             TO L004-QTR-5-YR.              DTSBE530
00276      MOVE 1                        TO L004-QTR-5-Q.               DTSBE530
00277      PERFORM S004-FROM-5           THRU S004-EXIT.                DTSBE530
00278      IF L004-VALID-QTR                                            DTSBE530
00279         MOVE L004-QTR-5-9          TO WRK-YR2-START-YRQ           DTSBE530
00280      ELSE                                                         DTSBE530
00281          MOVE 'PARM-CURR-YEAR RESULTS IN INVALID QTR'             DTSBE530
00282            TO ABEND-MSG                                           DTSBE530
00283          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBE530
00284                                                                   DTSBE530
00285      MOVE L001-FED-8-DATE-9        TO L005-DATE.                  DTSBE530
00286      MOVE ZERO                     TO L005-TIME.                  DTSBE530
00287      PERFORM S005-FROM-DATE-TIME   THRU S005-EXIT.                DTSBE530
00288      MOVE L005-ABSTIME             TO WRK-YR2-START-ABSTIME.      DTSBE530
00289                                                                   DTSBE530
00290                                                                   DTSBE530
00291  I1200-EXIT.                                                      DTSBE530
00292      EXIT.                                                        DTSBE530
00293                                                                   DTSBE530
00294  P0000-PROCESS.                                                   DTSBE530
00295      IF MPRF-CLASS-RATED-88                                       DTSBE530
00296          NEXT SENTENCE                                            DTSBE530
00297      ELSE                                                         DTSBE530
00298          GO TO P0000-EXIT.                                        DTSBE530
00299                                                                   DTSBE530
00300      SET WRK-BYPASS-NO   TO TRUE.                                 DTSBE530
00301                                                                   DTSBE530
00302      PERFORM P1000-READ-MRCT  THRU  P1000-EXIT.                   DTSBE530
00303                                                                   DTSBE530
00304      IF WRK-BYPASS-YES                                            DTSBE530
00305          GO TO P0000-EXIT.                                        DTSBE530
00306                                                                   DTSBE530
00307      PERFORM P2000-GET-WAGES     THRU P2000-EXIT.                 DTSBE530
00308                                                                   DTSBE530
00309      PERFORM P3000-GET-PAYMENTS  THRU P3000-EXIT.                 DTSBE530
00310                                                                   DTSBE530
00311                                                                   DTSBE530
00312  P0000-EXIT.                                                      DTSBE530
00313      EXIT.                                                        DTSBE530
00314      SKIP3                                                        DTSBE530
00315      EJECT                                                        DTSBE530
00316  P1000-READ-MRCT.                                                 DTSBE530
00317      MOVE LOW-VALUES TO MRCT-KEY-AREA.                            DTSBE530
00318      MOVE MPRF-EMP-NO TO MRCT-EMP-NO.                             DTSBE530
00319      SET MRCT-RCT-88 TO TRUE.                                     DTSBE530
00320                                                                   DTSBE530
00321      MOVE WRK-YR2-START-YRQ TO MRCT-EFF-YRQ.                      DTSBE530
00322      MOVE MRCT-KEY-AREA TO MSKL-KEY-AREA.                         DTSBE530
00323                                                                   DTSBE530
00324      PERFORM S910-READ THRU S910-EXIT.                            DTSBE530
00325      IF L910-OK-88                                                DTSBE530
00326         MOVE MSKL-REC TO MRCT-REC                                 DTSBE530
00327         IF MRCT-TRANSFERRED-TO-EMP-NO > +0                        DTSBE530
00328            DISPLAY 'BYPASS2 ' MRCT-EMP-NO                         DTSBE530
00329            SET WRK-BYPASS-YES TO TRUE                             DTSBE530
00330            GO TO P1000-EXIT.                                      DTSBE530
00331                                                                   DTSBE530
00332  P1000-EXIT.                                                      DTSBE530
00333      EXIT.                                                        DTSBE530
00334      EJECT                                                        DTSBE530
00335  P2000-GET-WAGES.                                                 DTSBE530
00336      MOVE LOW-VALUES TO MQTR-KEY-AREA.                            DTSBE530
00337                                                                   DTSBE530
00338      MOVE MPRF-EMP-NO TO MQTR-EMP-NO.                             DTSBE530
00339                                                                   DTSBE530
00340      MOVE WRK-YR2-START-YRQ TO MQTR-YRQ.                          DTSBE530
00341                                                                   DTSBE530
00342      SET MQTR-QTR-88 TO TRUE.                                     DTSBE530
00343                                                                   DTSBE530
00344      MOVE MQTR-KEY-AREA  TO MSKL-KEY-AREA.                        DTSBE530
00345                                                                   DTSBE530
00346      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE530
00347                                                                   DTSBE530
00348      PERFORM                                                      DTSBE530
00349        UNTIL L910-NO-REC-88                                       DTSBE530
00350          MOVE MSKL-REC TO MQTR-REC                                DTSBE530
00351          PERFORM P2100-SUM-WAGES    THRU P2100-EXIT               DTSBE530
00352          PERFORM S910-READ-NEXT THRU S910-EXIT                    DTSBE530
00353      END-PERFORM.                                                 DTSBE530
00354                                                                   DTSBE530
00355  P2000-EXIT.                                                      DTSBE530
00356      EXIT.                                                        DTSBE530
00357                                                                   DTSBE530
00358  P2100-SUM-WAGES.                                                 DTSBE530
00359      MOVE MQTR-YRQ            TO L004-QTR-5-9.                    DTSBE530
00360      IF L004-QTR-5-YR = WRK-YR2-YEAR                              DTSBE530
00361         ADD MQTR-TOT-WAGE     TO WRK-YR2-TOT-WAGE-SUM             DTSBE530
00362         ADD MQTR-TAX-WAGE     TO WRK-YR2-TAX-WAGE-SUM.            DTSBE530
00363                                                                   DTSBE530
00364  P2100-EXIT.                                                      DTSBE530
00365      EXIT.                                                        DTSBE530
00366                                                                   DTSBE530
00367  P3000-GET-PAYMENTS.                                              DTSBE530
00368      MOVE LOW-VALUES TO MJRN-KEY-AREA.                            DTSBE530
00369                                                                   DTSBE530
00370      MOVE MPRF-EMP-NO TO MJRN-EMP-NO.                             DTSBE530
00371                                                                   DTSBE530
00372      SET MJRN-JRN-88 TO TRUE.                                     DTSBE530
00373                                                                   DTSBE530
00374      MOVE WRK-YR2-START-ABSTIME  TO MJRN-ESTB-ABSTIME.            DTSBE530
00375                                                                   DTSBE530
00376      MOVE MJRN-REC     TO MSKL-REC.                               DTSBE530
00377                                                                   DTSBE530
00378      PERFORM S910-START-BROWSE THRU S910-EXIT.                    DTSBE530
00379                                                                   DTSBE530
00380      PERFORM                                                      DTSBE530
00381        UNTIL L910-NO-REC-88                                       DTSBE530
00382          MOVE MSKL-REC TO MJRN-REC                                DTSBE530
00383          PERFORM P3100-SUM-PAYMENTS THRU P3100-EXIT               DTSBE530
00384          PERFORM S910-READ-NEXT THRU S910-EXIT                    DTSBE530
00385      END-PERFORM.                                                 DTSBE530
00386                                                                   DTSBE530
00387  P3000-EXIT.                                                      DTSBE530
00388      EXIT.                                                        DTSBE530
00389                                                                   DTSBE530
00390  P3100-SUM-PAYMENTS.                                              DTSBE530
00391      MOVE ZERO                TO WRK-PAYMENT-SUM.                 DTSBE530
00392      MOVE MJRN-ESTB-DATE      TO L001-FED-8-DATE-9.               DTSBE530
00393      IF L001-FED-8-YR = WRK-YR2-YEAR                              DTSBE530
00394         PERFORM P3110-SCAN-TABLE  THRU P3110-EXIT                 DTSBE530
00395         ADD WRK-PAYMENT-SUM   TO WRK-YR2-PAYMENT-SUM.             DTSBE530
00396  P3100-EXIT.                                                      DTSBE530
00397      EXIT.                                                        DTSBE530
00398                                                                   DTSBE530
00399  P3110-SCAN-TABLE.                                                DTSBE530
00400      PERFORM                                                      DTSBE530
00401         VARYING MJRN-OCC-IDX FROM +1 BY +1                        DTSBE530
00402         UNTIL MJRN-OCC-IDX > MJRN-OCC-CNT                         DTSBE530
00403            IF MJRN-ROW-UI-88 (MJRN-OCC-IDX)                       DTSBE530
00404            AND MJRN-COL-PAID-88 (MJRN-OCC-IDX)                    DTSBE530
00405               ADD MJRN-AMT (MJRN-OCC-IDX)                         DTSBE530
00406                   TO WRK-PAYMENT-SUM                              DTSBE530
00407            END-IF                                                 DTSBE530
00408      END-PERFORM.                                                 DTSBE530
00409                                                                   DTSBE530
00410  P3110-EXIT.                                                      DTSBE530
00411      EXIT.                                                        DTSBE530
00412                                                                   DTSBE530
00413      EJECT                                                        DTSBE530
00414  T0000-TERMINATE.                                                 DTSBE530
00415                                                                   DTSBE530
00416      DISPLAY 'YR2 PAY ' WRK-YR2-PAYMENT-SUM.                      DTSBE530
00417      DISPLAY 'YR2 TAX ' WRK-YR2-TAX-WAGE-SUM.                     DTSBE530
00418      DISPLAY 'YR2 TOT ' WRK-YR2-TOT-WAGE-SUM.                     DTSBE530
00419                                                                   DTSBE530
00420                                                                   DTSBE530
00421      IF WRK-YR2-TAX-WAGE-SUM = ZERO                               DTSBE530
00422      OR WRK-YR2-TOT-WAGE-SUM = ZERO                               DTSBE530
00423         DISPLAY '>>>  ZEROS IN WAGE AMOUNTS   <<<'                DTSBE530
00424         DISPLAY '>>>  NO R530 RECORD WRITTEN  <<<'                DTSBE530
00425         GO TO T0000-EXIT.                                         DTSBE530
00426                                                                   DTSBE530
00427      COMPUTE WRK-YR-2-AVG-TAX-RATE =                              DTSBE530
00428         (WRK-YR2-PAYMENT-SUM / WRK-YR2-TAX-WAGE-SUM).             DTSBE530
00429                                                                   DTSBE530
00430      COMPUTE WRK-YR-2-AVG-TOT-RATE  =                             DTSBE530
00431         (WRK-YR2-PAYMENT-SUM / WRK-YR2-TOT-WAGE-SUM).             DTSBE530
00432                                                                   DTSBE530
00433                                                                   DTSBE530
00434      MULTIPLY  WRK-YR-2-AVG-TAX-RATE BY 100 GIVING                DTSBE530
00435                R530-YR-2-AVG-TAX-RATE ROUNDED.                    DTSBE530
00436      MULTIPLY  WRK-YR-2-AVG-TOT-RATE BY 100 GIVING                DTSBE530
00437                 R530-YR-2-AVG-TOT-RATE ROUNDED.                   DTSBE530
00438                                                                   DTSBE530
00439      DISPLAY 'TAX RATE ' R530-YR-2-AVG-TAX-RATE.                  DTSBE530
00440      DISPLAY 'TOT RATE ' R530-YR-2-AVG-TOT-RATE.                  DTSBE530
00441      PERFORM S946-WRITE-R530 THRU S946-EXIT.                      DTSBE530
00442                                                                   DTSBE530
00443  T0000-EXIT.                                                      DTSBE530
00444      EXIT.                                                        DTSBE530
00445      EJECT                                                        DTSBE530
00446  S001-FROM-FED-8.                                                 DTSBE530
00447      SET L001-FROM-FED-8 TO TRUE.                                 DTSBE530
00448      GO TO S001-DATE.                                             DTSBE530
00449                                                                   DTSBE530
00450  S001-FROM-CAL-6.                                                 DTSBE530
00451      SET L001-FROM-CAL-6 TO TRUE.                                 DTSBE530
00452      GO TO S001-DATE.                                             DTSBE530
00453                                                                   DTSBE530
00454 *S001-FROM-ABS-DAY.                                               DTSBE530
00455 *****SET L001-FROM-ABS-DAY TO TRUE.                               DTSBE530
00456 *****GO TO S001-DATE.                                             DTSBE530
00457                                                                   DTSBE530
00458  S001-DATE.                                                       DTSBE530
00459      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBE530
00460  S001-EXIT.                                                       DTSBE530
00461      EXIT.                                                        DTSBE530
00462      SKIP3                                                        DTSBE530
00463  S004-FROM-5.                                                     DTSBE530
00464      SET L004-FROM-5 TO TRUE.                                     DTSBE530
00465      GO TO S004-QTR.                                              DTSBE530
00466                                                                   DTSBE530
00467 *S004-FROM-ABS.                                                   DTSBE530
00468 *****SET L004-FROM-ABS TO TRUE.                                   DTSBE530
00469 *****GO TO S004-QTR.                                              DTSBE530
00470                                                                   DTSBE530
00471  S004-FROM-3.                                                     DTSBE530
00472      SET L004-FROM-3 TO TRUE.                                     DTSBE530
00473      GO TO S004-QTR.                                              DTSBE530
00474                                                                   DTSBE530
00475  S004-QTR.                                                        DTSBE530
00476      CALL 'DTSBU004' USING L004-LINK-AREA.                        DTSBE530
00477  S004-EXIT.                                                       DTSBE530
00478      EXIT.                                                        DTSBE530
00479      SKIP3                                                        DTSBE530
00480  S005-FROM-DATE-TIME.                                             DTSBE530
00481      SET L005-FROM-DATE-TIME TO TRUE.                             DTSBE530
00482                                                                   DTSBE530
00483      CALL 'DTSBU005' USING L005-LINK-AREA.                        DTSBE530
00484  S005-EXIT.                                                       DTSBE530
00485      EXIT.                                                        DTSBE530
00486      SKIP3                                                        DTSBE530
00487  S910-READ.                                                       DTSBE530
00488      SET L910-READ-88 TO TRUE.                                    DTSBE530
00489      GO TO S910-MSTR-IO.                                          DTSBE530
00490                                                                   DTSBE530
00491  S910-START-BROWSE.                                               DTSBE530
00492      SET L910-START-BROWSE-88 TO TRUE.                            DTSBE530
00493      GO TO S910-MSTR-IO.                                          DTSBE530
00494                                                                   DTSBE530
00495  S910-READ-NEXT.                                                  DTSBE530
00496      SET L910-READ-NEXT-88 TO TRUE.                               DTSBE530
00497      GO TO S910-MSTR-IO.                                          DTSBE530
00498                                                                   DTSBE530
00499 *S910-COUNT.                                                      DTSBE530
00500 *****SET L910-COUNT-88 TO TRUE.                                   DTSBE530
00501 *****GO TO S910-MSTR-IO.                                          DTSBE530
00502                                                                   DTSBE530
00503  S910-MSTR-IO.                                                    DTSBE530
00504      CALL 'DTSBU910' USING L910-LINK-AREA                         DTSBE530
00505                            MSKL-REC.                              DTSBE530
00506  S910-EXIT.                                                       DTSBE530
00507      EXIT.                                                        DTSBE530
00508      SKIP3                                                        DTSBE530
00509  S946-WRITE-R530.                                                 DTSBE530
00510      CALL 'DTSBU946' USING R530-REC.                              DTSBE530
00511      GO TO S946-EXIT.                                             DTSBE530
00512                                                                   DTSBE530
00513  S946-EXIT.                                                       DTSBE530
00514      EXIT.                                                        DTSBE530
00515      SKIP3                                                        DTSBE530
00516  S999-ABEND.                                                      DTSBE530
00517      DISPLAY '*** DTSBE530 ABENDING.  '                           DTSBE530
00518              ABEND-MSG.                                           DTSBE530
00519                                                                   DTSBE530
00520      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBE530
00521  S999-EXIT.                                                       DTSBE530
00522      EXIT.                                                        DTSBE530
