00001  IDENTIFICATION DIVISION.                                         06/19/06
00002  PROGRAM-ID.             DTSBX206.                                DTSBX206
00003  AUTHOR.                 NGC.                                        LV003
00004  DATE-WRITTEN.           OCTOBER 2005.                            DTSBX206
00005 *DATE-MODIFIED.                                                   DTSBX206
00006  DATE-COMPILED.                                                   DTSBX206
00007                                                                   DTSBX206
00008 *****                                                             DTSBX206
00009 *                                                                 DTSBX206
00010 *                                                                 DTSBX206
00011 *    FUNCTION:  EXTRACT R204 RECORDS (CHANGES TO ARPT-EM-NO)      DTSBX206
00012 *               FOR DOWNLOAD TO SQL SERVER.                       DTSBX206
00013 *               USED TO TRACK WAGE ITEMS POSTED TO THE WRONG      DTSBX206
00014 *               ACCOUNT NUMBER.                                   DTSBX206
00015 *                                                                 DTSBX206
00016 *    MODIFICATION HISTORY:                                        DTSBX206
00017 *                                                                 DTSBX206
00018 * 10-19-2005 INITIAL DEVELOPMENT.                                 DTSBX206
00019 *            REFERENCE RFP #****            AUTHOR OF CHANGE - GD DTSBX206
00020 *                                                                 DTSBX206
00021 * MM-DD-YY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBX206
00022 *          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBX206
00023 *          REFERENCE RFP #****            AUTHOR OF CHANGE - XXX  DTSBX206
00024 *                                                                 DTSBX206
00025 *    DESCRIPTION:                                                 DTSBX206
00026 *                                                                 DTSBX206
00027 *                                                                 DTSBX206
00028 *                                                                 DTSBX206
00029 *    RECORDS READ:                                                DTSBX206
00030 *                                                                 DTSBX206
00031 *                                                                 DTSBX206
00032 *    PRINTED OUTPUTS:                                             DTSBX206
00033 *                                                                 DTSBX206
00034 *       NONE.                                                     DTSBX206
00035 *                                                                 DTSBX206
00036 *    RECORDS WRITTEN:                                             DTSBX206
00037 *                                                                 DTSBX206
00038 *        A COMMA SEPARATED BATCH CONTROL SUMMARY INFORMATION.     DTSBX206
00039 *                                                                 DTSBX206
00040 *    MODULES CALLED:                                              DTSBX206
00041 *                                                                 DTSBX206
00042 *        DTSBU001 DATE EDIT/CONVERSION MODULE                     DTSBX206
00043 *        DTSBU005 DATE EDIT/CONVERSION MODULE                     DTSBX206
00044 *        DTSBU941 VARIABLE LENGTH RECORD READ                     DTSBX206
00045 *                                                                 DTSBX206
00046 *****                                                             DTSBX206
00047                                                                   DTSBX206
00048  ENVIRONMENT DIVISION.                                            DTSBX206
00049                                                                   DTSBX206
00050  CONFIGURATION SECTION.                                           DTSBX206
00051                                                                   DTSBX206
00052  INPUT-OUTPUT SECTION.                                            DTSBX206
00053                                                                   DTSBX206
00054  FILE-CONTROL.                                                    DTSBX206
00055      SELECT EMP-AUDIT-FILE   ASSIGN TO DTSFEAUD.                  DTSBX206
00056  DATA DIVISION.                                                   DTSBX206
00057                                                                   DTSBX206
00058  FILE SECTION.                                                    DTSBX206
00059                                                                   DTSBX206
00060  FD  EMP-AUDIT-FILE                                               DTSBX206
00061      RECORDING MODE IS F                                          DTSBX206
00062      BLOCK CONTAINS 0 RECORDS                                     DTSBX206
00063      LABEL RECORDS ARE OMITTED.                                   DTSBX206
00064                                                                   DTSBX206
00065  01  EMP-AUDIT-REC           PIC X(47).                           DTSBX206
00066                                                                   DTSBX206
00067  WORKING-STORAGE SECTION.                                         DTSBX206
000675 77  PAN-VALET PICTURE X(24) VALUE '003DTSBX206  06/19/06'.       DTSBX206
00068  01  WRK-AREA.                                                    DTSBX206
00069      05  FILE-STATUS                  PIC 9(02) VALUE ZEROS.      DTSBX206
00070      05  WRK-MOD-NAME                 PIC X(08) VALUE 'DTSBZ206'. DTSBX206
00071      05  WRK-ABEND-CD                 PIC S9(04) COMP  VALUE +206.DTSBX206
00072      05  WRK-READ-CNT                 PIC S9(07) COMP-3 VALUE +0. DTSBX206
00073      05  WRK-WRITE-CNT                PIC S9(07) COMP-3 VALUE +0. DTSBX206
00074      05  DISP-WRK-READ-CNT            PIC ZZ,ZZZ,ZZ9.             DTSBX206
00075      05  DISP-WRK-WRITE-CNT           PIC ZZ,ZZZ,ZZ9.             DTSBX206
00076                                                                   DTSBX206
00077  01  WRK-204-DATA.                                                DTSBX206
00078      05  WRK-CHNG-DATE                 PIC  X(10).                DTSBX206
00079      05  FILLER                        PIC  X(01)  VALUE ','.     DTSBX206
00080      05  WRK-OLD-EMP-NO                PIC  9(06).                DTSBX206
00081      05  FILLER                        PIC  X(01)  VALUE ','.     DTSBX206
00082      05  WRK-NEW-EMP-NO                PIC  9(06).                DTSBX206
00083      05  FILLER                        PIC  X(01)  VALUE ','.     DTSBX206
00084      05  WRK-BATCH-NO                  PIC  9(05).                DTSBX206
00085      05  FILLER                        PIC  X(01)  VALUE ','.     DTSBX206
00086      05  WRK-ITEM-NO                   PIC  9(03).                DTSBX206
00087      05  FILLER                        PIC  X(01)  VALUE ','.     DTSBX206
00088      05  WRK-TOT-WAGE                  PIC  --------9.99.         DTSBX206
00089                                                                   DTSBX206
00090  01  L001-LINK-AREA.                                              DTSBX206
00091  ++INCLUDE DTSIL001                                               DTSBX206
00092                                                                   DTSBX206
00093  01  L005-LINK-AREA.                                              DTSBX206
00094  ++INCLUDE DTSIL005                                               DTSBX206
00095                                                                   DTSBX206
00096  01  L941-LINK-AREA.                                              DTSBX206
00097  ++INCLUDE DTSIL941                                               DTSBX206
00098                                                                   DTSBX206
00099  01  RSK3-REC.                                                    DTSBX206
00100  ++INCLUDE DTSIRSK3                                               DTSBX206
00101                                                                   DTSBX206
00102  01  R204-REC.                                                    DTSBX206
00103  ++INCLUDE DTSIR204                                               DTSBX206
00104                                                                   DTSBX206
00105  PROCEDURE DIVISION.                                              DTSBX206
00106      PERFORM I0000-INITIATE     THRU I0000-EXIT.                  DTSBX206
00107                                                                   DTSBX206
00108      PERFORM P0000-PROCESS      THRU P0000-EXIT.                  DTSBX206
00109                                                                   DTSBX206
00110      PERFORM T0000-TERMINATE    THRU T0000-EXIT.                  DTSBX206
00111                                                                   DTSBX206
00112      GOBACK.                                                      DTSBX206
00113                                                                   DTSBX206
00114  I0000-INITIATE.                                                  DTSBX206
00115                                                                   DTSBX206
00116      OPEN OUTPUT EMP-AUDIT-FILE.                                  DTSBX206
00117      MOVE SPACES TO EMP-AUDIT-REC.                                DTSBX206
00118      MOVE 'N'               TO L941-TRACE-IND.                    DTSBX206
00119      MOVE WRK-MOD-NAME      TO L941-MOD-NAME.                     DTSBX206
00120                                                                   DTSBX206
00121      PERFORM S941-OPEN THRU S941-EXIT.                            DTSBX206
00122                                                                   DTSBX206
00123  I0000-EXIT.                                                      DTSBX206
00124      EXIT.                                                        DTSBX206
00125                                                                   DTSBX206
00126  P0000-PROCESS.                                                   DTSBX206
00127      PERFORM P1000-READ-SRTDAILY  THRU P1000-EXIT                 DTSBX206
00128         UNTIL L941-NO-REC-88.                                     DTSBX206
00129                                                                   DTSBX206
00130  P0000-EXIT.                                                      DTSBX206
00131      EXIT.                                                        DTSBX206
00132                                                                   DTSBX206
00133  P1000-READ-SRTDAILY.                                             DTSBX206
00134      PERFORM S941-READ-NEXT THRU S941-EXIT.                       DTSBX206
00135                                                                   DTSBX206
00136      IF L941-NO-REC-88                                            DTSBX206
00137         GO TO P1000-EXIT.                                         DTSBX206
00138                                                                   DTSBX206
00139      IF RSK3-REC-TYPE EQUAL '204'                                 DTSBX206
00140         ADD +1    TO WRK-READ-CNT                                 DTSBX206
00141         MOVE RSK3-REC (1:41) TO R204-REC                          DTSBX206
00142         PERFORM P1100-PROCESS-R204 THRU P1100-EXIT                DTSBX206
00143      END-IF.                                                      DTSBX206
00144                                                                   DTSBX206
00145  P1000-EXIT.                                                      DTSBX206
00146      EXIT.                                                        DTSBX206
00147                                                                   DTSBX206
00148  P1100-PROCESS-R204.                                              DTSBX206
00149      DISPLAY R204-NEW-EMP-NO.                                     DTSBX206
00150                                                                   DTSBX206
00151      MOVE R204-CHANGE-DATE              TO L001-FED-8-DATE-9.     DTSBX206
00152      PERFORM S001-FROM-FED-8            THRU S001-EXIT.           DTSBX206
00153      MOVE L001-SLASH-8-DATE             TO WRK-CHNG-DATE.         DTSBX206
00154                                                                   DTSBX206
00155      MOVE R204-ORIG-EMP-NO              TO WRK-OLD-EMP-NO.        DTSBX206
00156      MOVE R204-NEW-EMP-NO               TO WRK-NEW-EMP-NO.        DTSBX206
00157                                                                   DTSBX206
00158      MOVE R204-BATCH-NO                 TO WRK-BATCH-NO.          DTSBX206
00159                                                                   DTSBX206
00160      MOVE R204-ITEM-NO                  TO WRK-ITEM-NO.           DTSBX206
00161                                                                   DTSBX206
00162      MOVE R204-TOT-WAGE                 TO WRK-TOT-WAGE.          DTSBX206
00163                                                                   DTSBX206
00164      DISPLAY WRK-204-DATA.                                        DTSBX206
00165                                                                   DTSBX206
00166      WRITE EMP-AUDIT-REC FROM WRK-204-DATA.                       DTSBX206
00167      ADD +1    TO WRK-WRITE-CNT.                                  DTSBX206
00168                                                                   DTSBX206
00169  P1100-EXIT.                                                      DTSBX206
00170      EXIT.                                                        DTSBX206
00171                                                                   DTSBX206
00172  S001-FROM-FED-8.                                                 DTSBX206
00173      SET L001-FROM-FED-8 TO TRUE.                                 DTSBX206
00174      GO TO S001-DATE.                                             DTSBX206
00175                                                                   DTSBX206
00176  S001-DATE.                                                       DTSBX206
00177      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBX206
00178  S001-EXIT.                                                       DTSBX206
00179      EXIT.                                                        DTSBX206
00180                                                                   DTSBX206
00181  S005-DATE.                                                       DTSBX206
00182      CALL 'DTSBU005' USING L005-LINK-AREA.                        DTSBX206
00183  S005-EXIT.                                                       DTSBX206
00184      EXIT.                                                        DTSBX206
00185                                                                   DTSBX206
00186  S941-OPEN.                                                       DTSBX206
00187      SET L941-OPEN-READ-88 TO TRUE.                               DTSBX206
00188      GO TO S941-I.                                                DTSBX206
00189                                                                   DTSBX206
00190  S941-READ-NEXT.                                                  DTSBX206
00191      SET L941-READ-NEXT-88 TO TRUE.                               DTSBX206
00192      GO TO S941-I.                                                DTSBX206
00193                                                                   DTSBX206
00194  S941-CLOSE.                                                      DTSBX206
00195      SET L941-CLOSE-88 TO TRUE.                                   DTSBX206
00196      GO TO S941-I.                                                DTSBX206
00197                                                                   DTSBX206
00198  S941-I.                                                          DTSBX206
00199      CALL 'DTSBU941' USING L941-LINK-AREA,                        DTSBX206
00200                            RSK3-REC.                              DTSBX206
00201  S941-EXIT.                                                       DTSBX206
00202      EXIT.                                                        DTSBX206
00203                                                                   DTSBX206
00204  S999-ABEND.                                                      DTSBX206
00205      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBX206
00206      SKIP2                                                        DTSBX206
00207  S999-EXIT.                                                       DTSBX206
00208      EXIT.                                                        DTSBX206
00209                                                                   DTSBX206
00210  T0000-TERMINATE.                                                 DTSBX206
00211                                                                   DTSBX206
00212      IF WRK-WRITE-CNT = 0                                         DTSBX206
00213         PERFORM T1000-WRITE-DUMMY      THRU T1000-EXIT            DTSBX206
00214      END-IF.                                                      DTSBX206
00215                                                                   DTSBX206
00216      DISPLAY '      '.                                            DTSBX206
00217      MOVE WRK-READ-CNT       TO DISP-WRK-READ-CNT.                DTSBX206
00218      DISPLAY 'TOTAL R204 RECORDS READ = ' DISP-WRK-READ-CNT.      DTSBX206
00219                                                                   DTSBX206
00220      MOVE WRK-WRITE-CNT      TO DISP-WRK-WRITE-CNT.               DTSBX206
00221      DISPLAY 'TOTAL BTC RECORDS WRITTEN = '                       DTSBX206
00222                                           DISP-WRK-WRITE-CNT.     DTSBX206
00223                                                                   DTSBX206
00224      PERFORM S941-CLOSE THRU S941-EXIT.                           DTSBX206
00225      CLOSE EMP-AUDIT-FILE.                                        DTSBX206
00226  T0000-EXIT.                                                      DTSBX206
00227      EXIT.                                                        DTSBX206
00228                                                                   DTSBX206
00229  T1000-WRITE-DUMMY.                                               DTSBX206
00230      MOVE '12/31/9999'                  TO WRK-CHNG-DATE.         DTSBX206
00231                                                                   DTSBX206
00232      MOVE ZERO                          TO WRK-OLD-EMP-NO         DTSBX206
00233                                            WRK-NEW-EMP-NO         DTSBX206
00234                                            WRK-BATCH-NO           DTSBX206
00235                                            WRK-ITEM-NO            DTSBX206
00236                                            WRK-TOT-WAGE.          DTSBX206
00237                                                                   DTSBX206
00238      DISPLAY 'DUMMY RECORD WRITTEN'.                              DTSBX206
00239                                                                   DTSBX206
00240      WRITE EMP-AUDIT-REC FROM WRK-204-DATA.                       DTSBX206
00241      ADD +1    TO WRK-WRITE-CNT.                                  DTSBX206
00242                                                                   DTSBX206
00243  T1000-EXIT.                                                      DTSBX206
00244      EXIT.                                                        DTSBX206
00245                                                                   DTSBX206
