00001  IDENTIFICATION DIVISION.                                         09/29/98
00002  PROGRAM-ID.             DTSBU926.                                DTSBU926
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV002
00004  DATE-WRITTEN.           FEBRUARY 1992.                           DTSBU926
00005  DATE-COMPILED.                                                   DTSBU926
00006      SKIP3                                                        DTSBU926
00007 *****                                                             DTSBU926
00008 *                                                                 DTSBU926
00009 *    FUNCTION:  BATCH TRANSACTION COLLECTION FILE INPUT.          DTSBU926
00010 *                                                                 DTSBU926
00011 *                                                                 DTSBU926
00012 *    MODIFICATION LOG:                                            DTSBU926
00013 *                                                                 DTSBU926
00014 *    02/13/92  INITIAL DEVELOPMENT.                               DTSBU926
00015 *              WORK ORDER:                      PROGRAMMER: TCL   DTSBU926
00016 *                                                                 DTSBU926
00017 *    09/29/1998  REVIEWED AND MODIFIED FOR DC.                       CL**2
00018 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH      CL**2
00019 *                                                                    CL**2
00020 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**2
00021 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX      CL**2
00022 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX      CL**2
00023 *                                                                 DTSBU926
00024 *                                                                 DTSBU926
00025 *    DESCRIPTION:                                                 DTSBU926
00026 *                                                                 DTSBU926
00027 *        DTSBU926 PERFORMS ALL REQUIRED BATCH TRANSACTION            CL**2
00028 *                 COLLECTION FILE INPUT.                          DTSBU926
00029 *                                                                 DTSBU926
00030 *                                                                 DTSBU926
00031 *    GENERAL SPECIFICATIONS:                                      DTSBU926
00032 *                                                                 DTSBU926
00033 *        INVENTED TO ADD FLEXIBILITY TO THE VARIABLE LENGTH       DTSBU926
00034 *        RECORD (REPORT AND TRANSACTION) FILES.  IT IS NOT        DTSBU926
00035 *        CLEAR WHETHER QSAM OR A VSAM ESDS IS THE                 DTSBU926
00036 *        WAY TO GO.  BY PUTTING THE READ IN A MODULE, IT WILL     DTSBU926
00037 *        BE EASY TO SWITCH TECHNIQUES AT A FUTURE TIME.           DTSBU926
00038 *                                                                 DTSBU926
00039 *                                                                 DTSBU926
00040 *    COMMAND SPECIFIC SPECIFICATIONS:                             DTSBU926
00041 *                                                                 DTSBU926
00042 *    OPEN-READ                                                    DTSBU926
00043 *        OPEN INPUT.                                              DTSBU926
00044 *                                                                 DTSBU926
00045 *    CLOSE                                                        DTSBU926
00046 *                                                                 DTSBU926
00047 *    READ NEXT                                                    DTSBU926
00048 *                                                                 DTSBU926
00049 *        IF RSK1-REC-TYPE = '000' OR SPACES OR LOW-VALUES         DTSBU926
00050 *            BYPASS THE RECORD.                                   DTSBU926
00051 *                                                                 DTSBU926
00052 *        IF RVAR-LENGTH OF FILE-REC < RLEN-MIN-LENGTH             DTSBU926
00053 *                 OR                                              DTSBU926
00054 *           RVAR-LENGTH OF FILE-REC > RLEN-MAX-LENGTH             DTSBU926
00055 *            ABEND PROCESSING.                                    DTSBU926
00056 *                                                                 DTSBU926
00057 *        VAR-CHAR-CNT MUST BE SET BEFORE THE MOVE FROM            DTSBU926
00058 *        FILE-REC TO LINK-REC.                                    DTSBU926
00059 *                                                                 DTSBU926
00060 *          VAR-CHAR-CNT = RVAR-LENGTH OF FILE-REC - 2.            DTSBU926
00061 *                                                                 DTSBU926
00062 *****                                                             DTSBU926
00063      SKIP3                                                        DTSBU926
00064  ENVIRONMENT DIVISION.                                            DTSBU926
00065      SKIP2                                                        DTSBU926
00066  INPUT-OUTPUT SECTION.                                            DTSBU926
00067                                                                      CL**2
00068  FILE-CONTROL.                                                    DTSBU926
00069      SELECT BTC-FILE ASSIGN TO DTSFBTCI                              CL**2
00070          FILE STATUS IS FILE-STATUS.                              DTSBU926
00071      SKIP3                                                        DTSBU926
00072  DATA DIVISION.                                                   DTSBU926
00073      SKIP3                                                        DTSBU926
00074  FILE SECTION.                                                    DTSBU926
00075      SKIP3                                                        DTSBU926
00076  FD  BTC-FILE                                                     DTSBU926
00077      RECORDING MODE IS V                                          DTSBU926
00078      BLOCK CONTAINS 0 RECORDS.                                    DTSBU926
00079                                                                      CL**2
00080  01  FILE-REC.                                                    DTSBU926
00081  ++INCLUDE DTSIRVAR                                                  CL**2
00082      SKIP3                                                        DTSBU926
00083  01  RSK1-REC.                                                    DTSBU926
00084  ++INCLUDE DTSIRSK1                                                  CL**2
00085      EJECT                                                        DTSBU926
00086  WORKING-STORAGE SECTION.                                         DTSBU926
000865 77  PAN-VALET PICTURE X(24) VALUE '002DTSBU926  09/29/98'.       DTSBU926
00087      SKIP3                                                        DTSBU926
00088  01  WRK-AREA.                                                    DTSBU926
00089      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +926.DTSBU926
00090                                                                      CL**2
00091      05  VAR-CHAR-CNT                PIC S9(04)  COMP.            DTSBU926
00092                                                                      CL**2
00093      05  WRK-REC-CNT                 PIC S9(07)  COMP-3.          DTSBU926
00094                                                                      CL**2
00095      05  FILE-STATUS                 PIC  X(02).                  DTSBU926
00096          88  FILE-OK-88                  VALUE '00'.              DTSBU926
00097          88  FILE-NO-REC-88              VALUE '10'.              DTSBU926
00098 *****    88  FILE-VERIFY-88              VALUE '97'.              DTSBU926
00099      EJECT                                                        DTSBU926
00100  01  RLEN-LENGTH-LITERALS.                                        DTSBU926
00101  ++INCLUDE DTSIRLEN                                                  CL**2
00102      EJECT                                                        DTSBU926
00103  LINKAGE SECTION.                                                 DTSBU926
00104      SKIP3                                                        DTSBU926
00105  01  L926-LINK-AREA.                                              DTSBU926
00106  ++INCLUDE DTSIL926                                                  CL**2
00107      EJECT                                                        DTSBU926
00108  01  LINK-REC.                                                    DTSBU926
00109  ++INCLUDE DTSIRVAR                                                  CL**2
00110      EJECT                                                        DTSBU926
00111  PROCEDURE DIVISION USING L926-LINK-AREA                          DTSBU926
00112                           LINK-REC.                               DTSBU926
00113      SKIP2                                                        DTSBU926
00114      IF L926-TRACE-88                                             DTSBU926
00115          PERFORM S9100-PRE-DISPLAY THRU S9100-EXIT.               DTSBU926
00116                                                                      CL**2
00117      SET L926-OK-88 TO TRUE.                                      DTSBU926
00118                                                                      CL**2
00119      IF L926-READ-NEXT-88                                         DTSBU926
00120          PERFORM P2300-READ-NEXT THRU P2300-EXIT                  DTSBU926
00121      ELSE                                                         DTSBU926
00122      IF L926-OPEN-READ-88                                         DTSBU926
00123          PERFORM P1100-OPEN-READ THRU P1100-EXIT                  DTSBU926
00124      ELSE                                                         DTSBU926
00125      IF L926-CLOSE-88                                             DTSBU926
00126          PERFORM P1200-CLOSE THRU P1200-EXIT                      DTSBU926
00127      ELSE                                                         DTSBU926
00128          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU926
00129                                                                      CL**2
00130      IF L926-TRACE-88                                             DTSBU926
00131          PERFORM S9200-POST-DISPLAY THRU S9200-EXIT.              DTSBU926
00132      SKIP2                                                        DTSBU926
00133      GOBACK.                                                      DTSBU926
00134      EJECT                                                        DTSBU926
00135  P1100-OPEN-READ.                                                 DTSBU926
00136      OPEN INPUT BTC-FILE.                                         DTSBU926
00137                                                                      CL**2
00138      IF FILE-OK-88                                                DTSBU926
00139          NEXT SENTENCE                                            DTSBU926
00140      ELSE                                                         DTSBU926
00141          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU926
00142                                                                      CL**2
00143      MOVE +0 TO WRK-REC-CNT.                                      DTSBU926
00144  P1100-EXIT.                                                      DTSBU926
00145      EXIT.                                                        DTSBU926
00146      SKIP3                                                        DTSBU926
00147  P1200-CLOSE.                                                     DTSBU926
00148      CLOSE BTC-FILE.                                              DTSBU926
00149                                                                      CL**2
00150      IF NOT FILE-OK-88                                            DTSBU926
00151          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU926
00152                                                                      CL**2
00153      DISPLAY '*** '                                               DTSBU926
00154              WRK-REC-CNT                                          DTSBU926
00155              ' DTSFVRII NON DUMMY RECORDS READ'.                     CL**2
00156  P1200-EXIT.                                                      DTSBU926
00157      EXIT.                                                        DTSBU926
00158      EJECT                                                        DTSBU926
00159  P2300-READ-NEXT.                                                 DTSBU926
00160      READ BTC-FILE.                                               DTSBU926
00161                                                                      CL**2
00162      IF FILE-NO-REC-88                                            DTSBU926
00163          SET L926-NO-REC-88 TO TRUE                               DTSBU926
00164          GO TO P2300-EXIT.                                        DTSBU926
00165                                                                      CL**2
00166      IF NOT FILE-OK-88                                            DTSBU926
00167          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU926
00168                                                                      CL**2
00169      IF (RSK1-LENGTH < RLEN-MIN-LENGTH)                           DTSBU926
00170              OR                                                   DTSBU926
00171         (RSK1-LENGTH > RLEN-MAX-LENGTH)                           DTSBU926
00172          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU926
00173                                                                      CL**2
00174      IF RSK1-REC-TYPE = '000' OR SPACES OR LOW-VALUES             DTSBU926
00175          GO TO P2300-READ-NEXT.                                   DTSBU926
00176                                                                      CL**2
00177      ADD +1 TO WRK-REC-CNT.                                       DTSBU926
00178                                                                      CL**2
00179      COMPUTE VAR-CHAR-CNT = RVAR-LENGTH OF FILE-REC - 2.          DTSBU926
00180                                                                      CL**2
00181      MOVE FILE-REC TO LINK-REC.                                   DTSBU926
00182  P2300-EXIT.                                                      DTSBU926
00183      EXIT.                                                        DTSBU926
00184      EJECT                                                        DTSBU926
00185  S9100-PRE-DISPLAY.                                               DTSBU926
00186      DISPLAY ' '.                                                 DTSBU926
00187                                                                      CL**2
00188      DISPLAY ' '.                                                 DTSBU926
00189                                                                      CL**2
00190      DISPLAY '*** DTSBU926 PRE  TRACE DISPLAY ***'.                  CL**2
00191                                                                      CL**2
00192      DISPLAY L926-MOD-NAME                                        DTSBU926
00193              ' = L926-MOD-NAME'.                                  DTSBU926
00194                                                                      CL**2
00195      DISPLAY L926-CMND-CD                                         DTSBU926
00196              ' = L926-CMND-CD'.                                   DTSBU926
00197  S9100-EXIT.                                                      DTSBU926
00198      EXIT.                                                        DTSBU926
00199      SKIP3                                                        DTSBU926
00200  S9200-POST-DISPLAY.                                              DTSBU926
00201      DISPLAY ' '.                                                 DTSBU926
00202                                                                      CL**2
00203      DISPLAY '*** DTSBU926 POST TRACE DISPLAY ***'.                  CL**2
00204                                                                      CL**2
00205      DISPLAY L926-RESULT-IND                                      DTSBU926
00206              ' = L926-RESULT-IND'.                                DTSBU926
00207                                                                      CL**2
00208      DISPLAY RVAR-LENGTH OF LINK-REC                              DTSBU926
00209              ' = RVAR-LENGTH OF LINK-REC'.                        DTSBU926
00210                                                                      CL**2
00211      DISPLAY RVAR-CHAR OF LINK-REC (1)                            DTSBU926
00212              RVAR-CHAR OF LINK-REC (2)                            DTSBU926
00213              RVAR-CHAR OF LINK-REC (3)                            DTSBU926
00214              ' = REC-TYPE OF LINK-REC'.                           DTSBU926
00215  S9200-EXIT.                                                      DTSBU926
00216      EXIT.                                                        DTSBU926
00217      EJECT                                                        DTSBU926
00218  S999-ABEND.                                                      DTSBU926
00219      DISPLAY '*** I/O MODULE ABENDING'.                           DTSBU926
00220                                                                      CL**2
00221      DISPLAY '*** CMND-CD = ' L926-CMND-CD.                       DTSBU926
00222                                                                      CL**2
00223      DISPLAY '*** FILE-STATUS = ' FILE-STATUS.                    DTSBU926
00224                                                                      CL**2
00225      CALL 'DTSBU999' USING WRK-ABEND-CD.                             CL**2
00226  S999-EXIT.                                                       DTSBU926
00227      EXIT.                                                        DTSBU926
