00001  IDENTIFICATION DIVISION.                                         02/09/00
00002  PROGRAM-ID.             DTSBE764.                                DTSBE764
00003  AUTHOR.                 TRW.                                        LV044
00004  DATE-WRITTEN.           SEPTEMBER 1999.                             CL**8
00005  DATE-COMPILED.                                                   DTSBE764
00006                                                                      CL**4
00007 *****                                                             DTSBE764
00008 *                                                                 DTSBE764
00009 *    FUNCTION:  JOB SERVICE TAX FILE DOWNLOAD.                       CL**8
00010 *                                                                 DTSBE764
00011 *                                                                 DTSBE764
00012 *    MODIFICATION LOG:                                            DTSBE764
00013 *                                                                 DTSBE764
00014 *    09/27/99  INITIAL DEVELOPMENT.                                  CL**8
00015 *              WORK ORDER: DIR #00043           PROGRAMMER: TKT      CL**8
00016 *                                                                    CL**4
00017 *    XX/XX/XX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**4
00018 *              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**4
00019 *              WORK ORDER:                      PROGRAMMER: XXX      CL**4
00020 *                                                                 DTSBE764
00021 *                                                                 DTSBE764
00022 *  DESCRIPTION:                                                   DTSBE764
00023 *                                                                 DTSBE764
00024 *      EXTRACT DATA FROM TAX MASTER FILE AND WRITE THE               CL*12
00025 *      JOB SERVICE DOWNLOAD FILE.                                    CL*12
00026 *                                                                 DTSBE764
00027 *                                                                 DTSBE764
00028 *      REPORT RECORDS INPUT:                                      DTSBE764
00029 *                                                                 DTSBE764
00030 *        NONE                                                     DTSBE764
00031 *                                                                 DTSBE764
00032 *                                                                 DTSBE764
00033 *      TAPES INPUT:                                               DTSBE764
00034 *                                                                 DTSBE764
00035 *        NONE.                                                    DTSBE764
00036 *                                                                 DTSBE764
00037 *                                                                 DTSBE764
00038 *      MASTER FILE RECORDS READ:                                  DTSBE764
00039 *                                                                 DTSBE764
00040 *        MPRF                                                     DTSBE764
00041 *        MTAD                                                     DTSBE764
00042 *        MSOL                                                        CL*12
00043 *        MOPO                                                        CL*12
00044 *        MQTR                                                        CL*12
00045 *                                                                 DTSBE764
00046 *      MASTER FILE RECORDS UPDATED:                               DTSBE764
00047 *                                                                 DTSBE764
00048 *        NONE.                                                    DTSBE764
00049 *                                                                 DTSBE764
00050 *                                                                 DTSBE764
00051 *      RECORDS WRITTEN:                                           DTSBE764
00052 *                                                                 DTSBE764
00053 *        JOB SERVICE DOWNLOAD.                                       CL*12
00054 *                                                                 DTSBE764
00055 *                                                                 DTSBE764
00056 *      MODULES CALLED:                                            DTSBE764
00057 *                                                                 DTSBE764
00058 *        DTSBU910  MASTER FILE I/O.                                  CL**2
00059 *                                                                 DTSBE764
00060 *                                                                 DTSBE764
00061 *****                                                             DTSBE764
00062                                                                      CL**2
00063  ENVIRONMENT DIVISION.                                            DTSBE764
00064                                                                      CL**2
00065  INPUT-OUTPUT SECTION.                                            DTSBE764
00066                                                                      CL**2
00067  FILE-CONTROL.                                                    DTSBE764
00068      SELECT JS-FILE  ASSIGN TO DTSJSDL.                              CL**8
00069  DATA DIVISION.                                                   DTSBE764
00070                                                                      CL**2
00071  FILE SECTION.                                                    DTSBE764
00072                                                                      CL**2
00073  FD  JS-FILE                                                         CL**8
00074      LABEL RECORDS ARE STANDARD                                   DTSBE764
00075      RECORDING MODE IS F                                          DTSBE764
00076      BLOCK CONTAINS 0 RECORDS.                                    DTSBE764
00077                                                                      CL**2
00078  01  JS-REC.                                                         CL**8
00079  ++INCLUDE DTSIJSDL                                                  CL**8
00080      EJECT                                                        DTSBE764
00081  WORKING-STORAGE SECTION.                                         DTSBE764
000815 77  PAN-VALET PICTURE X(24) VALUE '044DTSBE764  02/09/00'.       DTSBE764
00082                                                                      CL**2
00083  01  WRK-AREA.                                                    DTSBE764
00084      05  WRK-ABEND-CD                PIC S9(04)  COMP VALUE +0764.   CL**8
00085                                                                   DTSBE764
00086      05  ABEND-MSG                   PIC  X(60).                  DTSBE764
00087                                                                   DTSBE764
00088      05  WRK-MPRF-REC-CNT            PIC S9(07)  COMP-3.          DTSBE764
00089                                                                   DTSBE764
00090      05  WRK-JSDL-REC-CNT            PIC S9(07)  COMP-3.             CL*12
00091      EJECT                                                        DTSBE764
00092  01  L910-LINK-AREA.                                              DTSBE764
00093  ++INCLUDE DTSIL910                                                  CL**2
00094      EJECT                                                        DTSBE764
00095  01  MSKL-REC.                                                    DTSBE764
00096  ++INCLUDE DTSIMSKL                                                  CL**2
00097      EJECT                                                        DTSBE764
00098  01  MTAD-REC.                                                       CL*33
00099  ++INCLUDE DTSIMTAD                                                  CL**2
00100      EJECT                                                        DTSBE764
00101  01  MSOL-REC.                                                       CL**8
00102  ++INCLUDE DTSIMSOL                                                  CL**8
00103      EJECT                                                           CL**8
00104  01  MQTR-REC.                                                       CL**8
00105  ++INCLUDE DTSIMQTR                                                  CL**8
00106      EJECT                                                           CL**8
00107  01  MOPO-REC.                                                       CL**8
00108  ++INCLUDE DTSIMOPO                                                  CL**8
00109      EJECT                                                           CL**8
00110 *  ADDED SECTION 02/07/00                                            CL*24
00111  LINKAGE SECTION.                                                    CL*25
00112                                                                      CL*24
00113  01 LECM-LINK-AREA.                                                  CL*24
00114  ++INCLUDE DTSILECM                                                  CL*24
00115      EJECT                                                           CL*33
00116  01  MPRF-REC.                                                       CL*33
00117  ++INCLUDE DTSIMPRF                                                  CL*33
00118      EJECT                                                           CL*33
00119 *                                                                    CL*24
00120  PROCEDURE DIVISION USING LECM-LINK-AREA MPRF-REC.                   CL*33
00121                                                                   DTSBE764
00122      EVALUATE LECM-CALL-TYPE-IND                                     CL*29
00123                                                                      CL*29
00124        WHEN 'I'                                                      CL*29
00125          PERFORM I0000-INITIATE                                      CL*29
00126             THRU I0000-EXIT                                          CL*29
00127                                                                   DTSBE764
00128        WHEN 'P'                                                      CL*29
00129          PERFORM P0000-PROCESS                                       CL*29
00130             THRU P0000-EXIT                                          CL*29
00131                                                                   DTSBE764
00132        WHEN 'T'                                                      CL*29
00133          PERFORM T0000-TERMINATE                                     CL*29
00134             THRU T0000-EXIT                                          CL*29
00135                                                                      CL*29
00136        WHEN OTHER                                                    CL*29
00137          PERFORM S999-ABEND                                          CL*29
00138             THRU S999-EXIT                                           CL*29
00139      END-EVALUATE.                                                   CL*29
00140                                                                      CL*29
00141      GOBACK.                                                      DTSBE764
00142      EJECT                                                        DTSBE764
00143  I0000-INITIATE.                                                  DTSBE764
00144                                                                      CL*23
00145      SET LECM-MST-OPEN-READ-88 TO TRUE.                              CL*23
00146                                                                      CL*22
00147      OPEN OUTPUT JS-FILE.                                            CL**8
00148                                                                   DTSBE764
00149      MOVE +0 TO WRK-MPRF-REC-CNT                                  DTSBE764
00150                 WRK-JSDL-REC-CNT.                                    CL*12
00151                                                                      CL*39
00152      INITIALIZE JS-REC.                                              CL*39
00153                                                                      CL*39
00154  I0000-EXIT.                                                      DTSBE764
00155      EXIT.                                                        DTSBE764
00156      EJECT                                                        DTSBE764
00157  P0000-PROCESS.                                                   DTSBE764
00158                                                                      CL*43
00159      IF MPRF-SIC-PRIV-HOUSEHOLDS-88                                  CL*33
00160         OR MPRF-NAICS-PRIV-HOUSEHOLDS-88                             CL*43
00161           GO TO P0000-EXIT.                                          CL*43
00162                                                                      CL*43
00163      IF NOT MPRF-CLASS-SUB-88                                        CL*43
00164           GO TO P0000-EXIT.                                          CL*43
00165                                                                      CL*33
00166      ADD +1 TO WRK-MPRF-REC-CNT.                                     CL*33
00167                                                                      CL*33
00168      MOVE MPRF-EMP-NO       TO JS-EMP-ACCT-NO.                       CL*33
00169      MOVE MPRF-PRIMARY-NAME TO JS-PRIMARY-NAME.                      CL*33
00170      MOVE MPRF-ENTITY-NAME  TO JS-ENTITY-NAME.                       CL*33
00171      MOVE MPRF-FEIN         TO JS-FEIN.                              CL*33
00172      MOVE MPRF-SIC-CD       TO JS-SIC-CD.                            CL*33
00173      MOVE MPRF-NAICS-CD     TO JS-NAICS-CD.                          CL*33
00174      MOVE MPRF-ESTB-DATE    TO JS-REGISTRATION-DT.                   CL*33
00175                                                                      CL*33
00176      MOVE LOW-VALUES  TO MSKL-KEY-AREA.                              CL*33
00177      MOVE MPRF-EMP-NO TO MSKL-EMP-NO.                                CL*33
00178      SET MSKL-TAD-88  TO TRUE.                                       CL*33
00179      MOVE SPACES      TO JS-ADDRESS-AREA.                            CL*33
00180                                                                      CL*33
00181      PERFORM S910-START-BROWSE                                       CL*33
00182         THRU S910-EXIT.                                              CL*33
00183                                                                      CL*33
00184      PERFORM P1100-MTAD-SCAN                                         CL*33
00185         THRU P1100-EXIT                                              CL*33
00186           UNTIL L910-NO-REC-88.                                      CL*33
00187                                                                      CL*33
00188      MOVE LOW-VALUES  TO MSKL-KEY-AREA.                              CL*33
00189      MOVE MPRF-EMP-NO TO MSKL-EMP-NO.                                CL*33
00190      SET MSKL-OPO-88  TO TRUE.                                       CL*33
00191      MOVE SPACES      TO JS-MOPO-DATA-AREA.                          CL*33
00192      MOVE +0          TO JS-MOPO-SSN.                                CL*33
00193                                                                      CL*33
00194      PERFORM S910-START-BROWSE                                       CL*33
00195         THRU S910-EXIT.                                              CL*33
00196      IF L910-OK-88                                                   CL*34
00197           PERFORM P1200-MOPO-SCAN                                    CL*34
00198              THRU P1200-EXIT.                                        CL*34
00199                                                                      CL*33
00200      MOVE LOW-VALUES  TO MSKL-KEY-AREA.                              CL*33
00201      MOVE MPRF-EMP-NO TO MSKL-EMP-NO.                                CL*33
00202      SET MSKL-SOL-88  TO TRUE.                                       CL*33
00203      MOVE +0          TO JS-MOST-RECENT-SOL-START-DT.                CL*33
00204      MOVE +0          TO JS-INACTIVATION-DT.                         CL*33
00205                                                                      CL*33
00206      PERFORM S910-START-BROWSE                                       CL*33
00207         THRU S910-EXIT.                                              CL*33
00208                                                                      CL*33
00209      PERFORM P1300-MSOL-SCAN                                         CL*33
00210         THRU P1300-EXIT                                              CL*33
00211           UNTIL L910-NO-REC-88.                                      CL*33
00212                                                                      CL*33
00213      MOVE LOW-VALUES  TO MSKL-KEY-AREA.                              CL*33
00214      MOVE MPRF-EMP-NO TO MSKL-EMP-NO.                                CL*33
00215      SET  MSKL-QTR-88 TO TRUE.                                       CL*33
00216      MOVE +0          TO JS-NUMBER-OF-EMPLOYEES.                     CL*33
00217                                                                      CL*33
00218      PERFORM S910-START-BROWSE                                       CL*33
00219         THRU S910-EXIT.                                              CL*33
00220                                                                      CL*33
00221      PERFORM P1400-MQTR-SCAN                                         CL*33
00222         THRU P1400-EXIT                                              CL*33
00223           UNTIL L910-NO-REC-88.                                      CL*33
00224                                                                      CL*33
00225      WRITE JS-REC.                                                   CL*33
00226      ADD +1 TO WRK-JSDL-REC-CNT.                                     CL*33
00227      INITIALIZE JS-REC.                                              CL*39
00228                                                                      CL*33
00229  P0000-EXIT.                                                      DTSBE764
00230      EXIT.                                                        DTSBE764
00231      EJECT                                                        DTSBE764
00232                                                                      CL**2
00233  P1100-MTAD-SCAN.                                                 DTSBE764
00234      MOVE MSKL-REC TO MTAD-REC.                                   DTSBE764
00235                                                                   DTSBE764
00236      IF MTAD-ID-TAX-MAILING-ADDR-88                                  CL**9
00237          MOVE MTAD-ADDRESS TO JS-MAILING-ADDRESS                     CL**9
00238          MOVE MTAD-VOICE-1 TO JS-MAIL-VOICE-1                        CL**9
00239          MOVE MTAD-VOICE-2 TO JS-MAIL-VOICE-2                        CL**9
00240          MOVE MTAD-FAX     TO JS-MAIL-FAX                            CL**9
00241      ELSE                                                            CL**9
00242          MOVE MTAD-ADDRESS TO JS-LOCAL-ADDRESS                       CL**9
00243          MOVE MTAD-VOICE-1 TO JS-LOCAL-VOICE-1                       CL**9
00244          MOVE MTAD-VOICE-2 TO JS-LOCAL-VOICE-2                       CL**9
00245          MOVE MTAD-FAX     TO JS-LOCAL-FAX.                          CL**9
00246                                                                   DTSBE764
00247      PERFORM S910-READ-NEXT                                          CL**2
00248         THRU S910-EXIT.                                              CL**2
00249  P1100-EXIT.                                                      DTSBE764
00250      EXIT.                                                        DTSBE764
00251      EJECT                                                        DTSBE764
00252  P1200-MOPO-SCAN.                                                    CL**9
00253      MOVE MSKL-REC TO MOPO-REC.                                      CL**9
00254                                                                      CL**9
00255      MOVE MOPO-NAME    TO JS-MOPO-NAME.                              CL**9
00256      MOVE MOPO-TITLE   TO JS-MOPO-TITLE.                             CL**9
00257      MOVE MOPO-SSN     TO JS-MOPO-SSN.                               CL**9
00258      MOVE MOPO-ADDRESS TO JS-MOPO-ADDRESS.                           CL**9
00259      MOVE MOPO-VOICE-1 TO JS-MOPO-VOICE-1.                           CL**9
00260      MOVE MOPO-VOICE-2 TO JS-MOPO-VOICE-2.                           CL**9
00261      MOVE MOPO-FAX     TO JS-MOPO-FAX.                               CL**9
00262                                                                      CL**9
00263 *    PERFORM S910-READ-NEXT                                          CL*41
00264 *       THRU S910-EXIT.                                              CL*41
00265  P1200-EXIT.                                                         CL**9
00266      EXIT.                                                           CL**9
00267      EJECT                                                           CL**9
00268  P1300-MSOL-SCAN.                                                    CL**9
00269      MOVE MSKL-REC TO MSOL-REC.                                      CL**9
00270      IF MSOL-INACT-WITHDRAWN-88                                      CL*42
00271           NEXT SENTENCE                                              CL*42
00272      ELSE                                                            CL*40
00273        IF MSOL-LIAB-DATE > JS-MOST-RECENT-SOL-START-DT               CL*40
00274            MOVE MSOL-LIAB-DATE  TO JS-MOST-RECENT-SOL-START-DT       CL*40
00275            MOVE MSOL-INACT-DATE TO JS-INACTIVATION-DT                CL*40
00276        END-IF                                                        CL*40
00277      END-IF.                                                         CL*40
00278      PERFORM S910-READ-NEXT                                          CL**9
00279         THRU S910-EXIT.                                              CL**9
00280  P1300-EXIT.                                                         CL**9
00281      EXIT.                                                           CL**9
00282      EJECT                                                           CL**9
00283  P1400-MQTR-SCAN.                                                    CL*10
00284      MOVE MSKL-REC TO MQTR-REC.                                      CL*10
00285                                                                      CL*10
00286      IF MQTR-CURR-RCVD-88                                            CL*10
00287          IF  NOT MQTR-1ST-MTH-NO-ENTRY-88                            CL*10
00288              MOVE MQTR-1ST-MTH-EMPL-CNT TO JS-NUMBER-OF-EMPLOYEES    CL*11
00289          END-IF                                                      CL*10
00290          IF  NOT MQTR-2ND-MTH-NO-ENTRY-88                            CL*10
00291          AND MQTR-2ND-MTH-EMPL-CNT > JS-NUMBER-OF-EMPLOYEES          CL*11
00292              MOVE MQTR-2ND-MTH-EMPL-CNT TO JS-NUMBER-OF-EMPLOYEES    CL*11
00293          END-IF                                                      CL*10
00294          IF  NOT MQTR-3RD-MTH-NO-ENTRY-88                            CL*10
00295          AND MQTR-3RD-MTH-EMPL-CNT > JS-NUMBER-OF-EMPLOYEES          CL*11
00296              MOVE MQTR-3RD-MTH-EMPL-CNT TO JS-NUMBER-OF-EMPLOYEES    CL*11
00297          END-IF                                                      CL*10
00298      END-IF.                                                         CL*10
00299                                                                      CL*10
00300      PERFORM S910-READ-NEXT                                          CL*10
00301         THRU S910-EXIT.                                              CL*10
00302  P1400-EXIT.                                                         CL*10
00303      EXIT.                                                           CL*10
00304      EJECT                                                           CL*10
00305  T0000-TERMINATE.                                                 DTSBE764
00306      DISPLAY '***  DTSBE764 TERMINATION STATISTICS'.                 CL*17
00307      DISPLAY ' '.                                                 DTSBE764
00308      DISPLAY '***  NUMBER OF MPRF RECORDS PROCESSED: '               CL*16
00309              WRK-MPRF-REC-CNT.                                       CL**4
00310      DISPLAY '***  NUMBER OF JSDL RECORDS WRITTEN  : '               CL*16
00311              WRK-JSDL-REC-CNT.                                       CL*12
00312                                                                   DTSBE764
00313      CLOSE JS-FILE.                                                  CL**8
00314                                                                      CL*41
00315  T0000-EXIT.                                                      DTSBE764
00316      EXIT.                                                        DTSBE764
00317      EJECT                                                        DTSBE764
00318 *S910-OPEN-READ.                                                     CL*30
00319 *    SET L910-OPEN-READ-88 TO TRUE.                                  CL*30
00320 *    GO TO S910-MSTR-CALL.                                           CL*30
00321                                                                   DTSBE764
00322 *S910-READ.                                                          CL*44
00323 *    SET L910-READ-88 TO TRUE.                                       CL*44
00324 *    GO TO S910-MSTR-CALL.                                           CL*44
00325                                                                   DTSBE764
00326  S910-START-BROWSE.                                               DTSBE764
00327      SET L910-START-BROWSE-88 TO TRUE.                            DTSBE764
00328      GO TO S910-MSTR-CALL.                                        DTSBE764
00329                                                                   DTSBE764
00330  S910-READ-NEXT.                                                  DTSBE764
00331      SET L910-READ-NEXT-88 TO TRUE.                               DTSBE764
00332      GO TO S910-MSTR-CALL.                                        DTSBE764
00333                                                                   DTSBE764
00334 *S910-COUNT.                                                      DTSBE764
00335 *****SET L910-COUNT-88 TO TRUE.                                   DTSBE764
00336 *****GO TO S910-MSTR-CALL.                                        DTSBE764
00337                                                                   DTSBE764
00338  S910-MSTR-CALL.                                                  DTSBE764
00339      CALL 'DTSBU910' USING L910-LINK-AREA                            CL**2
00340                            MSKL-REC.                              DTSBE764
00341  S910-EXIT.                                                       DTSBE764
00342      EXIT.                                                        DTSBE764
00343                                                                      CL**2
00344  S999-ABEND.                                                      DTSBE764
00345      DISPLAY '*** DTSBE764 ABENDING.  '                              CL*17
00346              ABEND-MSG.                                           DTSBE764
00347      CALL 'DTSBU999' USING WRK-ABEND-CD.                             CL**2
00348  S999-EXIT.                                                       DTSBE764
00349      EXIT.                                                        DTSBE764
