00001  IDENTIFICATION DIVISION.                                         06/18/13
00002  PROGRAM-ID.             DTSBU963.                                DTSBU963
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV003
00004  DATE-WRITTEN.           OCTOBER 1994.                            DTSBU963
00005  DATE-COMPILED.                                                   DTSBU963
00006      SKIP3                                                        DTSBU963
00007 *****                                                             DTSBU963
00008 *                                                                 DTSBU963
00009 *    FUNCTION:  SEQUENTIAL MASTER FILE INPUT.                     DTSBU963
00010 *                                                                 DTSBU963
00011 *    >>>  SPECIAL VERSION OF BU961. THE NAME OF THE  <<<             CL**3
00012 *    >>>  INPUT FILE HAS BEEN CHANGED TO DTSFMSTO    <<<             CL**3
00013 *                                                                 DTSBU963
00014 *    MODIFICATION LOG:                                            DTSBU963
00015 *                                                                 DTSBU963
00016 *    12/03/98  INITIAL DEVELOPMENT.  COPIED FROM MACBU961         DTSBU963
00017 *              WORK ORDER:                      PROGRAMMER: ZL1   DTSBU963
00018 *                                                                 DTSBU963
00019 *    XX/XX/XX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU963
00020 *              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU963
00021 *              REFERENCE RFP: #XXX              PROGRAMMER: XXX   DTSBU963
00022 *                                                                 DTSBU963
00023 *                                                                 DTSBU963
00024 *    DESCRIPTION:                                                 DTSBU963
00025 *                                                                 DTSBU963
00026 *        DTSBU961 PERFORMS ALL REQUIRED SEQUENTIAL (TAPE)         DTSBU963
00027 *                 MASTER FILE INPUT.                              DTSBU963
00028 *                                                                 DTSBU963
00029 *                 THE "SEQUENTIAL" MASTER FILE WILL USUSALLY      DTSBU963
00030 *                 BE THE ARCHIVED MASTER FILE.                    DTSBU963
00031 *                                                                 DTSBU963
00032 *                 RECORDS RESIDING ON THE SEQUENTIAL MASTER       DTSBU963
00033 *                 FILE ARE NOT STORED IN A COMPRESSED FORMAT.     DTSBU963
00034 *                 WITH COMPRESSION BUILT INTO THE TAPE SUBSYSTEM, DTSBU963
00035 *                 COMPRESSION IN THE APPLICATION WOULD BE A       DTSBU963
00036 *                 WASTE OF CPU CYCLES.                            DTSBU963
00037 *                                                                 DTSBU963
00038 *                                                                 DTSBU963
00039 *    COMMAND SPECIFIC SPECIFICATIONS:                             DTSBU963
00040 *                                                                 DTSBU963
00041 *    OPEN READ                                                    DTSBU963
00042 *        OPEN INPUT.                                              DTSBU963
00043 *                                                                 DTSBU963
00044 *    CLOSE                                                        DTSBU963
00045 *                                                                 DTSBU963
00046 *    READ NEXT                                                    DTSBU963
00047 *                                                                 DTSBU963
00048 *                                                                 DTSBU963
00049 *****                                                             DTSBU963
00050      SKIP3                                                        DTSBU963
00051  ENVIRONMENT DIVISION.                                            DTSBU963
00052      SKIP2                                                        DTSBU963
00053  INPUT-OUTPUT SECTION.                                            DTSBU963
00054                                                                   DTSBU963
00055  FILE-CONTROL.                                                    DTSBU963
00056      SELECT MST-FILE ASSIGN TO DTSFMSTO                              CL**2
00057          FILE STATUS IS FILE-STATUS.                              DTSBU963
00058      SKIP3                                                        DTSBU963
00059  DATA DIVISION.                                                   DTSBU963
00060      SKIP3                                                        DTSBU963
00061  FILE SECTION.                                                    DTSBU963
00062      SKIP3                                                        DTSBU963
00063  FD  MST-FILE                                                     DTSBU963
00064      RECORDING MODE IS V                                          DTSBU963
00065      BLOCK CONTAINS 0 CHARACTERS                                  DTSBU963
00066      RECORD IS VARYING DEPENDING ON MST-REC-LEN.                  DTSBU963
00067                                                                   DTSBU963
00068  01  FILE-REC.                                                    DTSBU963
00069  ++INCLUDE DTSIMSKL                                               DTSBU963
00070                                                                   DTSBU963
00071  01  FILE-MIN-LENGTH-REC         PIC  X(21).                      DTSBU963
00072                                                                   DTSBU963
00073  01  FILE-MAX-LENGTH-REC         PIC  X(4092).                    DTSBU963
00074      EJECT                                                        DTSBU963
00075  WORKING-STORAGE SECTION.                                         DTSBU963
000755 77  PAN-VALET PICTURE X(24) VALUE '003DTSBU963  06/18/13'.       DTSBU963
00076  77  PAN-VALET PICTURE X(24) VALUE '004DTSBU961  11/22/04'.       DTSBU963
00077      SKIP3                                                        DTSBU963
00078  01  WRK-AREA.                                                    DTSBU963
00079      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +963.   CL**3
00080                                                                   DTSBU963
00081      05  MST-REC-LEN                 PIC  9(04)  COMP.            DTSBU963
00082                                                                   DTSBU963
00083      05  WRK-REC-CNT                 PIC S9(07)  COMP-3.          DTSBU963
00084                                                                   DTSBU963
00085      05  FILE-STATUS                 PIC  X(02).                  DTSBU963
00086          88  FILE-OK-88                  VALUE '00'.              DTSBU963
00087          88  FILE-NO-REC-88              VALUE '10'.              DTSBU963
00088                                                                   DTSBU963
00089      05  WRK-REC-PREFIX              PIC  X(04).                  DTSBU963
00090      EJECT                                                        DTSBU963
00091  01  L991-LINK-AREA.                                              DTSBU963
00092  ++INCLUDE DTSIL991                                               DTSBU963
00093      EJECT                                                        DTSBU963
00094  01  MLEN-LENGTH-LITERALS.                                        DTSBU963
00095  ++INCLUDE DTSIMLEN                                               DTSBU963
00096      EJECT                                                        DTSBU963
00097  LINKAGE SECTION.                                                 DTSBU963
00098      SKIP3                                                        DTSBU963
00099  01  L961-LINK-AREA.                                              DTSBU963
00100  ++INCLUDE DTSIL961                                               DTSBU963
00101      EJECT                                                        DTSBU963
00102  01  LINK-REC.                                                    DTSBU963
00103  ++INCLUDE DTSIMSKL                                               DTSBU963
00104      EJECT                                                        DTSBU963
00105  PROCEDURE DIVISION USING L961-LINK-AREA                          DTSBU963
00106                           LINK-REC.                               DTSBU963
00107                                                                   DTSBU963
00108                                                                   DTSBU963
00109      IF L961-TRACE-88                                             DTSBU963
00110          PERFORM S9100-PRE-DISPLAY THRU S9100-EXIT.               DTSBU963
00111                                                                   DTSBU963
00112      SET L961-OK-88 TO TRUE.                                      DTSBU963
00113                                                                   DTSBU963
00114      IF L961-READ-NEXT-88                                         DTSBU963
00115          PERFORM P2300-READ-NEXT THRU P2300-EXIT                  DTSBU963
00116      ELSE                                                         DTSBU963
00117      IF L961-OPEN-READ-88                                         DTSBU963
00118          PERFORM P1100-OPEN-READ THRU P1100-EXIT                  DTSBU963
00119      ELSE                                                         DTSBU963
00120      IF L961-CLOSE-88                                             DTSBU963
00121          PERFORM P1200-CLOSE THRU P1200-EXIT                      DTSBU963
00122      ELSE                                                         DTSBU963
00123          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU963
00124                                                                   DTSBU963
00125      IF L961-TRACE-88                                             DTSBU963
00126          PERFORM S9200-POST-DISPLAY THRU S9200-EXIT.              DTSBU963
00127                                                                   DTSBU963
00128                                                                   DTSBU963
00129      GOBACK.                                                      DTSBU963
00130      EJECT                                                        DTSBU963
00131  P1100-OPEN-READ.                                                 DTSBU963
00132      OPEN INPUT MST-FILE.                                         DTSBU963
00133                                                                   DTSBU963
00134      IF FILE-OK-88                                                DTSBU963
00135          NEXT SENTENCE                                            DTSBU963
00136      ELSE                                                         DTSBU963
00137          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU963
00138                                                                   DTSBU963
00139      MOVE +0 TO WRK-REC-CNT.                                      DTSBU963
00140  P1100-EXIT.                                                      DTSBU963
00141      EXIT.                                                        DTSBU963
00142      SKIP3                                                        DTSBU963
00143  P1200-CLOSE.                                                     DTSBU963
00144      CLOSE MST-FILE.                                              DTSBU963
00145                                                                   DTSBU963
00146      IF NOT FILE-OK-88                                            DTSBU963
00147          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU963
00148                                                                   DTSBU963
00149      DISPLAY '*** '                                               DTSBU963
00150              WRK-REC-CNT                                          DTSBU963
00151              ' DTSFMSTI RECORDS READ'.                            DTSBU963
00152  P1200-EXIT.                                                      DTSBU963
00153      EXIT.                                                        DTSBU963
00154      EJECT                                                        DTSBU963
00155  P2300-READ-NEXT.                                                 DTSBU963
00156      READ MST-FILE.                                               DTSBU963
00157                                                                   DTSBU963
00158      IF FILE-NO-REC-88                                            DTSBU963
00159          SET L961-NO-REC-88 TO TRUE                               DTSBU963
00160          GO TO P2300-EXIT.                                        DTSBU963
00161                                                                   DTSBU963
00162      IF NOT FILE-OK-88                                            DTSBU963
00163          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU963
00164                                                                   DTSBU963
00165      IF (MST-REC-LEN < MLEN-MSKL-NONDATA-LEN)                     DTSBU963
00166             OR                                                    DTSBU963
00167         (MST-REC-LEN                                              DTSBU963
00168            > MLEN-MAX-MSKL-DATA-LEN + MLEN-MSKL-NONDATA-LEN)      DTSBU963
00169          PERFORM S999-ABEND THRU S999-EXIT.                       DTSBU963
00170                                                                   DTSBU963
00171      ADD +1 TO WRK-REC-CNT.                                       DTSBU963
00172                                                                   DTSBU963
00173      MOVE FILE-REC (1:MST-REC-LEN)                                DTSBU963
00174        TO LINK-REC (1:MST-REC-LEN).                               DTSBU963
00175  P2300-EXIT.                                                      DTSBU963
00176      EXIT.                                                        DTSBU963
00177      EJECT                                                        DTSBU963
00178  S9100-PRE-DISPLAY.                                               DTSBU963
00179      DISPLAY ' '.                                                 DTSBU963
00180      DISPLAY ' '.                                                 DTSBU963
00181      DISPLAY '*** DTSBU961 PRE  TRACE DISPLAY ***'.               DTSBU963
00182      DISPLAY L961-MOD-NAME                                        DTSBU963
00183              ' = L961-MOD-NAME'.                                  DTSBU963
00184      DISPLAY L961-CMND-CD                                         DTSBU963
00185              ' = L961-CMND-CD'.                                   DTSBU963
00186  S9100-EXIT.                                                      DTSBU963
00187      EXIT.                                                        DTSBU963
00188      SKIP3                                                        DTSBU963
00189  S9200-POST-DISPLAY.                                              DTSBU963
00190      DISPLAY ' '.                                                 DTSBU963
00191      DISPLAY '*** DTSBU961 POST TRACE DISPLAY ***'.               DTSBU963
00192      DISPLAY L961-RESULT-IND                                      DTSBU963
00193              ' = L961-RESULT-IND'.                                DTSBU963
00194                                                                   DTSBU963
00195      PERFORM S9300-REC-DISPLAY THRU S9300-EXIT.                   DTSBU963
00196  S9200-EXIT.                                                      DTSBU963
00197      EXIT.                                                        DTSBU963
00198      SKIP3                                                        DTSBU963
00199  S9300-REC-DISPLAY.                                               DTSBU963
00200      DISPLAY ' '.                                                 DTSBU963
00201                                                                   DTSBU963
00202      IF (MSKL-REC-TYPE OF LINK-REC < +1)                          DTSBU963
00203              OR                                                   DTSBU963
00204         (MSKL-REC-TYPE OF LINK-REC > MLEN-MAX-REC-TYPE)           DTSBU963
00205          MOVE SPACES TO WRK-REC-PREFIX                            DTSBU963
00206      ELSE                                                         DTSBU963
00207          MOVE MLEN-PREFIX (MSKL-REC-TYPE OF LINK-REC)             DTSBU963
00208            TO WRK-REC-PREFIX.                                     DTSBU963
00209                                                                   DTSBU963
00210      IF WRK-REC-PREFIX = SPACES                                   DTSBU963
00211          MOVE '????' TO WRK-REC-PREFIX.                           DTSBU963
00212                                                                   DTSBU963
00213      MOVE MLEN-MAX-KEY-LEN TO L991-REQ-CHAR-CNT.                  DTSBU963
00214                                                                   DTSBU963
00215      MOVE MSKL-KEY-AREA OF LINK-REC TO L991-REQ-AREA.             DTSBU963
00216                                                                   DTSBU963
00217      PERFORM S991-HEX-FORMAT THRU S991-EXIT.                      DTSBU963
00218                                                                   DTSBU963
00219      DISPLAY 'REC TYPE = '                                        DTSBU963
00220              WRK-REC-PREFIX.                                      DTSBU963
00221      DISPLAY 'KEY AREA = '                                        DTSBU963
00222              L991-REPLY-HEX-1-AREA.                               DTSBU963
00223      DISPLAY '           '                                        DTSBU963
00224              L991-REPLY-HEX-2-AREA.                               DTSBU963
00225      DISPLAY '           '                                        DTSBU963
00226              L991-REPLY-AN-AREA.                                  DTSBU963
00227  S9300-EXIT.                                                      DTSBU963
00228      EXIT.                                                        DTSBU963
00229      EJECT                                                        DTSBU963
00230  S991-HEX-FORMAT.                                                 DTSBU963
00231      CALL 'DTSBU991' USING L991-LINK-AREA.                        DTSBU963
00232  S991-EXIT.                                                       DTSBU963
00233      EXIT.                                                        DTSBU963
00234      SKIP3                                                        DTSBU963
00235  S999-ABEND.                                                      DTSBU963
00236      DISPLAY '*** MASTER FILE SEQUENTIAL INPUT MODULE ABENDING'.  DTSBU963
00237      DISPLAY '*** CMND-CD = ' L961-CMND-CD.                       DTSBU963
00238      DISPLAY '*** FILE-STATUS = ' FILE-STATUS.                    DTSBU963
00239      DISPLAY '*** CALLING MODULE = ' L961-MOD-NAME.               DTSBU963
00240                                                                   DTSBU963
00241      PERFORM S9300-REC-DISPLAY THRU S9300-EXIT.                   DTSBU963
00242                                                                   DTSBU963
00243      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBU963
00244  S999-EXIT.                                                       DTSBU963
00245      EXIT.                                                        DTSBU963
