00001  IDENTIFICATION DIVISION.                                         08/28/02
00002  PROGRAM-ID.             DESBD130.                                DESBD130
00003  AUTHOR.                 TRW.                                        LV003
00004  DATE-WRITTEN.           MAY 2001.                                DESBD130
00005  DATE-COMPILED.                                                   DESBD130
00006      SKIP3                                                        DESBD130
00007 *****                                                             DESBD130
00008 *                                                                 DESBD130
00009 *    FUNCTION:  ELECTRONIC MEDIA TRACKING                         DESBD130
00010 *               MAINTAIN HEADER RECORD:                           DESBD130
00011 *               RESET LOG NUMBER AT END OF YEAR.                  DESBD130
00012 *                                                                 DESBD130
00013 *                                                                 DESBD130
00014 *    MODIFICATION LOG:                                            DESBD130
00015 *                                                                 DESBD130
00016 *    03/15/2018  MODIFIED FROM DTSBR400.                          DESBD130
00017 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: GD    DESBD130
00018 *                                                                 DESBD130
00019 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DESBD130
00020 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DESBD130
00021 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DESBD130
00022 *                                                                 DESBD130
00023 *                                                                 DESBD130
00024 *  DESCRIPTION:                                                   DESBD130
00025 *                                                                 DESBD130
00026 *                                                                 DESBD130
00027 *      GET CURRENT RUN DATE FROM MHDR RECORD.                     DESBD130
00028 *                                                                 DESBD130
00029 *                                                                 DESBD130
00030 *      GET THE LAST USED LOG NUMBER FROM THE EHDR RECORD.         DESBD130
00031 *                                                                 DESBD130
00032 *      IF THE YEAR FROM THE CURRENT RUN DATE DOES NOT EQUAL       DESBD130
00033 *      THE YEAR FROM THE LAST USED LOG NUMBER, REPLACE THE        DESBD130
00034 *      LOG NUMBER YEAR WITH THE CURRENT YEAR AND RESET THE        DESBD130
00035 *      6 DIGIT LOG SEQUENCE NUMBER WITH THE STARTING LOG          DESBD130
00036 *      NUMBER.                                                    DESBD130
00037 *                                                                 DESBD130
00038 *                                                                 DESBD130
00039 *****                                                             DESBD130
00040      SKIP3                                                        DESBD130
00041  ENVIRONMENT DIVISION.                                            DESBD130
00042      SKIP2                                                        DESBD130
00043  DATA DIVISION.                                                   DESBD130
00044      SKIP3                                                        DESBD130
00045  WORKING-STORAGE SECTION.                                         DESBD130
000455 77  PAN-VALET PICTURE X(24) VALUE '003DESBD130  08/28/02'.       DESBD130
00046      SKIP3                                                        DESBD130
00047  01  WRK-AREA.                                                    DESBD130
00048      05  WRK-ABEND-CD                PIC S9(04)  COMP  VALUE +130.DESBD130
00049                                                                   DESBD130
00050      05  WRK-MOD-NAME                PIC  X(08)  VALUE 'DESBD130'.DESBD130
00051                                                                   DESBD130
00052      05  WRK-TRACE-IND               PIC  X(01)  VALUE 'Y'.       DESBD130
00053                                                                   DESBD130
00054      05  WRK-MHDR-RUN-DATE           PIC  9(08).                  DESBD130
00055      05  FILLER REDEFINES WRK-MHDR-RUN-DATE.                      DESBD130
00056          10  WRK-MHDR-YEAR           PIC 9(04).                   DESBD130
00057          10  FILLER                  PIC X(04).                   DESBD130
00058                                                                   DESBD130
00059      05  WRK-EHDR-LOG-NO             PIC  9(10).                  DESBD130
00060      05  FILLER REDEFINES WRK-EHDR-LOG-NO.                        DESBD130
00061          10  WRK-EHDR-LOG-YEAR       PIC  9(04).                  DESBD130
00062          10  WRK-EHDR-LOG-SEQ        PIC  9(06).                  DESBD130
00063                                                                   DESBD130
00064      05  WRK-START-LOG-SEQ           PIC  9(06)  VALUE 1000.      DESBD130
00065                                                                   DESBD130
00066      EJECT                                                        DESBD130
00067  01  L910-LINK-AREA.                                              DESBD130
00068  ++INCLUDE DTSIL910                                               DESBD130
00069      EJECT                                                        DESBD130
00070  01  MSKL-REC.                                                    DESBD130
00071  ++INCLUDE DTSIMSKL                                               DESBD130
00072      EJECT                                                        DESBD130
00073  01  MHDR-REC REDEFINES MSKL-REC.                                 DESBD130
00074  ++INCLUDE DTSIMHDR                                               DESBD130
00075      EJECT                                                        DESBD130
00076  01  L935-LINK-AREA.                                              DESBD130
00077  ++INCLUDE DTSIL935                                               DESBD130
00078      EJECT                                                        DESBD130
00079  01  ESKL-REC.                                                    DESBD130
00080  ++INCLUDE DTSIESKL                                               DESBD130
00081      EJECT                                                        DESBD130
00082  01  EHDR-REC.                                                    DESBD130
00083  ++INCLUDE DTSIEHDR                                               DESBD130
00084      EJECT                                                        DESBD130
00085  PROCEDURE DIVISION.                                              DESBD130
00086      SKIP2                                                        DESBD130
00087      PERFORM I0000-INITIATE    THRU I0000-EXIT.                   DESBD130
00088                                                                   DESBD130
00089      PERFORM P1000-READ-MHDR   THRU P1000-EXIT.                   DESBD130
00090                                                                   DESBD130
00091      PERFORM P2000-READ-EHDR   THRU P2000-EXIT.                   DESBD130
00092                                                                   DESBD130
00093      PERFORM P3000-UPDATE-EHDR THRU P3000-EXIT.                   DESBD130
00094                                                                   DESBD130
00095      PERFORM T0000-TERMINATE   THRU T0000-EXIT.                   DESBD130
00096      SKIP2                                                        DESBD130
00097      GOBACK.                                                      DESBD130
00098      EJECT                                                        DESBD130
00099  I0000-INITIATE.                                                  DESBD130
00100      MOVE WRK-TRACE-IND TO L910-TRACE-IND                         DESBD130
00101                            L935-TRACE-IND.                        DESBD130
00102                                                                   DESBD130
00103      MOVE WRK-MOD-NAME TO L910-MOD-NAME                           DESBD130
00104                           L935-MOD-NAME.                          DESBD130
00105                                                                   DESBD130
00106      PERFORM S910-OPEN-READ THRU S910-EXIT.                       DESBD130
00107                                                                   DESBD130
00108      PERFORM S935-OPEN-UPDATE-HDR THRU S935-EXIT.                 DESBD130
00109                                                                   DESBD130
00110      SKIP2                                                        DESBD130
00111  I0000-EXIT.                                                      DESBD130
00112      EXIT.                                                        DESBD130
00113      EJECT                                                        DESBD130
00114  P1000-READ-MHDR.                                                 DESBD130
00115      MOVE LOW-VALUES TO MHDR-KEY-AREA.                            DESBD130
00116                                                                   DESBD130
00117      MOVE +0 TO MHDR-EMP-NO.                                      DESBD130
00118                                                                   DESBD130
00119      SET MHDR-HDR-88 TO TRUE.                                     DESBD130
00120                                                                   DESBD130
00121      PERFORM S910-READ THRU S910-EXIT.                            DESBD130
00122                                                                   DESBD130
00123      IF L910-NO-REC-88                                            DESBD130
00124         PERFORM S999-ABEND THRU S999-EXIT.                        DESBD130
00125                                                                   DESBD130
00126      MOVE MHDR-CURR-RUN-DATE  TO WRK-MHDR-RUN-DATE.               DESBD130
00127                                                                   DESBD130
00128      DISPLAY 'MHDR YEAR ' WRK-MHDR-YEAR.                          DESBD130
00129                                                                   DESBD130
00130  P1000-EXIT.                                                      DESBD130
00131      EJECT                                                        DESBD130
00132  P2000-READ-EHDR.                                                 DESBD130
00133      MOVE LOW-VALUES TO EHDR-REC.                                 DESBD130
00134      SET EHDR-HDR-88                TO TRUE.                      DESBD130
00135      SET EHDR-ELF-ID-HDR-88         TO TRUE.                      DESBD130
00136      SET EHDR-ELF-DATA-TYPE-HDR-88  TO TRUE.                      DESBD130
00137                                                                   DESBD130
00138      MOVE EHDR-REC                  TO ESKL-REC.                  DESBD130
00139      PERFORM S935-READ THRU S935-EXIT.                            DESBD130
00140      IF L935-NO-REC-88                                            DESBD130
00141         PERFORM S999-ABEND THRU S999-EXIT.                        DESBD130
00142                                                                   DESBD130
00143      MOVE ESKL-REC                  TO EHDR-REC.                  DESBD130
00144      MOVE EHDR-LAST-USED-LOG-NO  TO WRK-EHDR-LOG-NO.              DESBD130
00145                                                                   DESBD130
00146      DISPLAY 'EHDR LOG  ' EHDR-LAST-USED-LOG-NO.                  DESBD130
00147      DISPLAY 'EHDR YEAR ' WRK-EHDR-LOG-YEAR.                      DESBD130
00148      DISPLAY SPACE.                                               DESBD130
00149                                                                   DESBD130
00150  P2000-EXIT.                                                      DESBD130
00151      EXIT.                                                        DESBD130
00152                                                                   DESBD130
00153  P3000-UPDATE-EHDR.                                               DESBD130
00154      IF WRK-EHDR-LOG-YEAR NOT = WRK-MHDR-YEAR                     DESBD130
00155         MOVE WRK-MHDR-YEAR    TO WRK-EHDR-LOG-YEAR                DESBD130
00156         MOVE EHDR-REC          TO ESKL-REC                        DESBD130
00157         PERFORM S935-REWRITE   THRU S935-EXIT                     DESBD130
00158         DISPLAY 'EHDR REWRITTEN ' EHDR-LAST-USED-LOG-NO.          DESBD130
00159                                                                   DESBD130
00160  P3000-EXIT.                                                      DESBD130
00161      EXIT.                                                        DESBD130
00162      EJECT                                                        DESBD130
00163  T0000-TERMINATE.                                                 DESBD130
00164      PERFORM S910-CLOSE  THRU S910-EXIT.                          DESBD130
00165                                                                   DESBD130
00166      PERFORM S935-CLOSE THRU S935-EXIT.                           DESBD130
00167                                                                   DESBD130
00168  T0000-EXIT.                                                      DESBD130
00169      EXIT.                                                        DESBD130
00170      EJECT                                                        DESBD130
00171  S910-OPEN-READ.                                                  DESBD130
00172      SET L910-OPEN-READ-88 TO TRUE.                               DESBD130
00173      GO TO S910-MSTR-IO.                                          DESBD130
00174                                                                   DESBD130
00175  S910-READ.                                                       DESBD130
00176      SET L910-READ-88 TO TRUE.                                    DESBD130
00177      GO TO S910-MSTR-IO.                                          DESBD130
00178                                                                   DESBD130
00179  S910-CLOSE.                                                      DESBD130
00180      SET L910-CLOSE-88     TO TRUE.                               DESBD130
00181      GO TO S910-MSTR-IO.                                          DESBD130
00182                                                                   DESBD130
00183  S910-MSTR-IO.                                                    DESBD130
00184      CALL 'DTSBU910' USING L910-LINK-AREA                         DESBD130
00185                            MSKL-REC.                              DESBD130
00186  S910-EXIT.                                                       DESBD130
00187      EXIT.                                                        DESBD130
00188      SKIP3                                                        DESBD130
00189      SKIP3                                                        DESBD130
00190  S935-OPEN-READ.                                                  DESBD130
00191      SET L935-OPEN-READ-88 TO TRUE.                               DESBD130
00192      GO TO S935-MSTR-IO.                                          DESBD130
00193                                                                   DESBD130
00194  S935-OPEN-UPDATE-HDR.                                            DESBD130
00195      SET L935-OPEN-UPDATE-HDR-88 TO TRUE.                         DESBD130
00196      GO TO S935-MSTR-IO.                                          DESBD130
00197                                                                   DESBD130
00198  S935-READ.                                                       DESBD130
00199      SET L935-READ-88 TO TRUE.                                    DESBD130
00200      GO TO S935-MSTR-IO.                                          DESBD130
00201                                                                   DESBD130
00202  S935-REWRITE.                                                    DESBD130
00203      SET L935-REWRITE-88 TO TRUE.                                 DESBD130
00204      GO TO S935-MSTR-IO.                                          DESBD130
00205                                                                   DESBD130
00206  S935-CLOSE.                                                      DESBD130
00207      SET L935-CLOSE-88     TO TRUE.                               DESBD130
00208      GO TO S935-MSTR-IO.                                          DESBD130
00209                                                                   DESBD130
00210  S935-MSTR-IO.                                                    DESBD130
00211      CALL 'DTSBU935' USING L935-LINK-AREA                         DESBD130
00212                            ESKL-REC.                              DESBD130
00213  S935-EXIT.                                                       DESBD130
00214      EXIT.                                                        DESBD130
00215      SKIP3                                                        DESBD130
00216  S999-ABEND.                                                      DESBD130
00217      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DESBD130
00218  S999-EXIT.                                                       DESBD130
00219      EXIT.                                                        DESBD130
