00001  IDENTIFICATION DIVISION.                                         06/05/09
00002  PROGRAM-ID. DTSBY202.                                            DTSBY202
00003  DATE-COMPILED.                                                      LV007
00004 *                                                                 DTSBY202
00005 *****                                                             DTSBY202
00006 *                                                                 DTSBY202
00007 *                                                                 DTSBY202
00008 *    FUNCTION:  READS IN ICESA TYPE RECORDS BUILT BY PROGRAM      DTSBY202
00009 *               BR202. IF ANY RECS FOUND WILL FORMAT  A RPT       DTSBY202
00010 *              SEND AND EMAIL FOR THE ICESA TOTALS.               DTSBY202
00011 *    MODIFICATION HISTORY:                                        DTSBY202
00012 *                                                                 DTSBY202
00013 * 04-29-09 INITIAL DEVELOPMENT                                    DTSBY202
00014 *          REFERENCE RFP #RAP             AUTHOR OF CHANGE - ZL1  DTSBY202
00015 *                                                                 DTSBY202
00016 * 05-15-09 ADDED BATCH TYPE IN FRONT OF BATCH NUMBER. FOR ICESA   DTSBY202
00017 *          BATCHES, THE TYPE IS "B."  FOR ONLINE BATCHES IT IS "A.DTSBY202
00018 *          REFERENCE RFP #RAP             AUTHOR OF CHANGE - GD   DTSBY202
00019 *                                                                 DTSBY202
00020 * MM-DD-YY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBY202
00021 *          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBY202
00022 *          REFERENCE RFP #****            AUTHOR OF CHANGE - XXX  DTSBY202
00023 *                                                                 DTSBY202
00024 *                                                                 DTSBY202
00025 *    DESCRIPTION:                                                 DTSBY202
00026 *                                                                 DTSBY202
00027 *        BUILD E-MAIL WITH DEPOSIT TRANSMITTAL FOR ICESA          DTSBY202
00028 *        SUBMISSIONS.                                             DTSBY202
00029 *                                                                 DTSBY202
00030 *                                                                 DTSBY202
00031 *    RECORDS READ:                                                DTSBY202
00032 *                                                                 DTSBY202
00033 *        NONE.                                                    DTSBY202
00034 *                                                                 DTSBY202
00035 *                                                                 DTSBY202
00036 *    PRINTED OUTPUTS:                                             DTSBY202
00037 *                                                                 DTSBY202
00038 *        NONE                                                     DTSBY202
00039 *                                                                 DTSBY202
00040 *                                                                 DTSBY202
00041 *    RECORDS WRITTEN:                                             DTSBY202
00042 *                                                                 DTSBY202
00043 *        NONE.                                                    DTSBY202
00044 *                                                                 DTSBY202
00045 *                                                                 DTSBY202
00046 *    MODULES CALLED:                                              DTSBY202
00047 *                                                                 DTSBY202
00048 *                                                                 DTSBY202
00049 *                                                                 DTSBY202
00050 *****                                                             DTSBY202
00051      EJECT                                                        DTSBY202
00052  ENVIRONMENT DIVISION.                                            DTSBY202
00053                                                                   DTSBY202
00054  CONFIGURATION SECTION.                                           DTSBY202
00055  SPECIAL-NAMES. C01 IS TOP-OF-PAGE.                               DTSBY202
00056                                                                   DTSBY202
00057  INPUT-OUTPUT SECTION.                                            DTSBY202
00058                                                                   DTSBY202
00059  FILE-CONTROL.                                                    DTSBY202
00060      SELECT ICESA-FILE   ASSIGN TO RPT202F1.                      DTSBY202
00061                                                                   DTSBY202
00062      SELECT EMAIL-FILE   ASSIGN TO DTSEMAIL.                      DTSBY202
00063                                                                   DTSBY202
00064  DATA DIVISION.                                                   DTSBY202
00065                                                                   DTSBY202
00066  FILE SECTION.                                                    DTSBY202
00067                                                                   DTSBY202
00068  FD  ICESA-FILE                                                   DTSBY202
00069      RECORDING MODE IS F.                                         DTSBY202
00070  01  ICESA-INREC.                                                 DTSBY202
00071      05  BATCH-NO             PIC 9(05).                          DTSBY202
00072      05  ACCT-NO              PIC 9(12).                          DTSBY202
00073      05  DEPOSIT-DATE         PIC X(10).                          DTSBY202
00074      05  REMIT-AMT            PIC 9(9)V99.                        DTSBY202
00075      05  FILLER               PIC X(10).                          DTSBY202
00076                                                                   DTSBY202
00077  FD  EMAIL-FILE                                                   DTSBY202
00078      RECORDING MODE IS F.                                         DTSBY202
00079  01  EMAIL-REC                      PIC X(80).                    DTSBY202
00080                                                                   DTSBY202
00081  WORKING-STORAGE SECTION.                                         DTSBY202
000815 77  PAN-VALET PICTURE X(24) VALUE '007DTSBY202  06/05/09'.       DTSBY202
00082                                                                   DTSBY202
00083  01  WRK-AREA.                                                    DTSBY202
00084      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +202.DTSBY202
00085      05  WRK-ABEND-MSG               PIC  X(60)  VALUE SPACES.    DTSBY202
00086      05  FIRST-TIME-IND              PIC  X(01)  VALUE 'Y'.       DTSBY202
00087      05  R202-CNT                    PIC S9(05) COMP-3 VALUE +0.  DTSBY202
00088      05  X202-CNT                    PIC S9(05) COMP-3 VALUE +0.  DTSBY202
00089      05  X202-ICESA-CNT              PIC S9(05) COMP-3 VALUE +0.  DTSBY202
00090                                                                   DTSBY202
00091  01  BLANK-LINE                      PIC X(80) VALUE SPACES.      DTSBY202
00092  01  HEADER.                                                      DTSBY202
00093      05  FILLER                      PIC X(22)  VALUE SPACES.     DTSBY202
00094      05  FILLER                      PIC X(40)  VALUE             DTSBY202
00095          'DC DEPARTMENT OF EMPLOYMENT SERVICES'.                  DTSBY202
00096  01  HEADER1.                                                     DTSBY202
00097      05  FILLER                      PIC X(32)  VALUE SPACES.     DTSBY202
00098      05  FILLER                      PIC X(15)  VALUE             DTSBY202
00099          'TAX DIVISION'.                                          DTSBY202
00100  01  HEADER2.                                                     DTSBY202
00101      05  FILLER                      PIC X(27)  VALUE SPACES.     DTSBY202
00102      05  FILLER                      PIC X(27)  VALUE             DTSBY202
00103          'ICESA BANK DEPOSIT TICKET'.                             DTSBY202
00104  01  HEADER3.                                                     DTSBY202
00105      05  FILLER               PIC X(05)  VALUE SPACES.            DTSBY202
00106      05  FILLER               PIC X(12)  VALUE 'BATCH NUMBER'.    DTSBY202
00107      05  FILLER               PIC X(05)  VALUE SPACES.            DTSBY202
00108      05  FILLER               PIC X(14)  VALUE 'ACCT NUMBER'.     DTSBY202
00109      05  FILLER               PIC X(05)  VALUE SPACES.            DTSBY202
00110      05  FILLER               PIC X(12)  VALUE 'DEPOSIT DATE'.    DTSBY202
00111      05  FILLER               PIC X(06)  VALUE SPACES.            DTSBY202
00112      05  FILLER               PIC X(12)  VALUE 'REMIT AMOUNT'.    DTSBY202
00113      05  FILLER               PIC X(10)  VALUE SPACES.            DTSBY202
00114  01  DETAIL1.                                                     DTSBY202
00115      05  FILLER               PIC X(05)  VALUE SPACES.            DTSBY202
00116      05  FILLER               PIC X(01)  VALUE 'B'.               DTSBY202
00117      05  BATCH-NOE            PIC 9(05)  VALUE ZEROS.             DTSBY202
00118      05  FILLER               PIC X(11)  VALUE SPACES.            DTSBY202
00119      05  ACCT-NOE             PIC 9(14)  VALUE 61000000130485.    DTSBY202
00120      05  FILLER               PIC X(05)  VALUE SPACES.            DTSBY202
00121      05  DEPOSIT-DATEE        PIC X(10)  VALUE SPACES.            DTSBY202
00122      05  FILLER               PIC X(06)  VALUE SPACES.            DTSBY202
00123      05  REMIT-AMTE           PIC ---,---,--9.99.                 DTSBY202
00124      05  FILLER               PIC X(10)  VALUE SPACES.            DTSBY202
00125  01  L001-LINK-AREA.                                              DTSBY202
00126  ++INCLUDE DTSIL001                                               DTSBY202
00127      EJECT                                                        DTSBY202
00128                                                                   DTSBY202
00129  01  X202-REC.                                                    DTSBY202
00130  ++INCLUDE DTSIX202                                               DTSBY202
00131                                                                   DTSBY202
00132      EJECT                                                        DTSBY202
00133  LINKAGE SECTION.                                                 DTSBY202
00134                                                                   DTSBY202
00135  PROCEDURE DIVISION.                                              DTSBY202
00136                                                                   DTSBY202
00137      IF FIRST-TIME-IND = 'Y'                                      DTSBY202
00138          PERFORM I1000-INITIATE THRU I1000-EXIT                   DTSBY202
00139          MOVE 'N' TO FIRST-TIME-IND.                              DTSBY202
00140                                                                   DTSBY202
00141          PERFORM P0000-PROCESS THRU P0000-EXIT.                   DTSBY202
00142          PERFORM T1000-TERMINATE THRU T1000-EXIT.                 DTSBY202
00143                                                                   DTSBY202
00144      GOBACK.                                                      DTSBY202
00145      EJECT                                                        DTSBY202
00146  I1000-INITIATE.                                                  DTSBY202
00147                                                                   DTSBY202
00148      OPEN INPUT ICESA-FILE.                                       DTSBY202
00149      OPEN OUTPUT EMAIL-FILE.                                      DTSBY202
00150                                                                   DTSBY202
00151  I1000-EXIT.                                                      DTSBY202
00152      EXIT.                                                        DTSBY202
00153      EJECT                                                        DTSBY202
00154                                                                   DTSBY202
00155  P0000-PROCESS.                                                   DTSBY202
00156                                                                   DTSBY202
00157      READ ICESA-FILE AT END GO TO P0000-EXIT.                     DTSBY202
00158                                                                   DTSBY202
00159      IF BATCH-NO = ZEROS                                          DTSBY202
00160         MOVE 1 TO RETURN-CODE                                     DTSBY202
00161         GO TO P0000-EXIT.                                         DTSBY202
00162                                                                   DTSBY202
00163         ADD +1                       TO X202-ICESA-CNT            DTSBY202
00164         WRITE EMAIL-REC FROM BLANK-LINE AFTER ADVANCING           DTSBY202
00165               TOP-OF-PAGE                                         DTSBY202
00166         WRITE EMAIL-REC FROM HEADER AFTER ADVANCING 7 LINES       DTSBY202
00167         WRITE EMAIL-REC FROM HEADER1 AFTER ADVANCING 1 LINES      DTSBY202
00168         WRITE EMAIL-REC FROM HEADER2 AFTER ADVANCING 1 LINES      DTSBY202
00169         WRITE EMAIL-REC FROM HEADER3 AFTER ADVANCING 4 LINES      DTSBY202
00170         MOVE  BATCH-NO           TO BATCH-NOE                     DTSBY202
00171         MOVE  REMIT-AMT          TO REMIT-AMTE                    DTSBY202
00172 *       MOVE  ACCT-NO            TO ACCT-NOE                      DTSBY202
00173         MOVE  DEPOSIT-DATE       TO DEPOSIT-DATEE                 DTSBY202
00174         WRITE EMAIL-REC FROM DETAIL1 AFTER ADVANCING 2 LINES.     DTSBY202
00175         WRITE EMAIL-REC FROM BLANK-LINE AFTER 45 LINES.           DTSBY202
00176         GO TO P0000-PROCESS.                                      DTSBY202
00177  P0000-EXIT.                                                      DTSBY202
00178      EXIT.                                                        DTSBY202
00179                                                                   DTSBY202
00180                                                                   DTSBY202
00181  T1000-TERMINATE.                                                 DTSBY202
00182      DISPLAY '*******  BY202 RAN SUCESSFULLY *************'.      DTSBY202
00183      DISPLAY '*******  TOTAL ICESA RECS     ' X202-ICESA-CNT.     DTSBY202
00184                                                                   DTSBY202
00185                                                                   DTSBY202
00186      CLOSE ICESA-FILE                                             DTSBY202
00187            EMAIL-FILE.                                            DTSBY202
00188                                                                   DTSBY202
00189      OPEN OUTPUT ICESA-FILE.                                      DTSBY202
00190      MOVE ZEROS TO  BATCH-NO                                      DTSBY202
00191                     ACCT-NO                                       DTSBY202
00192                     REMIT-AMT.                                    DTSBY202
00193      MOVE SPACES TO DEPOSIT-DATE.                                 DTSBY202
00194      WRITE ICESA-INREC.                                           DTSBY202
00195      CLOSE ICESA-FILE.                                            DTSBY202
00196  T1000-EXIT.                                                      DTSBY202
00197      EXIT.                                                        DTSBY202
00198      EJECT                                                        DTSBY202
00199                                                                   DTSBY202
00200  S001-DATE.                                                       DTSBY202
00201      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBY202
00202  S001-EXIT.                                                       DTSBY202
00203      EXIT.                                                        DTSBY202
00204                                                                   DTSBY202
00205  S999-ABEND.                                                      DTSBY202
00206                                                                   DTSBY202
00207      DISPLAY '*** DTSBR202 ABENDING.  '                           DTSBY202
00208              WRK-ABEND-MSG.                                       DTSBY202
00209                                                                   DTSBY202
00210      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBY202
00211                                                                   DTSBY202
00212  S999-EXIT.                                                       DTSBY202
00213      EXIT.                                                        DTSBY202
