00001  IDENTIFICATION DIVISION.                                         07/08/11
00002  PROGRAM-ID.             DESBD316.                                DESBD316
00003  AUTHOR.                 NGC.                                        LV009
00004  DATE-WRITTEN.           JANUARY 2007.                            DESBD316
00005  DATE-COMPILED.                                                   DESBD316
00006                                                                   DESBD316
00007 *****                                                             DESBD316
00008 *                                                                 DESBD316
00009 *    FUNCTION:  COMPARE CURRENT DAY'S WAGE FILE WITH THE          DESBD316
00010 *               PREVIOUS DAY'S FILE. IDENTIFY ANY WAGE ITEMS      DESBD316
00011 *               ADDED, DELETED OR CHANGED. WRITE ADDS, DELETES,   DESBD316
00012 *               CHANGES TO AN OUTPUT FILE.                        DESBD316
00013 *                                                                 DESBD316
00014 *                                                                 DESBD316
00015 *                                                                 DESBD316
00016 *    MODIFICATION HISTORY:                                        DESBD316
00017 *                                                                 DESBD316
00018 *    01/15/2007  INITIAL DEVELOPMENT                              DESBD316
00019 *                REFERENCE:                     PROGRAMMER: GD    DESBD316
00020 *                                                                 DESBD316
00021 *    12/19/2008  CORRECTED ERROR IN P1310 - ACTION SHOULD BE      DESBD316
00022 *                SET TO UPDATE RATHER THAN DELETE.                DESBD316
00023 *                REFERENCE:                     PROGRAMMER: GD    DESBD316
00024 *                                                                 DESBD316
00025 *    07/08/2011  MOPDIFIED P1310 - SQL SERVER STORED PROCEDURE    DESBD316
00026 *                EXPECTS TO RECEIVE THE NEW AMOUNT, NOT THE       DESBD316
00027 *                DIFFERENCE BETWEEN THE NEW AND OLD AMOUNTS.      DESBD316
00028 *                REFERENCE:                     PROGRAMMER: GD    DESBD316
00029 *                                                                 DESBD316
00030 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DESBD316
00031 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DESBD316
00032 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DESBD316
00033 *                                                                 DESBD316
00034 *    DESCRIPTION:                                                 DESBD316
00035 *                                                                 DESBD316
00036 *                                                                 DESBD316
00037 *    RECORDS READ:                                                DESBD316
00038 *        WAGE RECORDS OUTPUT FROM DESBD310                        DESBD316
00039 *                                                                 DESBD316
00040 *    PRINTED OUTPUTS:                                             DESBD316
00041 *        NONE                                                     DESBD316
00042 *                                                                 DESBD316
00043 *    RECORDS WRITTEN:                                             DESBD316
00044 *        DTSIWWGH WAGE RECORDS                                    DESBD316
00045 *                                                                 DESBD316
00046 *    MODULES CALLED:                                              DESBD316
00047 *         NONE                                                    DESBD316
00048 *                                                                 DESBD316
00049 *****                                                             DESBD316
00050                                                                   DESBD316
00051  ENVIRONMENT DIVISION.                                            DESBD316
00052      SKIP2                                                        DESBD316
00053  INPUT-OUTPUT SECTION.                                            DESBD316
00054      SKIP3                                                        DESBD316
00055  FILE-CONTROL.                                                    DESBD316
00056      SELECT EXT-SEQUENCE  ASSIGN TO DTSFXSEQ                      DESBD316
00057             FILE STATUS IS EXT-SEQ-STATUS.                        DESBD316
00058                                                                   DESBD316
00059      SELECT NEW-WAGE      ASSIGN TO DTSFWGIN                      DESBD316
00060             FILE STATUS IS NEW-WAGE-STATUS.                       DESBD316
00061                                                                   DESBD316
00062      SELECT WAGE-CHANGE   ASSIGN TO DTSFWGC                       DESBD316
00063             FILE STATUS IS WAGE-CHANGE-STATUS.                    DESBD316
00064      SKIP2                                                        DESBD316
00065                                                                   DESBD316
00066  DATA DIVISION.                                                   DESBD316
00067      SKIP2                                                        DESBD316
00068  FILE SECTION.                                                    DESBD316
00069      SKIP2                                                        DESBD316
00070  FD  EXT-SEQUENCE                                                 DESBD316
00071      RECORDING MODE IS F                                          DESBD316
00072      LABEL RECORDS ARE STANDARD                                   DESBD316
00073      BLOCK CONTAINS 0 CHARACTERS.                                 DESBD316
00074      SKIP1                                                        DESBD316
00075  01  EXT-SEQ-REC                           PIC X(14).             DESBD316
00076                                                                   DESBD316
00077  FD  NEW-WAGE                                                     DESBD316
00078      RECORDING MODE IS F                                          DESBD316
00079      LABEL RECORDS ARE STANDARD                                   DESBD316
00080      BLOCK CONTAINS 0 CHARACTERS.                                 DESBD316
00081      SKIP1                                                        DESBD316
00082  01  NEW-WAGE-REC.                                                DESBD316
00083  ++INCLUDE DTSIWWGH                                               DESBD316
00084                                                                   DESBD316
00085  FD  WAGE-CHANGE                                                  DESBD316
00086      RECORDING MODE IS F                                          DESBD316
00087      LABEL RECORDS ARE STANDARD                                   DESBD316
00088      BLOCK CONTAINS 0 CHARACTERS.                                 DESBD316
00089      SKIP1                                                        DESBD316
00090  01  WAGE-CHANGE-REC                 PIC  X(42).                  DESBD316
00091                                                                   DESBD316
00092      EJECT                                                        DESBD316
00093  WORKING-STORAGE SECTION.                                         DESBD316
000935 77  PAN-VALET PICTURE X(24) VALUE '009DESBD316  07/08/11'.       DESBD316
00094      SKIP3                                                        DESBD316
00095  01  WRK-AREA.                                                    DESBD316
00096      05  WRK-ERROR-IND               PIC  X(01) VALUE 'N'.        DESBD316
00097          88 WRK-ERROR-YES-88           VALUE 'Y'.                 DESBD316
00098          88 WRK-ERROR-NO-88            VALUE 'N'.                 DESBD316
00099                                                                   DESBD316
00100      05  WRK-MOD-NAME                PIC  X(08) VALUE 'DESBD316'. DESBD316
00101      05  WRK-TRACE-IND               PIC  X(01) VALUE 'N'.        DESBD316
00102                                                                   DESBD316
00103      05  NEW-WAGE-STATUS         PIC  X(02) VALUE SPACES.         DESBD316
00104          88  NEW-WAGE-OK-88          VALUE '00'.                  DESBD316
00105          88  NEW-WAGE-EOF-88         VALUE '10'.                  DESBD316
00106                                                                   DESBD316
00107      05  WAGE-CHANGE-STATUS      PIC  X(02) VALUE SPACES.         DESBD316
00108          88  WAGE-CHANGE-OK-88       VALUE '00'.                  DESBD316
00109                                                                   DESBD316
00110      05  EXT-SEQ-STATUS          PIC  X(02) VALUE SPACES.         DESBD316
00111          88  EXT-SEQ-OK-88           VALUE '00'.                  DESBD316
00112                                                                   DESBD316
00113      05  WRK-EXT-SEQ-REC.                                         DESBD316
00114          10  WRK-EXT-SEQ-NBR      PIC 9(03).                      DESBD316
00115          10  FILLER               PIC X(01) VALUE ','.            DESBD316
00116          10  WRK-EXT-SEQ-DATE     PIC X(10).                      DESBD316
00117                                                                   DESBD316
00118      05  WRK-NET-CHANGE           PIC S9(11)V99  COMP-3 VALUE +0. DESBD316
00119      05  WRK-TOT-CHANGE           PIC S9(11)V99  COMP-3 VALUE +0. DESBD316
00120                                                                   DESBD316
00121      05  WRK-WWGH-READ-CNT           PIC S9(07)  COMP-3 VALUE +0. DESBD316
00122      05  WRK-ADD-NEW-CNT             PIC S9(07)  COMP-3 VALUE +0. DESBD316
00123      05  WRK-DELETE-OLD-CNT          PIC S9(07)  COMP-3 VALUE +0. DESBD316
00124      05  WRK-UPDATE-WAGES-CNT        PIC S9(07)  COMP-3 VALUE +0. DESBD316
00125      05  WRK-WG-CHNG-CNT             PIC S9(07)  COMP-3 VALUE +0. DESBD316
00126      05  WRK-NEW-WAGE-CNT            PIC S9(07)  COMP-3 VALUE +0. DESBD316
00127      05  WRK-OLD-WAGE-CNT            PIC S9(07)  COMP-3 VALUE +0. DESBD316
00128                                                                   DESBD316
00129      05  AMT-DISP1                   PIC ----------9.99.          DESBD316
00130                                                                   DESBD316
00131  01  X143-REC.                                                    DESBD316
00132  ++INCLUDE DTSIX143                                               DESBD316
00133                                                                   DESBD316
00134  01  L001-LINK-AREA.                                              DESBD316
00135  ++INCLUDE DTSIL001                                               DESBD316
00136                                                                   DESBD316
00137  01  L004-LINK-AREA.                                              DESBD316
00138  ++INCLUDE DTSIL004                                               DESBD316
00139                                                                   DESBD316
00140  01  L005-LINK-AREA.                                              DESBD316
00141  ++INCLUDE DTSIL005                                               DESBD316
00142                                                                   DESBD316
00143  01  L981-LINK-AREA.                                              DESBD316
00144  ++INCLUDE DTSIL981                                               DESBD316
00145      SKIP3                                                        DESBD316
00146  01  OLD-WAGE-REC.                                                DESBD316
00147  ++INCLUDE DTSIWWGH                                               DESBD316
00148                                                                   DESBD316
00149                                                                   DESBD316
00150  PROCEDURE DIVISION.                                              DESBD316
00151                                                                   DESBD316
00152  DESBD316-MAIN.                                                   DESBD316
00153      PERFORM I0000-INIT         THRU I0000-EXIT.                  DESBD316
00154      IF WRK-ERROR-YES-88                                          DESBD316
00155         GO TO DESBD316-MAIN-EXIT.                                 DESBD316
00156                                                                   DESBD316
00157      PERFORM P0000-PROCESS    THRU P0000-EXIT.                    DESBD316
00158                                                                   DESBD316
00159      PERFORM T0000-TERMINATE THRU T0000-EXIT.                     DESBD316
00160                                                                   DESBD316
00161  DESBD316-MAIN-EXIT.                                              DESBD316
00162      GOBACK.                                                      DESBD316
00163                                                                   DESBD316
00164  I0000-INIT.                                                      DESBD316
00165      PERFORM I2000-OPEN-FILES        THRU I2000-EXIT.             DESBD316
00166      PERFORM I3000-WRITE-SEQUENCE    THRU I3000-EXIT.             DESBD316
00167                                                                   DESBD316
00168  I0000-EXIT.                                                      DESBD316
00169      EXIT.                                                        DESBD316
00170                                                                   DESBD316
00171  I2000-OPEN-FILES.                                                DESBD316
00172      PERFORM S1000-OPEN-NEW-WAGE     THRU S1000-EXIT              DESBD316
00173      IF WRK-ERROR-NO-88                                           DESBD316
00174         PERFORM S1100-OPEN-WG-CHNG   THRU S1100-EXIT              DESBD316
00175         IF WRK-ERROR-NO-88                                        DESBD316
00176            PERFORM S981A-OPEN-READ   THRU S981A-EXIT              DESBD316
00177         END-IF                                                    DESBD316
00178      END-IF.                                                      DESBD316
00179                                                                   DESBD316
00180  I2000-EXIT.                                                      DESBD316
00181      EXIT.                                                        DESBD316
00182                                                                   DESBD316
00183  I3000-WRITE-SEQUENCE.                                            DESBD316
00184      PERFORM I3100-GET-LAST-SEQ      THRU I3100-EXIT.             DESBD316
00185      IF WRK-ERROR-NO-88                                           DESBD316
00186         PERFORM I3200-WRITE-NEW-SEQ  THRU I3200-EXIT              DESBD316
00187      END-IF.                                                      DESBD316
00188                                                                   DESBD316
00189  I3000-EXIT.                                                      DESBD316
00190      EXIT.                                                        DESBD316
00191                                                                   DESBD316
00192  I3100-GET-LAST-SEQ.                                              DESBD316
00193      PERFORM S1130-OPEN-EXT-SEQ-IN    THRU S1130-EXIT.            DESBD316
00194      IF WRK-ERROR-NO-88                                           DESBD316
00195         PERFORM S1150-READ-EXT-SEQ    THRU S1150-EXIT             DESBD316
00196         PERFORM S1170-CLOSE-EXT-SEQ   THRU S1170-EXIT             DESBD316
00197      END-IF.                                                      DESBD316
00198                                                                   DESBD316
00199  I3100-EXIT.                                                      DESBD316
00200      EXIT.                                                        DESBD316
00201                                                                   DESBD316
00202  I3200-WRITE-NEW-SEQ.                                             DESBD316
00203      DISPLAY 'CURRENT SEQ ' WRK-EXT-SEQ-NBR.                      DESBD316
00204      IF WRK-EXT-SEQ-NBR < 100                                     DESBD316
00205         ADD 1                         TO WRK-EXT-SEQ-NBR          DESBD316
00206      ELSE                                                         DESBD316
00207         MOVE 1                        TO WRK-EXT-SEQ-NBR          DESBD316
00208      END-IF.                                                      DESBD316
00209      DISPLAY 'NEW SEQ ' WRK-EXT-SEQ-NBR.                          DESBD316
00210                                                                   DESBD316
00211      PERFORM S005-FROM-SYS            THRU S005-EXIT.             DESBD316
00212      MOVE L005-DATE                   TO  L001-FED-8-DATE-9.      DESBD316
00213      PERFORM S001-FROM-FED-8          THRU S001-EXIT.             DESBD316
00214      MOVE L001-SLASH-8-DATE           TO WRK-EXT-SEQ-DATE.        DESBD316
00215                                                                   DESBD316
00216      PERFORM S1140-OPEN-EXT-SEQ-OUT   THRU S1140-EXIT.            DESBD316
00217      IF WRK-ERROR-NO-88                                           DESBD316
00218         PERFORM S1160-WRITE-EXT-SEQ   THRU S1160-EXIT             DESBD316
00219         PERFORM S1170-CLOSE-EXT-SEQ   THRU S1170-EXIT             DESBD316
00220         DISPLAY 'SEQ WRITTEN ' WRK-EXT-SEQ-NBR                    DESBD316
00221           '  ' WRK-EXT-SEQ-DATE                                   DESBD316
00222      END-IF.                                                      DESBD316
00223                                                                   DESBD316
00224  I3200-EXIT.                                                      DESBD316
00225      EXIT.                                                        DESBD316
00226                                                                   DESBD316
00227  P0000-PROCESS.                                                   DESBD316
00228      PERFORM S1010-READ-NEW-WAGE         THRU S1010-EXIT.         DESBD316
00229      IF NEW-WAGE-EOF-88                                           DESBD316
00230         DISPLAY 'INPUT FILE IS EMPTY'                             DESBD316
00231         GO TO P0000-EXIT                                          DESBD316
00232      END-IF.                                                      DESBD316
00233                                                                   DESBD316
00234      MOVE LOW-VALUES                     TO  OLD-WAGE-REC.        DESBD316
00235      PERFORM S981D-START-BROWSE          THRU S981D-EXIT.         DESBD316
00236      PERFORM P1000-PROCESS-FILE          THRU P1000-EXIT          DESBD316
00237         UNTIL (NEW-WAGE-EOF-88                                    DESBD316
00238            AND L981-NO-REC-88)                                    DESBD316
00239         OR WRK-ERROR-YES-88.                                      DESBD316
00240                                                                   DESBD316
00241  P0000-EXIT.                                                      DESBD316
00242      EXIT.                                                        DESBD316
00243                                                                   DESBD316
00244  P1000-PROCESS-FILE.                                              DESBD316
00245      IF L981-NO-REC-88                                            DESBD316
00246         PERFORM P1100-ADD-NEW               THRU P1100-EXIT       DESBD316
00247         PERFORM S1010-READ-NEW-WAGE         THRU S1010-EXIT       DESBD316
00248         GO TO P1000-EXIT                                          DESBD316
00249      END-IF.                                                      DESBD316
00250                                                                   DESBD316
00251      IF NEW-WAGE-EOF-88                                           DESBD316
00252            PERFORM P1200-DELETE-OLD         THRU P1200-EXIT       DESBD316
00253            PERFORM S981E-READ-NEXT          THRU S981E-EXIT       DESBD316
00254         GO TO P1000-EXIT                                          DESBD316
00255      END-IF.                                                      DESBD316
00256                                                                   DESBD316
00257      IF WWGH-KEY-AREA OF NEW-WAGE-REC <                           DESBD316
00258         WWGH-KEY-AREA OF OLD-WAGE-REC                             DESBD316
00259         PERFORM P1100-ADD-NEW               THRU P1100-EXIT       DESBD316
00260         PERFORM S1010-READ-NEW-WAGE         THRU S1010-EXIT       DESBD316
00261      ELSE                                                         DESBD316
00262         IF WWGH-KEY-AREA OF NEW-WAGE-REC >                        DESBD316
00263            WWGH-KEY-AREA OF OLD-WAGE-REC                          DESBD316
00264            PERFORM P1200-DELETE-OLD         THRU P1200-EXIT       DESBD316
00265            PERFORM S981E-READ-NEXT          THRU S981E-EXIT       DESBD316
00266         ELSE                                                      DESBD316
00267            PERFORM P1300-COMPARE-WAGES      THRU P1300-EXIT       DESBD316
00268            PERFORM S1010-READ-NEW-WAGE      THRU S1010-EXIT       DESBD316
00269            PERFORM S981E-READ-NEXT          THRU S981E-EXIT       DESBD316
00270         END-IF                                                    DESBD316
00271      END-IF.                                                      DESBD316
00272                                                                   DESBD316
00273  P1000-EXIT.                                                      DESBD316
00274      EXIT.                                                        DESBD316
00275                                                                   DESBD316
00276  P1100-ADD-NEW.                                                   DESBD316
00277      COMPUTE WRK-NET-CHANGE =                                     DESBD316
00278         WWGH-EARNINGS OF NEW-WAGE-REC.                            DESBD316
00279      ADD +1                            TO WRK-ADD-NEW-CNT.        DESBD316
00280                                                                   DESBD316
00281      MOVE WWGH-EMP-NO OF NEW-WAGE-REC  TO X143-EMP-NO.            DESBD316
00282      MOVE WWGH-SSN    OF NEW-WAGE-REC  TO X143-SSN.               DESBD316
00283      MOVE WWGH-YRQ    OF NEW-WAGE-REC  TO L004-QTR-5-9.           DESBD316
00284      PERFORM S004-FROM-5               THRU S004-EXIT.            DESBD316
00285      MOVE L004-SLASH-5-QTR             TO X143-QUARTER.           DESBD316
00286      SET X143-INSERT-88                TO TRUE.                   DESBD316
00287      MOVE WRK-NET-CHANGE               TO X143-EARNINGS.          DESBD316
00288                                                                   DESBD316
00289      PERFORM S1110-WRITE-WG-CHNG       THRU S1110-EXIT.           DESBD316
00290                                                                   DESBD316
00291      ADD WRK-NET-CHANGE                TO WRK-TOT-CHANGE.         DESBD316
00292                                                                   DESBD316
00293      DISPLAY 'ADD NEW ' WWGH-EMP-NO OF NEW-WAGE-REC               DESBD316
00294                       '  '  WWGH-YRQ    OF NEW-WAGE-REC           DESBD316
00295                       '  '  WWGH-SSN    OF NEW-WAGE-REC.          DESBD316
00296      DISPLAY '  NEW ' WWGH-EARNINGS OF NEW-WAGE-REC.              DESBD316
00297      DISPLAY '        '   WWGH-EMP-NO OF OLD-WAGE-REC '  '        DESBD316
00298            WWGH-SSN        OF OLD-WAGE-REC '  '                   DESBD316
00299            WWGH-YRQ        OF OLD-WAGE-REC.                       DESBD316
00300                                                                   DESBD316
00301  P1100-EXIT.                                                      DESBD316
00302      EXIT.                                                        DESBD316
00303                                                                   DESBD316
00304  P1200-DELETE-OLD.                                                DESBD316
00305      COMPUTE WRK-NET-CHANGE =                                     DESBD316
00306         (WWGH-EARNINGS OF OLD-WAGE-REC * -1).                     DESBD316
00307      ADD +1                            TO WRK-DELETE-OLD-CNT.     DESBD316
00308                                                                   DESBD316
00309      MOVE WWGH-EMP-NO OF OLD-WAGE-REC  TO X143-EMP-NO.            DESBD316
00310      MOVE WWGH-SSN    OF OLD-WAGE-REC  TO X143-SSN.               DESBD316
00311      MOVE WWGH-YRQ    OF OLD-WAGE-REC  TO L004-QTR-5-9.           DESBD316
00312      PERFORM S004-FROM-5               THRU S004-EXIT.            DESBD316
00313      MOVE L004-SLASH-5-QTR             TO X143-QUARTER.           DESBD316
00314      SET X143-DELETE-88                TO TRUE.                   DESBD316
00315      MOVE WRK-NET-CHANGE               TO X143-EARNINGS.          DESBD316
00316                                                                   DESBD316
00317      PERFORM S1110-WRITE-WG-CHNG       THRU S1110-EXIT.           DESBD316
00318                                                                   DESBD316
00319      ADD WRK-NET-CHANGE                TO WRK-TOT-CHANGE.         DESBD316
00320                                                                   DESBD316
00321      DISPLAY 'DELETE OLD ' WWGH-EMP-NO OF OLD-WAGE-REC            DESBD316
00322                       '  '  WWGH-YRQ    OF OLD-WAGE-REC           DESBD316
00323                       '  '  WWGH-SSN    OF OLD-WAGE-REC.          DESBD316
00324      DISPLAY  '  OLD ' WWGH-EARNINGS OF OLD-WAGE-REC.             DESBD316
00325                                                                   DESBD316
00326  P1200-EXIT.                                                      DESBD316
00327      EXIT.                                                        DESBD316
00328                                                                   DESBD316
00329  P1300-COMPARE-WAGES.                                             DESBD316
00330      IF WWGH-EARNINGS OF NEW-WAGE-REC NOT =                       DESBD316
00331         WWGH-EARNINGS OF OLD-WAGE-REC                             DESBD316
00332 **      COMPUTE WRK-NET-CHANGE =                                  DESBD316
00333 *          WWGH-EARNINGS OF NEW-WAGE-REC -                        DESBD316
00334 **         WWGH-EARNINGS OF OLD-WAGE-REC                          DESBD316
00335         ADD +1                      TO WRK-UPDATE-WAGES-CNT       DESBD316
00336         PERFORM P1310-WRITE-X143    THRU P1310-EXIT               DESBD316
00337         DISPLAY 'UPDATE WAGES '                                   DESBD316
00338                         WWGH-EMP-NO OF OLD-WAGE-REC               DESBD316
00339                   '  '  WWGH-YRQ    OF OLD-WAGE-REC               DESBD316
00340                   '  '  WWGH-SSN    OF OLD-WAGE-REC               DESBD316
00341         DISPLAY '  NEW ' WWGH-EARNINGS OF NEW-WAGE-REC            DESBD316
00342            '  OLD ' WWGH-EARNINGS OF OLD-WAGE-REC                 DESBD316
00343      END-IF.                                                      DESBD316
00344                                                                   DESBD316
00345  P1300-EXIT.                                                      DESBD316
00346      EXIT.                                                        DESBD316
00347                                                                   DESBD316
00348  P1310-WRITE-X143.                                                DESBD316
00349      MOVE WWGH-EMP-NO OF OLD-WAGE-REC    TO X143-EMP-NO.          DESBD316
00350      MOVE WWGH-SSN    OF OLD-WAGE-REC    TO X143-SSN.             DESBD316
00351      MOVE WWGH-YRQ    OF OLD-WAGE-REC    TO L004-QTR-5-9.         DESBD316
00352      PERFORM S004-FROM-5                 THRU S004-EXIT.          DESBD316
00353      MOVE L004-SLASH-5-QTR               TO X143-QUARTER.         DESBD316
00354      SET X143-UPDATE-88                  TO TRUE.                 DESBD316
00355      MOVE WWGH-EARNINGS OF NEW-WAGE-REC  TO X143-EARNINGS.        DESBD316
00356                                                                   DESBD316
00357      PERFORM S1110-WRITE-WG-CHNG         THRU S1110-EXIT.         DESBD316
00358                                                                   DESBD316
00359      ADD WRK-NET-CHANGE                  TO WRK-TOT-CHANGE.       DESBD316
00360                                                                   DESBD316
00361  P1310-EXIT.                                                      DESBD316
00362      EXIT.                                                        DESBD316
00363                                                                   DESBD316
00364                                                                   DESBD316
00365  T0000-TERMINATE.                                                 DESBD316
00366                                                                   DESBD316
00367      DISPLAY ' '.                                                 DESBD316
00368      DISPLAY ' '.                                                 DESBD316
00369                                                                   DESBD316
00370      DISPLAY '*** DESBD316 TERMINATION STATISTICS ***'.           DESBD316
00371                                                                   DESBD316
00372      DISPLAY '  '.                                                DESBD316
00373      DISPLAY 'NEW WAGE RECORDS READ                            : 'DESBD316
00374              WRK-NEW-WAGE-CNT.                                    DESBD316
00375                                                                   DESBD316
00376      DISPLAY '  '.                                                DESBD316
00377      DISPLAY 'OLD WAGE RECORDS READ                            : 'DESBD316
00378              WRK-OLD-WAGE-CNT.                                    DESBD316
00379                                                                   DESBD316
00380      DISPLAY '  '.                                                DESBD316
00381      DISPLAY 'NEW WAGE RECORDS ADDED                           : 'DESBD316
00382              WRK-ADD-NEW-CNT.                                     DESBD316
00383                                                                   DESBD316
00384      DISPLAY '  '.                                                DESBD316
00385      DISPLAY 'OLD RECORDS DELETED                              : 'DESBD316
00386              WRK-DELETE-OLD-CNT.                                  DESBD316
00387                                                                   DESBD316
00388      DISPLAY '  '.                                                DESBD316
00389      DISPLAY 'WAGES UPDATED                                    : 'DESBD316
00390              WRK-UPDATE-WAGES-CNT.                                DESBD316
00391                                                                   DESBD316
00392      MOVE WRK-TOT-CHANGE   TO AMT-DISP1.                          DESBD316
00393      DISPLAY '  '.                                                DESBD316
00394      DISPLAY 'TOTAL NET CHANGE IN WAGES                        : 'DESBD316
00395              AMT-DISP1.                                           DESBD316
00396                                                                   DESBD316
00397      PERFORM S1020-CLOSE-NEW-WAGE   THRU S1020-EXIT.              DESBD316
00398      PERFORM S1120-CLOSE-WG-CHNG    THRU S1120-EXIT.              DESBD316
00399      PERFORM S981C-CLOSE            THRU S981C-EXIT.              DESBD316
00400                                                                   DESBD316
00401  T0000-EXIT.                                                      DESBD316
00402      EXIT.                                                        DESBD316
00403                                                                   DESBD316
00404   S001-FROM-FED-8.                                                DESBD316
00405       SET L001-FROM-FED-8 TO TRUE.                                DESBD316
00406       GO TO S001-DATE.                                            DESBD316
00407                                                                   DESBD316
00408   S001-FROM-CAL-8.                                                DESBD316
00409       SET L001-FROM-CAL-8 TO TRUE.                                DESBD316
00410       GO TO S001-DATE.                                            DESBD316
00411                                                                   DESBD316
00412   S001-FROM-ABS-DAY.                                              DESBD316
00413       SET L001-FROM-ABS-DAY TO TRUE.                              DESBD316
00414       GO TO S001-DATE.                                            DESBD316
00415                                                                   DESBD316
00416   S001-DATE.                                                      DESBD316
00417       CALL 'DTSBU001' USING L001-LINK-AREA.                       DESBD316
00418   S001-EXIT.                                                      DESBD316
00419       EXIT.                                                       DESBD316
00420                                                                   DESBD316
00421  S004-FROM-DATE.                                                  DESBD316
00422      SET L004-FROM-DATE TO TRUE.                                  DESBD316
00423      GO TO S004-QTR.                                              DESBD316
00424                                                                   DESBD316
00425  S004-FROM-5.                                                     DESBD316
00426      SET L004-FROM-5 TO TRUE.                                     DESBD316
00427      GO TO S004-QTR.                                              DESBD316
00428                                                                   DESBD316
00429  S004-FROM-ABS.                                                   DESBD316
00430      SET L004-FROM-ABS TO TRUE.                                   DESBD316
00431      GO TO S004-QTR.                                              DESBD316
00432                                                                   DESBD316
00433  S004-FROM-3.                                                     DESBD316
00434      SET L004-FROM-3 TO TRUE.                                     DESBD316
00435      GO TO S004-QTR.                                              DESBD316
00436                                                                   DESBD316
00437  S004-QTR.                                                        DESBD316
00438      CALL 'DTSBU004' USING L004-LINK-AREA.                        DESBD316
00439  S004-EXIT.                                                       DESBD316
00440                                                                   DESBD316
00441  S005-FROM-SYS.                                                   DESBD316
00442      SET L005-FROM-SYS       TO TRUE.                             DESBD316
00443      GO TO S005-ABSTIME.                                          DESBD316
00444                                                                   DESBD316
00445  S005-ABSTIME.                                                    DESBD316
00446      CALL 'DTSBU005' USING L005-LINK-AREA.                        DESBD316
00447  S005-EXIT.                                                       DESBD316
00448      EXIT.                                                        DESBD316
00449                                                                   DESBD316
00450  S981A-OPEN-READ.                                                 DESBD316
00451      SET L981-OPEN-READ-88 TO TRUE.                               DESBD316
00452      PERFORM S981Z-WAGE-I  THRU S981Z-EXIT.                       DESBD316
00453                                                                   DESBD316
00454  S981A-EXIT.                                                      DESBD316
00455      EXIT.                                                        DESBD316
00456                                                                   DESBD316
00457  S981C-CLOSE.                                                     DESBD316
00458      SET L981-CLOSE-88 TO TRUE.                                   DESBD316
00459      PERFORM S981Z-WAGE-I  THRU S981Z-EXIT.                       DESBD316
00460                                                                   DESBD316
00461  S981C-EXIT.                                                      DESBD316
00462      EXIT.                                                        DESBD316
00463                                                                   DESBD316
00464  S981D-START-BROWSE.                                              DESBD316
00465      SET L981-START-BROWSE-88 TO TRUE.                            DESBD316
00466      PERFORM S981Z-WAGE-I  THRU S981Z-EXIT.                       DESBD316
00467      ADD +1                 TO WRK-OLD-WAGE-CNT.                  DESBD316
00468                                                                   DESBD316
00469  S981D-EXIT.                                                      DESBD316
00470      EXIT.                                                        DESBD316
00471                                                                   DESBD316
00472  S981E-READ-NEXT.                                                 DESBD316
00473      SET L981-READ-NEXT-88 TO TRUE.                               DESBD316
00474      PERFORM S981Z-WAGE-I  THRU S981Z-EXIT.                       DESBD316
00475      IF L981-OK-88                                                DESBD316
00476         ADD +1                 TO WRK-OLD-WAGE-CNT                DESBD316
00477      END-IF.                                                      DESBD316
00478                                                                   DESBD316
00479  S981E-EXIT.                                                      DESBD316
00480      EXIT.                                                        DESBD316
00481                                                                   DESBD316
00482  S981Z-WAGE-I.                                                    DESBD316
00483      CALL 'DTSBU981' USING L981-LINK-AREA                         DESBD316
00484                            OLD-WAGE-REC.                          DESBD316
00485  S981Z-EXIT.                                                      DESBD316
00486      EXIT.                                                        DESBD316
00487                                                                   DESBD316
00488  S1000-OPEN-NEW-WAGE.                                             DESBD316
00489      OPEN INPUT NEW-WAGE.                                         DESBD316
00490      IF NOT NEW-WAGE-OK-88                                        DESBD316
00491         DISPLAY 'CANNOT OPEN NEW WAGE ' NEW-WAGE-STATUS           DESBD316
00492         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00493      END-IF.                                                      DESBD316
00494                                                                   DESBD316
00495  S1000-EXIT.                                                      DESBD316
00496      EXIT.                                                        DESBD316
00497                                                                   DESBD316
00498  S1010-READ-NEW-WAGE.                                             DESBD316
00499      READ NEW-WAGE.                                               DESBD316
00500      IF NEW-WAGE-OK-88                                            DESBD316
00501         ADD +1                 TO WRK-NEW-WAGE-CNT                DESBD316
00502      END-IF.                                                      DESBD316
00503                                                                   DESBD316
00504  S1010-EXIT.                                                      DESBD316
00505      EXIT.                                                        DESBD316
00506                                                                   DESBD316
00507  S1020-CLOSE-NEW-WAGE.                                            DESBD316
00508      CLOSE NEW-WAGE.                                              DESBD316
00509      IF NOT NEW-WAGE-OK-88                                        DESBD316
00510         DISPLAY 'CANNOT OPEN NEW WAGE ' NEW-WAGE-STATUS           DESBD316
00511         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00512      END-IF.                                                      DESBD316
00513                                                                   DESBD316
00514  S1020-EXIT.                                                      DESBD316
00515      EXIT.                                                        DESBD316
00516                                                                   DESBD316
00517  S1100-OPEN-WG-CHNG.                                              DESBD316
00518      OPEN OUTPUT  WAGE-CHANGE.                                    DESBD316
00519      IF NOT WAGE-CHANGE-OK-88                                     DESBD316
00520         DISPLAY 'CANNOT OPEN WAGE CHANGE ' WAGE-CHANGE-STATUS     DESBD316
00521         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00522      END-IF.                                                      DESBD316
00523                                                                   DESBD316
00524  S1100-EXIT.                                                      DESBD316
00525      EXIT.                                                        DESBD316
00526                                                                   DESBD316
00527  S1110-WRITE-WG-CHNG.                                             DESBD316
00528      WRITE WAGE-CHANGE-REC FROM X143-REC.                         DESBD316
00529      IF NOT WAGE-CHANGE-OK-88                                     DESBD316
00530         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00531         DISPLAY 'CANNOT WRITE WAGE CHANGE '                       DESBD316
00532            WAGE-CHANGE-STATUS '  '                                DESBD316
00533            WWGH-EMP-NO OF NEW-WAGE-REC '  '                       DESBD316
00534            WWGH-YRQ    OF NEW-WAGE-REC '  '                       DESBD316
00535            WWGH-SSN    OF NEW-WAGE-REC                            DESBD316
00536      ELSE                                                         DESBD316
00537         ADD +1                 TO WRK-WG-CHNG-CNT                 DESBD316
00538      END-IF.                                                      DESBD316
00539                                                                   DESBD316
00540  S1110-EXIT.                                                      DESBD316
00541      EXIT.                                                        DESBD316
00542                                                                   DESBD316
00543  S1120-CLOSE-WG-CHNG.                                             DESBD316
00544      CLOSE WAGE-CHANGE.                                           DESBD316
00545                                                                   DESBD316
00546  S1120-EXIT.                                                      DESBD316
00547      EXIT.                                                        DESBD316
00548                                                                   DESBD316
00549  S1130-OPEN-EXT-SEQ-IN.                                           DESBD316
00550      OPEN INPUT   EXT-SEQUENCE.                                   DESBD316
00551      IF NOT EXT-SEQ-OK-88                                         DESBD316
00552         DISPLAY 'CANNOT OPEN EXT SEQUENCE IN ' EXT-SEQ-STATUS     DESBD316
00553         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00554      END-IF.                                                      DESBD316
00555                                                                   DESBD316
00556  S1130-EXIT.                                                      DESBD316
00557      EXIT.                                                        DESBD316
00558                                                                   DESBD316
00559  S1140-OPEN-EXT-SEQ-OUT.                                          DESBD316
00560      OPEN OUTPUT  EXT-SEQUENCE.                                   DESBD316
00561      IF NOT EXT-SEQ-OK-88                                         DESBD316
00562         DISPLAY 'CANNOT OPEN EXT SEQUENCE ' EXT-SEQ-STATUS        DESBD316
00563         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00564      END-IF.                                                      DESBD316
00565                                                                   DESBD316
00566  S1140-EXIT.                                                      DESBD316
00567      EXIT.                                                        DESBD316
00568                                                                   DESBD316
00569  S1150-READ-EXT-SEQ.                                              DESBD316
00570      READ EXT-SEQUENCE         INTO WRK-EXT-SEQ-REC.              DESBD316
00571      IF NOT EXT-SEQ-OK-88                                         DESBD316
00572         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00573         DISPLAY 'CANNOT READ EXT SEQUENCE '                       DESBD316
00574            EXT-SEQ-STATUS                                         DESBD316
00575      END-IF.                                                      DESBD316
00576                                                                   DESBD316
00577  S1150-EXIT.                                                      DESBD316
00578      EXIT.                                                        DESBD316
00579                                                                   DESBD316
00580  S1160-WRITE-EXT-SEQ.                                             DESBD316
00581      WRITE EXT-SEQ-REC FROM WRK-EXT-SEQ-REC.                      DESBD316
00582      IF NOT EXT-SEQ-OK-88                                         DESBD316
00583         SET WRK-ERROR-YES-88  TO TRUE                             DESBD316
00584         DISPLAY 'CANNOT WRITE EXT SEQUENCE '                      DESBD316
00585            EXT-SEQ-STATUS                                         DESBD316
00586      END-IF.                                                      DESBD316
00587                                                                   DESBD316
00588  S1160-EXIT.                                                      DESBD316
00589      EXIT.                                                        DESBD316
00590                                                                   DESBD316
00591  S1170-CLOSE-EXT-SEQ.                                             DESBD316
00592      CLOSE EXT-SEQUENCE.                                          DESBD316
00593                                                                   DESBD316
00594  S1170-EXIT.                                                      DESBD316
00595      EXIT.                                                        DESBD316
