00001  IDENTIFICATION DIVISION.                                         11/12/04
00002  PROGRAM-ID.             DTSBR330.                                DTSBR330
00003  AUTHOR.                 NORTHROP GRUMMAN                            LV001
00004  DATE-WRITTEN.           NOVEMBER 2004.                           DTSBR330
00005 *DATE-MODIFIED.                                                   DTSBR330
00006  DATE-COMPILED.                                                   DTSBR330
00007                                                                   DTSBR330
00008 *****                                                             DTSBR330
00009 *                                                                 DTSBR330
00010 *    CALLING SEQUENCE:  DTSUX330 CREATED THE DTSIR330 RECORDS.    DTSBR330
00011 *                       DTSBD800 CALLED DTSBR330 UASING THE       DTSBR330
00012 *                       ABOVE RECORDS TO PRODUCE THE REPORTED.    DTSBR330
00013 *                                                                 DTSBR330
00014 *    FUNCTION:  EMPLOYER ACCOUNTS DEBITS AND CREDITS REPORT.      DTSBR330
00015 *                                                                 DTSBR330
00016 *    MODIFICATION HISTORY:                                        DTSBR330
00017 *                                                                 DTSBR330
00018 * 08-05-04 INITIAL DEVELOPMENT.                                   DTSBR330
00019 *          REFERENCE RFP #****            AUTHOR OF CHANGE - RW1  DTSBR330
00020 *                                                                 DTSBR330
00021 * MM-DD-YY XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBR330
00022 *          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  DTSBR330
00023 *          REFERENCE RFP #****            AUTHOR OF CHANGE - XXX  DTSBR330
00024 *                                                                 DTSBR330
00025 *    DESCRIPTION:                                                 DTSBR330
00026 *                                                                 DTSBR330
00027 *        DTSBX330 READS THE R330 REPORT RECORDS CREATED DURING    DTSBR330
00028 *        DAILY PROCESSING. IT PRODUCES THE 330R1 AND 330R2        DTSBR330
00029 *        DEBITS AND CREDITS REPORTS.                              DTSBR330
00030 *                                                                 DTSBR330
00031 *                                                                 DTSBR330
00032 *    RECORDS READ:                                                DTSBR330
00033 *                                                                 DTSBR330
00034 *        NONE.                                                    DTSBR330
00035 *                                                                 DTSBR330
00036 *    PRINTED OUTPUTS:                                             DTSBR330
00037 *                                                                 DTSBR330
00038 *       RPT330R1 AND RPT330R2 DAILY CREDITS AND DEBITS REPORT     DTSBR330
00039 *                                                                 DTSBR330
00040 *    RECORDS WRITTEN:                                             DTSBR330
00041 *                                                                 DTSBR330
00042 *        NONE.                                                    DTSBR330
00043 *                                                                 DTSBR330
00044 *    MODULES CALLED:                                              DTSBR330
00045 *                                                                 DTSBR330
00046 *        DTSBU001 DATE EDIT/CONVERSION MODULE                     DTSBR330
00047 *        DTSBU005 DATE EDIT/CONVERSION MODULE                     DTSBR330
00048 *        DTSBU941 VARIABLE LENGTH RECORD READ                     DTSBR330
00049 *                                                                 DTSBR330
00050 *****                                                             DTSBR330
00051      EJECT                                                        DTSBR330
00052  ENVIRONMENT DIVISION.                                            DTSBR330
00053      SKIP2                                                        DTSBR330
00054  CONFIGURATION SECTION.                                           DTSBR330
00055  SPECIAL-NAMES. C01 IS TOP-OF-PAGE.                               DTSBR330
00056                                                                   DTSBR330
00057  INPUT-OUTPUT SECTION.                                            DTSBR330
00058                                                                   DTSBR330
00059  FILE-CONTROL.                                                    DTSBR330
00060      SELECT PRT-FILE1 ASSIGN TO RPT330R1.                         DTSBR330
00061      SELECT PRT-FILE2 ASSIGN TO RPT330R2.                         DTSBR330
00062  DATA DIVISION.                                                   DTSBR330
00063                                                                   DTSBR330
00064  FILE SECTION.                                                    DTSBR330
00065                                                                   DTSBR330
00066  FD  PRT-FILE1                                                    DTSBR330
00067      RECORDING MODE IS F                                          DTSBR330
00068      BLOCK CONTAINS 0 RECORDS                                     DTSBR330
00069      LABEL RECORDS ARE OMITTED.                                   DTSBR330
00070                                                                   DTSBR330
00071  01  PRT-RECORD1             PIC X(133).                          DTSBR330
00072                                                                   DTSBR330
00073  FD  PRT-FILE2                                                    DTSBR330
00074      RECORDING MODE IS F                                          DTSBR330
00075      BLOCK CONTAINS 0 RECORDS                                     DTSBR330
00076      LABEL RECORDS ARE OMITTED.                                   DTSBR330
00077                                                                   DTSBR330
00078  01  PRT-RECORD2             PIC X(133).                          DTSBR330
00079                                                                   DTSBR330
00080  WORKING-STORAGE SECTION.                                         DTSBR330
000805 77  PAN-VALET PICTURE X(24) VALUE '001DTSBR330  11/12/04'.       DTSBR330
00081  01  WRK-AREA.                                                    DTSBR330
00082      05  FILE-STATUS                PIC 9(02)  VALUE ZEROS.       DTSBR330
00083      05  WRK-MOD-NAME               PIC X(08)  VALUE 'DTSBR330'.  DTSBR330
00084      05  WRK-ABEND-CD               PIC S9(04) COMP  VALUE +330.  DTSBR330
00085      05  WRK-REPORT-DATE            PIC S9(09) COMP-3 VALUE +0.   DTSBR330
00086      05  FIRST-TIME-IND             PIC  X(01) VALUE 'Y'.         DTSBR330
00087                                                                   DTSBR330
00088      05  WS-LINE-CNT                PIC S9(02)  COMP-3 VALUE 60.  DTSBR330
00089      05  WS-LINE-CNT2               PIC S9(02)  COMP-3 VALUE +0.  DTSBR330
00090      05  WS-PAGE-CNT                PIC S9(03)  COMP-3 VALUE +0.  DTSBR330
00091                                                                   DTSBR330
00092      05  WS-LINE-CNT3               PIC S9(02)  COMP-3 VALUE 60.  DTSBR330
00093      05  WS-LINE-CNT4               PIC S9(02)  COMP-3 VALUE +0.  DTSBR330
00094      05  WS-PAGE-CNT2               PIC S9(03)  COMP-3 VALUE +0.  DTSBR330
00095                                                                   DTSBR330
00096      05  WS-SUM-FOOT-CNT1           PIC S9(07)  COMP-3 VALUE +0.  DTSBR330
00097      05  WS-SUM-FOOT-CNT2           PIC S9(07)  COMP-3 VALUE +0.  DTSBR330
00098      05  WS-SUM-DEBITS-AMT          PIC S9(11)V99 COMP-3 VALUE +0.DTSBR330
00099      05  WS-SUM-CREDIT-AMT          PIC S9(11)V99 COMP-3 VALUE +0.DTSBR330
00100                                                                   DTSBR330
00101  01  HDR1-1.                                                      DTSBR330
00102      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00103      05  HDR1-RPT-NO                 PIC  X(05)  VALUE '330R1'.   DTSBR330
00104      05  FILLER                      PIC  X(48)  VALUE SPACES.    DTSBR330
00105      05  FILLER                      PIC  X(20)  VALUE            DTSBR330
00106               'DISTRICT OF COLUMBIA'.                             DTSBR330
00107      05  FILLER                      PIC  X(44)  VALUE SPACES.    DTSBR330
00108      05  FILLER                      PIC  X(05)                   DTSBR330
00109             VALUE 'DATE:'.                                        DTSBR330
00110      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00111      05  WS-SYS-DATE                 PIC  X(08)  VALUE SPACE.     DTSBR330
00112                                                                   DTSBR330
00113  01  HDR1-2.                                                      DTSBR330
00114      05  FILLER                      PIC  X(58)  VALUE SPACES.    DTSBR330
00115      05  FILLER                      PIC  X(12)  VALUE            DTSBR330
00116               'TAX DIVISION'.                                     DTSBR330
00117      05  FILLER                      PIC  X(48)  VALUE SPACES.    DTSBR330
00118      05  FILLER                      PIC  X(05)                   DTSBR330
00119             VALUE 'TIME:'.                                        DTSBR330
00120      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00121      05  WS-SYS-TIME                 PIC  X(08)  VALUE SPACE.     DTSBR330
00122                                                                   DTSBR330
00123  01  HDR1-3.                                                      DTSBR330
00124      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00125      05  FILLER                      PIC  X(27)                   DTSBR330
00126             VALUE 'ROUTE TO: ACCOUNTING       '.                  DTSBR330
00127      05  FILLER                      PIC  X(21)  VALUE SPACES.    DTSBR330
00128      05  FILLER                      PIC  X(30)                   DTSBR330
00129             VALUE 'EMPLOYER ACCOUNTS DEBIT REPORT'.               DTSBR330
00130      05  FILLER                      PIC  X(39)  VALUE SPACES.    DTSBR330
00131      05  FILLER                      PIC  X(05)                   DTSBR330
00132             VALUE 'PAGE:'.                                        DTSBR330
00133      05  FILLER                      PIC  X(03)  VALUE SPACES.    DTSBR330
00134      05  PAGE-CNT                    PIC  ZZ,ZZ9.                 DTSBR330
00135                                                                   DTSBR330
00136  01  HDR1-4                          PIC  X(133) VALUE SPACES.    DTSBR330
00137                                                                   DTSBR330
00138  01  HDR1-5.                                                      DTSBR330
00139      05  FILLER                      PIC  X(01) VALUE SPACE.      DTSBR330
00140      05  FILLER                      PIC  X(02) VALUE SPACES.     DTSBR330
00141      05  FILLER                      PIC  X(06)                   DTSBR330
00142                 VALUE 'EMP NO'.                                   DTSBR330
00143      05  FILLER                      PIC  X(05) VALUE SPACES.     DTSBR330
00144      05  FILLER                      PIC  X(05)                   DTSBR330
00145                 VALUE 'BATCH'.                                    DTSBR330
00146      05  FILLER                      PIC  X(04) VALUE SPACES.     DTSBR330
00147      05  FILLER                      PIC  X(04)                   DTSBR330
00148                 VALUE 'ITEM'.                                     DTSBR330
00149      05  FILLER                      PIC  X(04) VALUE SPACES.     DTSBR330
00150      05  FILLER                      PIC  X(11)                   DTSBR330
00151                 VALUE 'TRANSACTION'.                              DTSBR330
00152      05  FILLER                      PIC  X(07) VALUE SPACES.     DTSBR330
00153      05  FILLER                      PIC  X(06)                   DTSBR330
00154                 VALUE 'AMOUNT'.                                   DTSBR330
00155      05  FILLER                      PIC  X(78) VALUE SPACES.     DTSBR330
00156                                                                   DTSBR330
00157  01  HDR1-6                          PIC  X(133) VALUE SPACES.    DTSBR330
00158                                                                   DTSBR330
00159  01  DETAIL-LINE.                                                 DTSBR330
00160      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00161      05  FILLER                      PIC  X(02)  VALUE SPACES.    DTSBR330
00162      05  WS-EMP-NO                   PIC  999B999 BLANK WHEN ZERO.DTSBR330
00163      05  FILLER                      PIC  X(04)  VALUE SPACE.     DTSBR330
00164      05  WS-BATCH-NO                 PIC  X(05).                  DTSBR330
00165      05  FILLER                      PIC  X(04)  VALUE SPACES.    DTSBR330
00166      05  WS-ITEM-NO                  PIC  X(03).                  DTSBR330
00167      05  FILLER                      PIC  X(09)  VALUE SPACES.    DTSBR330
00168      05  WS-TRANS-TYPE               PIC  X(02).                  DTSBR330
00169      05  FILLER                      PIC  X(05)  VALUE SPACES.    DTSBR330
00170      05  WS-DEBITS-AMT               PIC  $$,$$$,$$9.99-.         DTSBR330
00171      05  FILLER                      PIC  X(77)  VALUE SPACES.    DTSBR330
00172                                                                   DTSBR330
00173  01  CONTROL-SUM-FOOTING.                                         DTSBR330
00174                                                                   DTSBR330
00175      05  SUM-LINE-1                  PIC  X(133) VALUE SPACES.    DTSBR330
00176      05  SUM-LINE-2.                                              DTSBR330
00177          10  FILLER                  PIC  X(19)  VALUE SPACES.    DTSBR330
00178          10  WS-SUM-FOOT-NUMBER      PIC  ZZ,ZZ9.                 DTSBR330
00179          10  FILLER                  PIC  X(26)                   DTSBR330
00180                 VALUE '  TOTAL NUMBER OF ACCOUNTS'.               DTSBR330
00181          10  FILLER                  PIC  X(82)  VALUE SPACES.    DTSBR330
00182      05  SUM-LINE-3.                                              DTSBR330
00183          10  FILLER                  PIC  X(12)  VALUE SPACES.    DTSBR330
00184          10  WS-SUM-DEBITS-AMOUNT    PIC  $$,$$$,$$9.99-.         DTSBR330
00185          10  FILLER                  PIC  X(25)                   DTSBR330
00186                 VALUE ' TOTAL DEBITS ESTABLISHED'.                DTSBR330
00187          10  FILLER                  PIC  X(82)  VALUE SPACES.    DTSBR330
00188      05  SUM-ASTR-4.                                              DTSBR330
00189          10  FILLER                  PIC  X(25)  VALUE SPACES.    DTSBR330
00190          10  FILLER                  PIC  X(26)                   DTSBR330
00191                 VALUE '  *** END OF REPORT       '.               DTSBR330
00192          10  FILLER                  PIC  X(82) VALUE SPACES.     DTSBR330
00193                                                                   DTSBR330
00194  01  HDR2-1.                                                      DTSBR330
00195      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00196      05  HDR2-RPT-NO                 PIC  X(05)  VALUE '330R2'.   DTSBR330
00197      05  FILLER                      PIC  X(48)  VALUE SPACES.    DTSBR330
00198      05  FILLER                      PIC  X(20)  VALUE            DTSBR330
00199               'DISTRICT OF COLUMBIA'.                             DTSBR330
00200      05  FILLER                      PIC  X(44)  VALUE SPACES.    DTSBR330
00201      05  FILLER                      PIC  X(05)                   DTSBR330
00202             VALUE 'DATE:'.                                        DTSBR330
00203      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00204      05  WS-SYS-DATE2                PIC  X(08)  VALUE SPACE.     DTSBR330
00205                                                                   DTSBR330
00206  01  HDR2-2.                                                      DTSBR330
00207      05  FILLER                      PIC  X(58)  VALUE SPACES.    DTSBR330
00208      05  FILLER                      PIC  X(12)  VALUE            DTSBR330
00209               'TAX DIVISION'.                                     DTSBR330
00210      05  FILLER                      PIC  X(48)  VALUE SPACES.    DTSBR330
00211      05  FILLER                      PIC  X(05)                   DTSBR330
00212             VALUE 'TIME:'.                                        DTSBR330
00213      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00214      05  WS-SYS-TIME2                PIC  X(08)  VALUE SPACE.     DTSBR330
00215                                                                   DTSBR330
00216  01  HDR2-3.                                                      DTSBR330
00217      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00218      05  FILLER                      PIC  X(27)                   DTSBR330
00219             VALUE 'ROUTE TO:  TAX ACCOUNTING  '.                  DTSBR330
00220      05  FILLER                      PIC  X(20)  VALUE SPACES.    DTSBR330
00221      05  FILLER                      PIC  X(31)                   DTSBR330
00222             VALUE 'EMPLOYER ACCOUNTS CREDIT REPORT'.              DTSBR330
00223      05  FILLER                      PIC  X(39)  VALUE SPACES.    DTSBR330
00224      05  FILLER                      PIC  X(05)                   DTSBR330
00225             VALUE 'PAGE:'.                                        DTSBR330
00226      05  FILLER                      PIC  X(03)  VALUE SPACES.    DTSBR330
00227      05  PAGE-CNT2                   PIC  ZZ,ZZ9.                 DTSBR330
00228                                                                   DTSBR330
00229  01  HDR2-4                          PIC  X(133) VALUE SPACES.    DTSBR330
00230                                                                   DTSBR330
00231  01  HDR2-5.                                                      DTSBR330
00232      05  FILLER                      PIC  X(01) VALUE SPACE.      DTSBR330
00233      05  FILLER                      PIC  X(02) VALUE SPACES.     DTSBR330
00234      05  FILLER                      PIC  X(06)                   DTSBR330
00235                 VALUE 'EMP NO'.                                   DTSBR330
00236      05  FILLER                      PIC  X(05) VALUE SPACES.     DTSBR330
00237      05  FILLER                      PIC  X(05)                   DTSBR330
00238                 VALUE 'BATCH'.                                    DTSBR330
00239      05  FILLER                      PIC  X(04) VALUE SPACES.     DTSBR330
00240      05  FILLER                      PIC  X(04)                   DTSBR330
00241                 VALUE 'ITEM'.                                     DTSBR330
00242      05  FILLER                      PIC  X(04) VALUE SPACES.     DTSBR330
00243      05  FILLER                      PIC  X(11)                   DTSBR330
00244                 VALUE 'TRANSACTION'.                              DTSBR330
00245      05  FILLER                      PIC  X(07) VALUE SPACES.     DTSBR330
00246      05  FILLER                      PIC  X(06)                   DTSBR330
00247                 VALUE 'AMOUNT'.                                   DTSBR330
00248      05  FILLER                      PIC  X(78) VALUE SPACES.     DTSBR330
00249                                                                   DTSBR330
00250  01  HDR2-6                          PIC  X(133) VALUE SPACES.    DTSBR330
00251                                                                   DTSBR330
00252  01  DETAIL-LINE2.                                                DTSBR330
00253      05  FILLER                      PIC  X(01)  VALUE SPACE.     DTSBR330
00254      05  FILLER                      PIC  X(02)  VALUE SPACES.    DTSBR330
00255      05  WS-EMP-NO2                  PIC  999B999 BLANK WHEN ZERO.DTSBR330
00256      05  FILLER                      PIC  X(04)  VALUE SPACE.     DTSBR330
00257      05  WS-BATCH-NO2                PIC  X(05).                  DTSBR330
00258      05  FILLER                      PIC  X(04)  VALUE SPACES.    DTSBR330
00259      05  WS-ITEM-NO2                 PIC  X(03).                  DTSBR330
00260      05  FILLER                      PIC  X(09)  VALUE SPACES.    DTSBR330
00261      05  WS-TRANS-TYPE2              PIC  X(02).                  DTSBR330
00262      05  FILLER                      PIC  X(05)  VALUE SPACES.    DTSBR330
00263      05  WS-CREDITS-AMT              PIC  $$,$$$,$$9.99-.         DTSBR330
00264      05  FILLER                      PIC  X(77)  VALUE SPACES.    DTSBR330
00265                                                                   DTSBR330
00266  01  CONTROL-SUM-FOOTING2.                                        DTSBR330
00267                                                                   DTSBR330
00268      05  SUM-LINE-5                  PIC  X(133) VALUE SPACES.    DTSBR330
00269      05  SUM-LINE-6.                                              DTSBR330
00270          10  FILLER                  PIC  X(19)  VALUE SPACES.    DTSBR330
00271          10  WS-SUM-FOOT-NUMBER2     PIC  ZZ,ZZ9.                 DTSBR330
00272          10  FILLER                  PIC  X(26)                   DTSBR330
00273                 VALUE '  TOTAL NUMBER OF ACCOUNTS'.               DTSBR330
00274          10  FILLER                  PIC  X(82)  VALUE SPACES.    DTSBR330
00275      05  SUM-LINE-7.                                              DTSBR330
00276          10  FILLER                  PIC  X(12)  VALUE SPACES.    DTSBR330
00277          10  WS-SUM-CREDITS-AMOUNT   PIC  $$,$$$,$$9.99-.         DTSBR330
00278          10  FILLER                  PIC  X(26)                   DTSBR330
00279                 VALUE ' TOTAL CREDITS ESTABLISHED'.               DTSBR330
00280          10  FILLER                  PIC  X(81)  VALUE SPACES.    DTSBR330
00281      05  SUM-ASTR-8.                                              DTSBR330
00282          10  FILLER                  PIC  X(25)  VALUE SPACES.    DTSBR330
00283          10  FILLER                  PIC  X(26)                   DTSBR330
00284                 VALUE '  *** END OF REPORT       '.               DTSBR330
00285          10  FILLER                  PIC  X(82) VALUE SPACES.     DTSBR330
00286                                                                   DTSBR330
00287  01  L001-LINK-AREA.                                              DTSBR330
00288  ++INCLUDE DTSIL001                                               DTSBR330
00289                                                                   DTSBR330
00290  01  L005-LINK-AREA.                                              DTSBR330
00291  ++INCLUDE DTSIL005                                               DTSBR330
00292                                                                   DTSBR330
00293  LINKAGE SECTION.                                                 DTSBR330
00294                                                                   DTSBR330
00295  01  LRCM-LINK-AREA.                                              DTSBR330
00296  ++INCLUDE DTSILRCM                                               DTSBR330
00297                                                                   DTSBR330
00298  01  R330-REC.                                                    DTSBR330
00299  ++INCLUDE DTSIR330                                               DTSBR330
00300      EJECT                                                        DTSBR330
00301                                                                   DTSBR330
00302  PROCEDURE DIVISION USING LRCM-LINK-AREA                          DTSBR330
00303                           R330-REC.                               DTSBR330
00304                                                                   DTSBR330
00305      IF FIRST-TIME-IND = 'Y'                                      DTSBR330
00306          PERFORM I0000-INITIATE THRU I0000-EXIT                   DTSBR330
00307          MOVE 'N' TO FIRST-TIME-IND.                              DTSBR330
00308                                                                   DTSBR330
00309      IF LRCM-EOR-88                                               DTSBR330
00310          PERFORM T0000-TERMINATE THRU T0000-EXIT                  DTSBR330
00311      ELSE                                                         DTSBR330
00312          PERFORM P0000-PROCESS THRU P0000-EXIT.                   DTSBR330
00313                                                                   DTSBR330
00314      GOBACK.                                                      DTSBR330
00315                                                                   DTSBR330
00316  I0000-INITIATE.                                                  DTSBR330
00317                                                                   DTSBR330
00318      PERFORM I1000-OPEN-FILES THRU I1000-EXIT.                    DTSBR330
00319      SET L005-FROM-SYS      TO TRUE.                              DTSBR330
00320      PERFORM S005-DATE THRU S005-EXIT.                            DTSBR330
00321      MOVE L005-SLASH-DATE   TO WS-SYS-DATE WS-SYS-DATE2.          DTSBR330
00322      MOVE L005-DISPLAY-TIME TO WS-SYS-TIME WS-SYS-TIME2.          DTSBR330
00323                                                                   DTSBR330
00324  I0000-EXIT.                                                      DTSBR330
00325      EXIT.                                                        DTSBR330
00326                                                                   DTSBR330
00327  I1000-OPEN-FILES.                                                DTSBR330
00328                                                                   DTSBR330
00329      OPEN OUTPUT PRT-FILE1 PRT-FILE2.                             DTSBR330
00330      MOVE SPACES TO PRT-RECORD1 PRT-RECORD2.                      DTSBR330
00331                                                                   DTSBR330
00332  I1000-EXIT.                                                      DTSBR330
00333      EXIT.                                                        DTSBR330
00334                                                                   DTSBR330
00335  P0000-PROCESS.                                                   DTSBR330
00336                                                                   DTSBR330
00337      IF R330-DEBIT-88                                             DTSBR330
00338         PERFORM P2000-PRINT-HEADER THRU P2000-EXIT                DTSBR330
00339         MOVE R330-EMP-NO        TO WS-EMP-NO                      DTSBR330
00340         MOVE R330-BATCH-NO      TO WS-BATCH-NO                    DTSBR330
00341         MOVE R330-ITEM-NO       TO WS-ITEM-NO                     DTSBR330
00342         MOVE R330-TRAN-TYPE     TO WS-TRANS-TYPE                  DTSBR330
00343         MOVE R330-AMT           TO WS-DEBITS-AMT                  DTSBR330
00344         ADD  R330-AMT           TO WS-SUM-DEBITS-AMT              DTSBR330
00345                                                                   DTSBR330
00346         WRITE PRT-RECORD1 FROM DETAIL-LINE AFTER 2                DTSBR330
00347         ADD +2    TO WS-LINE-CNT2                                 DTSBR330
00348         ADD +1    TO WS-SUM-FOOT-CNT1                             DTSBR330
00349      ELSE                                                         DTSBR330
00350         IF R330-CREDIT-88                                         DTSBR330
00351            PERFORM P3000-PRINT-HEADER THRU P3000-EXIT             DTSBR330
00352            MOVE R330-EMP-NO        TO WS-EMP-NO2                  DTSBR330
00353            MOVE R330-BATCH-NO      TO WS-BATCH-NO2                DTSBR330
00354            MOVE R330-ITEM-NO       TO WS-ITEM-NO2                 DTSBR330
00355            MOVE R330-TRAN-TYPE     TO WS-TRANS-TYPE2              DTSBR330
00356            MOVE R330-AMT           TO WS-CREDITS-AMT              DTSBR330
00357            ADD  R330-AMT           TO WS-SUM-CREDIT-AMT           DTSBR330
00358                                                                   DTSBR330
00359            WRITE PRT-RECORD2 FROM DETAIL-LINE2 AFTER 2            DTSBR330
00360            ADD +2    TO WS-LINE-CNT4                              DTSBR330
00361            ADD +1    TO WS-SUM-FOOT-CNT2                          DTSBR330
00362         END-IF                                                    DTSBR330
00363      END-IF.                                                      DTSBR330
00364                                                                   DTSBR330
00365  P0000-EXIT.                                                      DTSBR330
00366      EXIT.                                                        DTSBR330
00367                                                                   DTSBR330
00368  P2000-PRINT-HEADER.                                              DTSBR330
00369      IF WS-LINE-CNT GREATER 56 OR                                 DTSBR330
00370           WS-LINE-CNT2 GREATER 56                                 DTSBR330
00371         MOVE +0          TO WS-LINE-CNT                           DTSBR330
00372         MOVE +0          TO WS-LINE-CNT2                          DTSBR330
00373         ADD  +1          TO WS-PAGE-CNT                           DTSBR330
00374         MOVE WS-PAGE-CNT TO PAGE-CNT                              DTSBR330
00375         WRITE PRT-RECORD1 FROM HDR1-1 AFTER TOP-OF-PAGE           DTSBR330
00376         WRITE PRT-RECORD1 FROM HDR1-2 AFTER 1                     DTSBR330
00377         WRITE PRT-RECORD1 FROM HDR1-3 AFTER 1                     DTSBR330
00378         WRITE PRT-RECORD1 FROM HDR1-4 AFTER 1                     DTSBR330
00379         WRITE PRT-RECORD1 FROM HDR1-5 AFTER 1                     DTSBR330
00380         WRITE PRT-RECORD1 FROM HDR1-6 AFTER 1                     DTSBR330
00381         ADD +6    TO WS-LINE-CNT2.                                DTSBR330
00382                                                                   DTSBR330
00383  P2000-EXIT.                                                      DTSBR330
00384      EXIT.                                                        DTSBR330
00385                                                                   DTSBR330
00386  P3000-PRINT-HEADER.                                              DTSBR330
00387      IF WS-LINE-CNT3 GREATER 56 OR                                DTSBR330
00388           WS-LINE-CNT4 GREATER 56                                 DTSBR330
00389         MOVE +0          TO WS-LINE-CNT3                          DTSBR330
00390         MOVE +0          TO WS-LINE-CNT4                          DTSBR330
00391         ADD  +1          TO WS-PAGE-CNT2                          DTSBR330
00392         MOVE WS-PAGE-CNT2 TO PAGE-CNT2                            DTSBR330
00393         WRITE PRT-RECORD2 FROM HDR2-1 AFTER TOP-OF-PAGE           DTSBR330
00394         WRITE PRT-RECORD2 FROM HDR2-2 AFTER 1                     DTSBR330
00395         WRITE PRT-RECORD2 FROM HDR2-3 AFTER 1                     DTSBR330
00396         WRITE PRT-RECORD2 FROM HDR2-4 AFTER 1                     DTSBR330
00397         WRITE PRT-RECORD2 FROM HDR2-5 AFTER 1                     DTSBR330
00398         WRITE PRT-RECORD2 FROM HDR2-6 AFTER 1                     DTSBR330
00399         ADD +6    TO WS-LINE-CNT4.                                DTSBR330
00400                                                                   DTSBR330
00401  P3000-EXIT.                                                      DTSBR330
00402      EXIT.                                                        DTSBR330
00403                                                                   DTSBR330
00404  S001-DATE.                                                       DTSBR330
00405      CALL 'DTSBU001' USING L001-LINK-AREA.                        DTSBR330
00406  S001-EXIT.                                                       DTSBR330
00407      EXIT.                                                        DTSBR330
00408                                                                   DTSBR330
00409  S005-DATE.                                                       DTSBR330
00410      CALL 'DTSBU005' USING L005-LINK-AREA.                        DTSBR330
00411  S005-EXIT.                                                       DTSBR330
00412      EXIT.                                                        DTSBR330
00413                                                                   DTSBR330
00414  S999-ABEND.                                                      DTSBR330
00415      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBR330
00416      SKIP2                                                        DTSBR330
00417  S999-EXIT.                                                       DTSBR330
00418      EXIT.                                                        DTSBR330
00419                                                                   DTSBR330
00420  T0000-TERMINATE.                                                 DTSBR330
00421                                                                   DTSBR330
00422      IF WS-LINE-CNT2 > 52 OR WS-LINE-CNT > 52                     DTSBR330
00423         PERFORM P2000-PRINT-HEADER THRU P2000-EXIT                DTSBR330
00424      END-IF.                                                      DTSBR330
00425                                                                   DTSBR330
00426      MOVE WS-SUM-DEBITS-AMT  TO WS-SUM-DEBITS-AMOUNT.             DTSBR330
00427      MOVE WS-SUM-FOOT-CNT1   TO WS-SUM-FOOT-NUMBER.               DTSBR330
00428      WRITE PRT-RECORD1 FROM SUM-LINE-1 AFTER 1.                   DTSBR330
00429      WRITE PRT-RECORD1 FROM SUM-LINE-2 AFTER 2.                   DTSBR330
00430      WRITE PRT-RECORD1 FROM SUM-LINE-3 AFTER 2.                   DTSBR330
00431      WRITE PRT-RECORD1 FROM SUM-ASTR-4 AFTER 2.                   DTSBR330
00432                                                                   DTSBR330
00433      IF WS-LINE-CNT4 > 52 OR WS-LINE-CNT3 > 52                    DTSBR330
00434         PERFORM P3000-PRINT-HEADER THRU P3000-EXIT                DTSBR330
00435      END-IF.                                                      DTSBR330
00436                                                                   DTSBR330
00437      MOVE WS-SUM-CREDIT-AMT  TO WS-SUM-CREDITS-AMOUNT.            DTSBR330
00438      MOVE WS-SUM-FOOT-CNT2   TO WS-SUM-FOOT-NUMBER2.              DTSBR330
00439      WRITE PRT-RECORD2 FROM SUM-LINE-5 AFTER 1.                   DTSBR330
00440      WRITE PRT-RECORD2 FROM SUM-LINE-6 AFTER 2.                   DTSBR330
00441      WRITE PRT-RECORD2 FROM SUM-LINE-7 AFTER 2.                   DTSBR330
00442      WRITE PRT-RECORD2 FROM SUM-ASTR-8 AFTER 2.                   DTSBR330
00443                                                                   DTSBR330
00444      CLOSE PRT-FILE1 PRT-FILE2.                                   DTSBR330
00445                                                                   DTSBR330
00446  T0000-EXIT.                                                      DTSBR330
00447      EXIT.                                                        DTSBR330
00448                                                                   DTSBR330
