00001  IDENTIFICATION DIVISION.                                         05/14/09
00002  PROGRAM-ID. DTSBR202.                                            DTSBR202
00003  DATE-COMPILED.                                                      LV003
00004 *                                                                 DTSBR202
00005 *****                                                             DTSBR202
00006 *                                                                 DTSBR202
00007 *                                                                 DTSBR202
00008 *    FUNCTION:  READS IN IR202 TYPE RECORDS AND WRITES OUT        DTSBR202
00009 *               X202 TYPE RECORDS FOR THE WEB SYSTEM. ALSO        DTSBR202
00010 *               ICESA RECORDS TO SEND AN EMAIL REPORT.            DTSBR202
00011 *    MODIFICATION HISTORY:                                        DTSBR202
00012 *                                                                 DTSBR202
00013 * 04-29-2009 INITIAL DEVELOPMENT                                  DTSBR202
00014 *            REFERENCE RFP #RAP             AUTHOR OF CHANGE - ZL1DTSBR202
00015 *                                                                 DTSBR202
00016 * 05-14-2009 ADDED APPROVAL DATE OF 01/01/1900 TO DUMMY RECORD -  DTSBR202
00017 *            THE DATE IS NEEDED BY THE STORED PROCEDURE, EVEN WHENDTSBR202
00018 *            EVALUATING A DUMMY RECORD.                           DTSBR202
00019 *            REFERENCE RFP #RAP             AUTHOR OF CHANGE - GD DTSBR202
00020 *                                                                 DTSBR202
00021 * MM-DD-YY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBR202
00022 *          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBR202
00023 *          REFERENCE RFP #****            AUTHOR OF CHANGE - XXX  DTSBR202
00024 *                                                                 DTSBR202
00025 *                                                                 DTSBR202
00026 *    DESCRIPTION:                                                 DTSBR202
00027 *                                                                 DTSBR202
00028 *        THIS MODULE ATTEMPTS TO REPORT THE POTENTIALLY           DTSBR202
00029 *        UNREPORTED EARNINGS BENEFITS CLAIMS.                     DTSBR202
00030 *                                                                 DTSBR202
00031 *                                                                 DTSBR202
00032 *    RECORDS READ:                                                DTSBR202
00033 *                                                                 DTSBR202
00034 *        NONE.                                                    DTSBR202
00035 *                                                                 DTSBR202
00036 *                                                                 DTSBR202
00037 *    PRINTED OUTPUTS:                                             DTSBR202
00038 *                                                                 DTSBR202
00039 *        NONE                                                     DTSBR202
00040 *                                                                 DTSBR202
00041 *                                                                 DTSBR202
00042 *    RECORDS WRITTEN:                                             DTSBR202
00043 *                                                                 DTSBR202
00044 *        NONE.                                                    DTSBR202
00045 *                                                                 DTSBR202
00046 *                                                                 DTSBR202
00047 *    MODULES CALLED:                                              DTSBR202
00048 *                                                                 DTSBR202
00049 *                                                                 DTSBR202
00050 *                                                                 DTSBR202
00051 *****                                                             DTSBR202
00052      EJECT                                                        DTSBR202
00053  ENVIRONMENT DIVISION.                                            DTSBR202
00054                                                                   DTSBR202
00055  CONFIGURATION SECTION.                                           DTSBR202
00056  SPECIAL-NAMES. C01 IS TOP-OF-PAGE.                               DTSBR202
00057                                                                   DTSBR202
00058  INPUT-OUTPUT SECTION.                                            DTSBR202
00059                                                                   DTSBR202
00060  FILE-CONTROL.                                                    DTSBR202
00061      SELECT PRT-FILE1   ASSIGN TO RPT202R1.                       DTSBR202
00062                                                                   DTSBR202
00063      SELECT X202-FILE   ASSIGN TO DTSX202F.                       DTSBR202
00064                                                                   DTSBR202
00065  DATA DIVISION.                                                   DTSBR202
00066                                                                   DTSBR202
00067  FILE SECTION.                                                    DTSBR202
00068                                                                   DTSBR202
00069  FD  X202-FILE                                                    DTSBR202
00070      RECORDING MODE IS F.                                         DTSBR202
00071  01  X202-OUTREC                    PIC X(55).                    DTSBR202
00072                                                                   DTSBR202
00073  FD  PRT-FILE1                                                    DTSBR202
00074      RECORDING MODE IS F.                                         DTSBR202
00075  01  DETAIL1.                                                     DTSBR202
00076      05  BATCH-NO             PIC 9(05).                          DTSBR202
00077      05  ACCT-NO              PIC 9(12).                          DTSBR202
00078      05  DEPOSIT-DATE         PIC X(10).                          DTSBR202
00079      05  REMIT-AMT            PIC 9(9)V99.                        DTSBR202
00080      05  FILLER               PIC X(10).                          DTSBR202
00081                                                                   DTSBR202
00082  WORKING-STORAGE SECTION.                                         DTSBR202
000825 77  PAN-VALET PICTURE X(24) VALUE '003DTSBR202  05/14/09'.       DTSBR202
00083                                                                   DTSBR202
00084  01  WRK-AREA.                                                    DTSBR202
00085      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +202.DTSBR202
00086      05  WRK-ABEND-MSG               PIC  X(60)  VALUE SPACES.    DTSBR202
00087      05  FIRST-TIME-IND              PIC  X(01)  VALUE 'Y'.       DTSBR202
00088      05  R202-CNT                    PIC S9(05) COMP-3 VALUE +0.  DTSBR202
00089      05  X202-CNT                    PIC S9(05) COMP-3 VALUE +0.  DTSBR202
00090      05  X202-ICESA-CNT              PIC S9(05) COMP-3 VALUE +0.  DTSBR202
00091  01  L001-LINK-AREA.                                              DTSBR202
00092  ++INCLUDE DTSIL001                                               DTSBR202
00093      EJECT                                                        DTSBR202
00094                                                                   DTSBR202
00095  01  X202-REC.                                                    DTSBR202
00096  ++INCLUDE DTSIX202                                               DTSBR202
00097                                                                   DTSBR202
00098      EJECT                                                        DTSBR202
00099  LINKAGE SECTION.                                                 DTSBR202
00100                                                                   DTSBR202
00101  01  LRCM-LINK-AREA.                                              DTSBR202
00102  ++INCLUDE DTSILRCM                                               DTSBR202
00103      EJECT                                                        DTSBR202
00104  01  R202-REC.                                                    DTSBR202
00105  ++INCLUDE DTSIR202                                               DTSBR202
00106      EJECT                                                        DTSBR202
00107  PROCEDURE DIVISION USING LRCM-LINK-AREA                          DTSBR202
00108                           R202-REC.                               DTSBR202
00109                                                                   DTSBR202
00110      IF FIRST-TIME-IND = 'Y'                                      DTSBR202
00111          PERFORM I1000-INITIATE THRU I1000-EXIT                   DTSBR202
00112          MOVE 'N' TO FIRST-TIME-IND.                              DTSBR202
00113                                                                   DTSBR202
00114      IF LRCM-EOR-88                                               DTSBR202
00115          PERFORM T1000-TERMINATE THRU T1000-EXIT                  DTSBR202
00116      ELSE                                                         DTSBR202
00117          PERFORM P0000-PROCESS THRU P0000-EXIT.                   DTSBR202
00118                                                                   DTSBR202
00119      GOBACK.                                                      DTSBR202
00120      EJECT                                                        DTSBR202
00121  I1000-INITIATE.                                                  DTSBR202
00122                                                                   DTSBR202
00123      OPEN OUTPUT X202-FILE                                        DTSBR202
00124                  PRT-FILE1.                                       DTSBR202
00125                                                                   DTSBR202
00126  I1000-EXIT.                                                      DTSBR202
00127      EXIT.                                                        DTSBR202
00128      EJECT                                                        DTSBR202
00129                                                                   DTSBR202
00130  P0000-PROCESS.                                                   DTSBR202
00131                                                                   DTSBR202
00132      ADD  1                       TO R202-CNT.                    DTSBR202
00133      MOVE R202-BATCH-NO           TO X202-BATCH.                  DTSBR202
00134      MOVE R202-BATCH-TYPE         TO X202-BATCH-TYPE.             DTSBR202
00135      MOVE R202-CONTROL-REMIT-AMT  TO X202-CONTROL-REMIT-AMT       DTSBR202
00136      MOVE R202-CONTROL-TRAN-CNT   TO X202-CONTROL-TRAN-CNT        DTSBR202
00137      MOVE R202-APPROVED-OPID      TO X202-APPROVED-OPID.          DTSBR202
00138      MOVE R202-BATCH-ESTB-DATE    TO  L001-FED-8-DATE-9.          DTSBR202
00139      SET L001-FROM-FED-8          TO  TRUE.                       DTSBR202
00140      PERFORM S001-DATE            THRU S001-EXIT.                 DTSBR202
00141      MOVE L001-SLASH-8-DATE       TO X202-BATCH-ESTB-DT.          DTSBR202
00142                                                                   DTSBR202
00143      MOVE R202-APPROVED-DATE      TO  L001-FED-8-DATE-9.          DTSBR202
00144      SET L001-FROM-FED-8          TO  TRUE.                       DTSBR202
00145      PERFORM S001-DATE            THRU S001-EXIT.                 DTSBR202
00146      MOVE L001-SLASH-8-DATE       TO X202-APPROVED-DT.            DTSBR202
00147      WRITE X202-OUTREC FROM X202-REC.                             DTSBR202
00148      ADD +1                       TO X202-CNT.                    DTSBR202
00149                                                                   DTSBR202
00150      IF R202-BATCH-ICESA-88                                       DTSBR202
00151         ADD +1                       TO X202-ICESA-CNT            DTSBR202
00152         MOVE 01234567890             TO ACCT-NO                   DTSBR202
00153         MOVE R202-BATCH-NO           TO BATCH-NO                  DTSBR202
00154         MOVE R202-CONTROL-REMIT-AMT  TO REMIT-AMT                 DTSBR202
00155         MOVE X202-BATCH-ESTB-DT      TO DEPOSIT-DATE              DTSBR202
00156         WRITE DETAIL1.                                            DTSBR202
00157  P0000-EXIT.                                                      DTSBR202
00158      EXIT.                                                        DTSBR202
00159                                                                   DTSBR202
00160                                                                   DTSBR202
00161  T1000-TERMINATE.                                                 DTSBR202
00162      DISPLAY '*******  BR202 RAN SUCESSFULLY *************'.      DTSBR202
00163      DISPLAY '*******  TOTAL R200 RECORDS READ ' R202-CNT.        DTSBR202
00164      DISPLAY '*******  TOTAL X200 RECORDS WROTE ' X202-CNT.       DTSBR202
00165      DISPLAY '*******  TOTAL ICESA RECS     ' X202-ICESA-CNT.     DTSBR202
00166                                                                   DTSBR202
00167      IF X202-CNT = ZEROS                                          DTSBR202
00168         MOVE ZEROS                   TO X202-BATCH                DTSBR202
00169         MOVE SPACES                  TO X202-BATCH-TYPE           DTSBR202
00170                                         X202-BATCH-ESTB-DT        DTSBR202
00171                                         X202-APPROVED-OPID        DTSBR202
00172         MOVE ZERO                    TO X202-CONTROL-REMIT-AMT    DTSBR202
00173                                         X202-CONTROL-TRAN-CNT     DTSBR202
00174         MOVE '01/01/1900'            TO X202-APPROVED-DT          DTSBR202
00175         WRITE X202-OUTREC            FROM X202-REC                DTSBR202
00176      END-IF.                                                      DTSBR202
00177                                                                   DTSBR202
00178      IF X202-ICESA-CNT = ZEROS                                    DTSBR202
00179         MOVE ZEROS                   TO BATCH-NO                  DTSBR202
00180         WRITE DETAIL1.                                            DTSBR202
00181                                                                   DTSBR202
00182      CLOSE X202-FILE                                              DTSBR202
00183            PRT-FILE1.                                             DTSBR202
00184                                                                   DTSBR202
00185  T1000-EXIT.                                                      DTSBR202
00186      EXIT.                                                        DTSBR202
00187      EJECT                                                        DTSBR202
00188                                                                   DTSBR202
00189  S001-DATE.                                                       DTSBR202
00190      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBR202
00191  S001-EXIT.                                                       DTSBR202
00192      EXIT.                                                        DTSBR202
00193                                                                   DTSBR202
00194  S999-ABEND.                                                      DTSBR202
00195                                                                   DTSBR202
00196      DISPLAY '*** DTSBR202 ABENDING.  '                           DTSBR202
00197              WRK-ABEND-MSG.                                       DTSBR202
00198                                                                   DTSBR202
00199      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBR202
00200                                                                   DTSBR202
00201  S999-EXIT.                                                       DTSBR202
00202      EXIT.                                                        DTSBR202
