00001  IDENTIFICATION DIVISION.                                         12/22/16
00002  PROGRAM-ID.             DTSBX706.                                DTSBX706
00003  AUTHOR.                 MT DEPT OF LABOR/UI PROGRAMMING SECTION     LV023
00004  DATE-WRITTEN.           DECEMBER 1994.                           DTSBX706
00005  DATE-COMPILED.                                                   DTSBX706
00006                                                                   DTSBX706
00007 *****                                                             DTSBX706
00008 *                                                                 DTSBX706
00009 *    FUNCTION:  FAILED FUTA CERTIFICATIONS- SAMPLES                  CL**3
00010 *                                                                 DTSBX706
00011 *                                                                 DTSBX706
00012 *    CALLING SEQUENCE:  DTSBD300 CALLS DTSBD610                   DTSBX706
00013 *                                WHICH CREATES DTSIR705 RECORDS.  DTSBX706
00014 *                       DTSBD800 CALLS DTSBR705                   DTSBX706
00015 *                                WHICH PRODUCES THE FUTA FAILED   DTSBX706
00016 *                                CERTIFICATION LISTING.           DTSBX706
00017 *    MODIFICATION HISTORY:                                        DTSBX706
00018 *                                                                 DTSBX706
00019 * 12-09-94 INITIAL DEVELOPMENT                                    DTSBX706
00020 *          REFERENCE RFP #RAP             AUTHOR OF CHANGE - SFW  DTSBX706
00021 *                                                                 DTSBX706
00022 * 11-13-97 TAX YEAR 1996 MODIFICATIONS.  FOUR DIGIT YEAR.         DTSBX706
00023 *          REFERENCE RFP #TCL 222         AUTHOR OF CHANGE - EHH  DTSBX706
00024 *                                                                 DTSBX706
00025 * 02-22-99 MODIFIED TO MEET DUTAS PROGRAMMING SPAECIFICATIONS.    DTSBX706
00026 *          REFERENCE RFP #****            AUTHOR OF CHANGE - DVS  DTSBX706
00027 *                                                                 DTSBX706
00028 *                                                                    CL**3
00029 * 10-08-16 MODIFIED TO PRINT 100 SAMPLES OF FAILED CERT FOR TAX.     CL**3
00030 *          REFERENCE RFP TPM 12/08/16     AUTHOR OF CHANGE - ZL1     CL**3
00031 *                                                                    CL**3
00032 * MM-DD-YY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBX706
00033 *          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBX706
00034 *          REFERENCE RFP #****            AUTHOR OF CHANGE - XXX  DTSBX706
00035 *                                                                 DTSBX706
00036 *                                                                 DTSBX706
00037 *    DESCRIPTION:                                                 DTSBX706
00038 *                                                                 DTSBX706
00039 *        THIS MODULE GENERATES A DETAIL LINE FOR EVERY IRS FORM   DTSBX706
00040 *        940 IDENTIFICATION TAPE RECORD FOR WHICH THERE WAS NO    DTSBX706
00041 *        MATCH ON THE MONTANA TAX SYSTEM MASTER FILE DURING       DTSBX706
00042 *        YEARLY FUTA PROCESSING.                                  DTSBX706
00043 *                                                                 DTSBX706
00044 *                                                                 DTSBX706
00045 *    RECORDS READ:                                                DTSBX706
00046 *                                                                 DTSBX706
00047 *        NONE.                                                    DTSBX706
00048 *                                                                 DTSBX706
00049 *                                                                 DTSBX706
00050 *    PRINTED OUTPUTS:                                             DTSBX706
00051 *                                                                 DTSBX706
00052 *        705R1  FAILED FUTA CERTIFICATIONS                        DTSBX706
00053 *                                                                 DTSBX706
00054 *                                                                 DTSBX706
00055 *    RECORDS WRITTEN:                                             DTSBX706
00056 *                                                                 DTSBX706
00057 *        NONE.                                                    DTSBX706
00058 *                                                                 DTSBX706
00059 *                                                                 DTSBX706
00060 *    MODULES CALLED:                                              DTSBX706
00061 *                                                                 DTSBX706
00062 *        NONE.                                                    DTSBX706
00063 *                                                                 DTSBX706
00064 *                                                                 DTSBX706
00065 *****                                                             DTSBX706
00066      EJECT                                                        DTSBX706
00067  ENVIRONMENT DIVISION.                                            DTSBX706
00068                                                                   DTSBX706
00069  CONFIGURATION SECTION.                                           DTSBX706
00070  SPECIAL-NAMES. C01 IS TOP-OF-PAGE.                               DTSBX706
00071                                                                   DTSBX706
00072  INPUT-OUTPUT SECTION.                                            DTSBX706
00073                                                                   DTSBX706
00074  FILE-CONTROL.                                                    DTSBX706
00075      SELECT ACHLOG-FILE ASSIGN TO DTSPACHF                           CL*16
00076       file status is achlog-status.                                  CL*16
00077  DATA DIVISION.                                                   DTSBX706
00078                                                                   DTSBX706
00079  FILE SECTION.                                                    DTSBX706
00080                                                                   DTSBX706
00081  FD  ACHLOG-FILE                                                     CL**4
00082      RECORDING MODE IS V.                                            CL*20
00083  01  ACHLOG-REC.                                                     CL**4
00084      05  ACH-RTN-CODE                    PIC  X(08).                 CL**4
00085      05  FILLER                          PIC  X(01).                 CL**4
00086      05  ACH-RTN-DETAIL                  PIC  X(22).                 CL**4
00087      05  FILLER                          PIC  X(48).                 CL**4
00088      05  FILLER                          PIC  X(945).                CL*22
00089                                                                   DTSBX706
00090      EJECT                                                        DTSBX706
00091  WORKING-STORAGE SECTION.                                         DTSBX706
000915 77  PAN-VALET PICTURE X(24) VALUE '023DTSBX706  12/22/16'.       DTSBX706
00092                                                                   DTSBX706
00093  01  WRK-AREA.                                                    DTSBX706
00094      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +706.   CL**7
00095      05  FIRST-TIME-IND              PIC  X(01)  VALUE 'Y'.       DTSBX706
00096      05  WS-NUMBER-ONE               PIC S9(05)  COMP-3           DTSBX706
00097                                                  VALUE +0.        DTSBX706
00098                                                                   DTSBX706
00099      05  WS-SAMP-CNT                 PIC S9(03) COMP-3 VALUE 0.      CL**3
00100      05  WS-LINE-CNT                 PIC S9(02) COMP-3 VALUE 60.     CL**3
00101      05  WS-LINE-CNT2                PIC S9(02) COMP-3 VALUE +0.  DTSBX706
00102      05  WS-PAGE-CNT                 PIC S9(03) COMP-3 VALUE +0.  DTSBX706
00103      05  BLANK-LINE                  PIC  X(133) VALUE SPACES.    DTSBX706
00104      05  ACHLOG-STATUS               PIC  X(02) VALUE SPACES.        CL**4
00105          88 WS-ACHLOG-EOF-88       VALUE '10'.                       CL**4
00106          88 WS-ACHLOG-OK-88        VALUE '00'.                       CL**4
00107                                                                      CL**4
00108                                                                   DTSBX706
00109      05  WS-EMP-NO                   PIC  X(07).                  DTSBX706
00110      05  WS-EMP-NO-EDIT REDEFINES WS-EMP-NO                       DTSBX706
00111                                      PIC  999B999.                DTSBX706
00112      05  WS-SUB                      PIC S9(04)  COMP.            DTSBX706
00113      05  WS-NAME-ADD-CNT             PIC S9(04)  COMP.            DTSBX706
00114      05  WS-NAME-ADD OCCURS 6 TIMES  PIC  X(35).                  DTSBX706
00115      EJECT                                                        DTSBX706
00116  01  ACHLOG-CLOSE.                                                   CL**5
00117      05  FILLER                          PIC  X(43).                 CL*23
00118      05  ACH-CLOSE-BYTES                 PIC  X(20).                 CL**5
00119      05  FILLER                          PIC  X(17).                 CL*23
00120      05  FILLER                          PIC  X(948).                CL*23
00121                                                                      CL**5
00122  01  ACHCLOSE                            PIC  X(10) VALUE ALL '9'.   CL*14
00123  01  ACHCLOSE9 REDEFINES ACHCLOSE        PIC  9(10).                 CL**5
00124                                                                      CL**5
00125  01  ACHLOG-TRANF.                                                   CL**5
00126      05  FILLER                          PIC  X(09).                 CL*23
00127      05  ACH-TRANF-BYTES                 PIC  X(20).                 CL**5
00128      05  FILLER                          PIC  X(51).                 CL*23
00129      05  FILLER                          PIC  X(948).                CL*23
00130                                                                      CL**5
00131  01  ACHTRANF                            PIC  X(10) VALUE ALL '9'.   CL**6
00132  01  ACHTRANF9 REDEFINES ACHTRANF        PIC  9(10).                 CL**5
00133                                                                      CL**5
00134  01  PAGE-HEADING.                                                DTSBX706
00135      05  HDR-LINE-1.                                              DTSBX706
00136          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00137          10  FILLER                  PIC  X(05)                   DTSBX706
00138                 VALUE '705R1'.                                    DTSBX706
00139          10  FILLER                  PIC  X(35)  VALUE SPACES.    DTSBX706
00140          10  HDR-AGY-NAME-LINE1      PIC  X(50).                  DTSBX706
00141          10  FILLER                  PIC  X(28)  VALUE SPACES.    DTSBX706
00142          10  FILLER                  PIC  X(05)                   DTSBX706
00143                 VALUE 'DATE:'.                                    DTSBX706
00144          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00145          10  HDR-SYS-DATE            PIC  X(08).                  DTSBX706
00146                                                                   DTSBX706
00147      05  HDR-LINE-2.                                              DTSBX706
00148          10  FILLER                  PIC  X(41)  VALUE SPACES.    DTSBX706
00149          10  HDR-AGY-NAME-LINE2      PIC  X(50).                  DTSBX706
00150          10  FILLER                  PIC  X(28)  VALUE SPACES.    DTSBX706
00151          10  FILLER                  PIC  X(05)                   DTSBX706
00152                 VALUE 'TIME:'.                                    DTSBX706
00153          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00154          10  HDR-SYS-TIME            PIC  X(08).                  DTSBX706
00155                                                                   DTSBX706
00156      05  HDR-LINE-3.                                              DTSBX706
00157          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00158          10  FILLER                  PIC  X(30)                   DTSBX706
00159                 VALUE 'ROUTE TO:  CHIEF, TAX DIVISION'.           DTSBX706
00160          10  FILLER                  PIC  X(88)  VALUE SPACES.    DTSBX706
00161          10  FILLER                  PIC  X(05)                   DTSBX706
00162                 VALUE 'PAGE:'.                                    DTSBX706
00163          10  FILLER                  PIC  X(03)  VALUE SPACES.    DTSBX706
00164          10  HDR-PAGE-CNT            PIC  ZZ,ZZ9.                 DTSBX706
00165                                                                   DTSBX706
00166      05  HDR-LINE-4.                                              DTSBX706
00167          10  FILLER                  PIC  X(12)  VALUE SPACES.    DTSBX706
00168          10  FILLER                  PIC  X(20)                   DTSBX706
00169                 VALUE '                    '.                     DTSBX706
00170          10  FILLER                  PIC  X(21)  VALUE SPACES.    DTSBX706
00171          10  FILLER                  PIC  X(26)                   DTSBX706
00172                VALUE 'FAILED FUTA CERT SAMPLES  '.                   CL**2
00173                                                                   DTSBX706
00174      05  HDR-LINE-5                  PIC  X(133) VALUE SPACES.    DTSBX706
00175      05  HDR-LINE-6                  PIC  X(133) VALUE SPACES.    DTSBX706
00176      05  HDR-LINE-7.                                              DTSBX706
00177          10  FILLER                  PIC  X(11)  VALUE SPACES.    DTSBX706
00178          10  FILLER                  PIC  X(03)                   DTSBX706
00179                 VALUE 'TAX'.                                      DTSBX706
00180          10  FILLER                  PIC  X(15)  VALUE SPACES.    DTSBX706
00181          10  FILLER                  PIC  X(14)                   DTSBX706
00182                 VALUE ALL '*'.                                    DTSBX706
00183          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00184          10  FILLER                  PIC  X(24)                   DTSBX706
00185                 VALUE 'CERT REQUEST RECORD INFO'.                 DTSBX706
00186          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00187          10  FILLER                  PIC  X(13)                   DTSBX706
00188                 VALUE ALL '*'.                                    DTSBX706
00189                                                                   DTSBX706
00190      05  HDR-LINE-8.                                              DTSBX706
00191          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00192          10  FILLER                  PIC  X(40)                   DTSBX706
00193                 VALUE 'EMP NO    PER     FEIN        NAME/ADDRE'. DTSBX706
00194          10  FILLER                  PIC  X(02)                   DTSBX706
00195                 VALUE 'SS'.                                       DTSBX706
00196          10  FILLER                  PIC  X(23)  VALUE SPACES.    DTSBX706
00197          10  FILLER                  PIC  X(34)                   DTSBX706
00198                 VALUE 'XREF FEIN   NCRL     ERROR MESSAGE'.       DTSBX706
00199      05  HDR-LINE-9                  PIC  X(133) VALUE SPACES.    DTSBX706
00200                                                                   DTSBX706
00201  01  DETAIL-LINE1.                                                DTSBX706
00202      05  DTL1-LINE-1.                                             DTSBX706
00203          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00204          10  DTL1-EMP-NO             PIC  999B999.                DTSBX706
00205          10  FILLER                  PIC  X(02)  VALUE SPACES.    DTSBX706
00206          10  DTL1-TAX-YEAR           PIC  9(04).                  DTSBX706
00207          10  FILLER                  PIC  X(03)  VALUE SPACES.    DTSBX706
00208          10  DTL1-FEIN               PIC  99B9(07).               DTSBX706
00209          10  FILLER                  PIC  X(02)  VALUE SPACES.    DTSBX706
00210          10  DTL1-NAME-ADD-1         PIC  X(35).                  DTSBX706
00211          10  FILLER                  PIC  X(02)  VALUE SPACES.    DTSBX706
00212          10  DTL1-XREF-FEIN          PIC  99B9(07).               DTSBX706
00213          10  FILLER                  PIC  X(02)  VALUE SPACES.    DTSBX706
00214          10  DTL1-NAME-CONTROL       PIC  X(04).                  DTSBX706
00215          10  FILLER                  PIC  X(04)  VALUE SPACES.    DTSBX706
00216          10  DTL1-MSG-TEXT-1         PIC  X(40).                  DTSBX706
00217                                                                   DTSBX706
00218  01  DETAIL-LINE2.                                                DTSBX706
00219      05  DTL2-LINE-1.                                             DTSBX706
00220          10  FILLER                  PIC  X(29)  VALUE SPACES.    DTSBX706
00221          10  DTL2-NAME-ADD-2         PIC  X(35).                  DTSBX706
00222          10  FILLER                  PIC  X(02)  VALUE SPACES.    DTSBX706
00223          10  DTL2-MSG-TEXT-2         PIC  X(40).                  DTSBX706
00224                                                                   DTSBX706
00225  01  DETAIL-LINE3.                                                DTSBX706
00226      05  DTL3-LINE-1.                                             DTSBX706
00227          10  FILLER                  PIC  X(29)  VALUE SPACES.    DTSBX706
00228          10  DTL3-NAME-ADD-3         PIC  X(35).                  DTSBX706
00229                                                                   DTSBX706
00230  01  CONTROL-FOOTING-FINAL.                                       DTSBX706
00231      05  CFF-LINE-4.                                              DTSBX706
00232          10  FILLER                  PIC  X(11)  VALUE SPACES.    DTSBX706
00233          10  CFF-NUMBER-ONE          PIC  ZZZZ,ZZ9.               DTSBX706
00234          10  FILLER                  PIC  X(01)  VALUE SPACE.     DTSBX706
00235          10  FILLER                  PIC  X(26)                   DTSBX706
00236                 VALUE 'FAILED FUTA CERTIFICATIONS'.               DTSBX706
00237          10  FILLER                  PIC  X(26)                      CL**2
00238                 VALUE ' SAMPLED FOR TAX          '.                  CL**2
00239      EJECT                                                        DTSBX706
00240  LINKAGE SECTION.                                                 DTSBX706
00241                                                                   DTSBX706
00242  PROCEDURE DIVISION.                                                 CL**4
00243          PERFORM I1000-INITIATE THRU I1000-EXIT                   DTSBX706
00244                                                                   DTSBX706
00245          PERFORM P1000-PROCESS THRU P1000-EXIT.                      CL**5
00246                                                                      CL**4
00247          PERFORM T1000-TERMINATE THRU T1000-EXIT                  DTSBX706
00248                                                                   DTSBX706
00249      GOBACK.                                                      DTSBX706
00250      EJECT                                                        DTSBX706
00251  I1000-INITIATE.                                                  DTSBX706
00252                                                                   DTSBX706
00253      OPEN INPUT  ACHLOG-FILE.                                        CL**4
00254      IF WS-ACHLOG-EOF-88                                             CL**4
00255         DISPLAY '*************************************    '          CL**4
00256         DISPLAY '*** ESSP ACH FTP DEPOSIT FAILED  ****    '          CL**4
00257         DISPLAY '******** ACH FILE EMPTY (open)*******    '          CL*17
00258         DISPLAY '*************************************    '          CL**4
00259         MOVE +3 TO WRK-ABEND-CD                                      CL*18
00260         PERFORM S999-ABEND THRU S999-EXIT                            CL**4
00261      END-IF.                                                         CL**4
00262                                                                   DTSBX706
00263  I1000-EXIT.                                                      DTSBX706
00264      EXIT.                                                        DTSBX706
00265      EJECT                                                        DTSBX706
00266  P1000-PROCESS.                                                   DTSBX706
00267      READ ACHLOG-FILE AT END                                         CL**9
00268       SET WS-ACHLOG-EOF-88 TO TRUE.                                  CL**9
00269                                                                      CL**9
00270      IF WS-ACHLOG-EOF-88                                             CL**4
00271         DISPLAY '*************************************    '          CL**4
00272         DISPLAY '*** ESSP ACH FTP DEPOSIT FAILED  ****    '          CL**4
00273         DISPLAY '******** ACH FILE EMPTY (read)*******    '          CL*17
00274         DISPLAY '*************************************    '          CL**4
00275         MOVE +3 TO WRK-ABEND-CD                                      CL**4
00276         PERFORM S999-ABEND THRU S999-EXIT                            CL**4
00277      END-IF.                                                         CL**4
00278                                                                      CL**4
00279      MOVE +4 TO WRK-ABEND-CD.                                        CL*18
00280      PERFORM UNTIL WS-ACHLOG-EOF-88                                  CL**4
00281         PERFORM P1100-FTPLOG THRU P1100-EXIT                         CL**4
00282      END-PERFORM.                                                    CL**4
00283                                                                      CL**5
00284        IF ACHCLOSE9 = 9999999999 AND                                 CL*14
00285           ACHTRANF9 = 9999999999                                     CL*14
00286         MOVE +4 TO WRK-ABEND-CD                                      CL*18
00287         DISPLAY '*************************************    '          CL*14
00288         DISPLAY '### ESSP ACH *** FTP *** FAILED  ####    '          CL*14
00289         DISPLAY '******** ACH FILE EMPTY (read)*******    '          CL*17
00290         DISPLAY '*************************************    '          CL*14
00291         PERFORM S999-ABEND THRU S999-EXIT                            CL*14
00292      END-IF.                                                         CL*14
00293                                                                      CL*14
00294                                                                      CL*14
00295        IF ACHCLOSE9 = ACHTRANF9                                      CL**5
00296         MOVE +0 TO WRK-ABEND-CD                                      CL**6
00297         DISPLAY '*************************************    '          CL**5
00298         DISPLAY '!!! ESSP ACH FTP DEPOSIT SUCESSFULL!!    '          CL**5
00299         DISPLAY ' '                                                  CL**5
00300         DISPLAY ' TOTAL BYTES IN FTP FILE = ' ACHCLOSE9              CL**5
00301         DISPLAY ' TOTAL BYTES TRANSFERRED = ' ACHTRANF9              CL**5
00302         DISPLAY ' '                                                  CL**5
00303         DISPLAY '!!! ESSP ACH FTP DEPOSIT SUCESSFULL!! zl1'          CL*17
00304         DISPLAY '*************************************    '          CL**5
00305        ELSE                                                          CL**5
00306         MOVE +3 TO WRK-ABEND-CD                                      CL*18
00307         DISPLAY '*************************************    '          CL**5
00308         DISPLAY '### ESSP ACH FTP DEPOSIT FAILED  ####    '          CL**5
00309         DISPLAY ' TOTAL BYTES IN FTP FILE = ' ACHCLOSE9              CL*17
00310         DISPLAY ' TOTAL BYTES TRANSFERRED = ' ACHTRANF9              CL*17
00311         DISPLAY '### completed data file not tranfered ###'          CL*17
00312         DISPLAY '*************************************    '          CL**5
00313         PERFORM S999-ABEND THRU S999-EXIT                            CL**5
00314      END-IF.                                                         CL**5
00315                                                                      CL**4
00316                                                                   DTSBX706
00317  P1000-EXIT.                                                      DTSBX706
00318      EXIT.                                                        DTSBX706
00319                                                                   DTSBX706
00320  P1100-FTPLOG.                                                       CL**4
00321                                                                      CL**4
00322        if ach-rtn-code = '226 Clos'                                  CL**5
00323           MOVE ACHLOG-REC TO ACHLOG-CLOSE                            CL**5
00324           STRING ACH-CLOSE-BYTES  DELIMITED BY '/' INTO ACHCLOSE     CL**5
00325            DISPLAY 'no of bytes in file CSTRING ' ACH-CLOSE-BYTES    CL*17
00326            DISPLAY 'no of bytes detected CBYTES ' ACHCLOSE9          CL*17
00327        END-IF.                                                       CL**5
00328                                                                      CL**5
00329        if ach-rtn-code = 'EZA1617I'                                  CL**5
00330         MOVE ACHLOG-REC TO ACHLOG-TRANF                              CL*17
00331         STRING ACH-TRANF-BYTES  DELIMITED BY ' ' INTO ACHTRANF       CL*17
00332         DISPLAY 'no of bytes transfered TSTRING ' ACH-TRANF-BYTES    CL*17
00333         DISPLAY 'no of bytes detected    TBYTES ' ACHTRANF9          CL*17
00334        END-IF.                                                       CL**5
00335                                                                      CL**5
00336       READ ACHLOG-FILE AT END                                        CL*12
00337        SET WS-ACHLOG-EOF-88 TO TRUE.                                 CL*12
00338  P1100-EXIT.                                                         CL**4
00339      EXIT.                                                           CL**4
00340                                                                      CL**4
00341  T1000-TERMINATE.                                                 DTSBX706
00342                                                                   DTSBX706
00343      CLOSE ACHLOG-FILE.                                              CL**4
00344                                                                   DTSBX706
00345  T1000-EXIT.                                                      DTSBX706
00346      EXIT.                                                        DTSBX706
00347                                                                   DTSBX706
00348  S999-ABEND.                                                         CL**4
00349                                                                      CL**4
00350      CALL 'DTSBU999' USING WRK-ABEND-CD.                             CL**4
00351                                                                      CL**4
00352  S999-EXIT.                                                          CL**4
00353      EXIT.                                                           CL**4
00354                                                                   DTSBX706
