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