00001  IDENTIFICATION DIVISION.                                         01/06/99
00002  PROGRAM-ID.             DTSBU111.                                DTSBU111
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV008
00004  DATE-WRITTEN.           JULY 1994.                                  CL**2
00005                          UPDATED BY TRW/BDM SEPT 1998.               CL**5
00006  DATE-COMPILED.                                                   DTSBU111
00007      SKIP3                                                        DTSBU111
00008 *****                                                             DTSBU111
00009 *                                                                 DTSBU111
00010 *    FUNCTION:  ADDRESS LOOKUP.                                   DTSBU111
00011 *                                                                 DTSBU111
00012 *                                                                 DTSBU111
00013 *    MODIFICATION LOG:                                            DTSBU111
00014 *                                                                 DTSBU111
00015 *    07/14/94  CLONED FROM MACCU111.                                 CL**2
00016 *              WORK ORDER:                      PROGRAMMER: RHC   DTSBU111
00017 *                                                                 DTSBU111
00018 *    10/20/1998  BDM/TRW FAILED TO COMPILE THE MODULE.  INDEED,      CL**6
00019 *                MODULE WAS LEFT IN AN UNCOMPILABLE STAE.            CL**6
00020 *                MODULE REVIEWED AND MODIFIED FOR DC.                CL**6
00021 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH      CL**6
00022 *                                                                 DTSBU111
00023 *                                                                 DTSBU111
00024 *    DESCRIPTION:                                                 DTSBU111
00025 *                                                                 DTSBU111
00026 *    DTSBU111 LOOKS UP AN EMPLOYER ADDRESS.                          CL**2
00027 *                                                                 DTSBU111
00028 *    IF L111-LOOKUP-TAD-88                                           CL**8
00029 *        READ THE MTAD RECORD INDICATED BY L111-EMP-NO, L111-ID-NODTSBU111
00030 *        RETURN L111-ADDRESS FROM MTAD-ADDRESS.                      CL**3
00031 *                                                                 DTSBU111
00032 *    IF L111-LOOKUP-TAA-88                                        DTSBU111
00033 *        READ THE MTAA RECORD INDICATED BY L111-EMP-NO, L111-ID-NODTSBU111
00034 *        RETURN L111-ADDRESS-NAME FROM MTNM-NAME                  DTSBU111
00035 *        RETURN L111-ADDRESS FROM MTAA-ADDRESS.                   DTSBU111
00036 *                                                                 DTSBU111
00037 *    IF L111-LOOKUP-OPO-88                                        DTSBU111
00038 *        READ THE MOPO RECORD INDICATED BY L111-EMP-NO, L111-ID-NODTSBU111
00039 *        RETURN L111-ADDRESS-NAME FROM MOPO-NAME                  DTSBU111
00040 *        RETURN L111-ADDRESS FROM MOPO-ADDRESS.                   DTSBU111
00041 *                                                                 DTSBU111
00042 *    IF L111-LOOKUP-BAA-88                                        DTSBU111
00043 *        READ THE MBAA RECORD INDICATED BY L111-EMP-NO, L111-ID-NODTSBU111
00044 *        RETURN L111-ADDRESS-NAME FROM MBAA-NAME                  DTSBU111
00045 *        RETURN L111-ADDRESS FROM MBAA-ADDRESS.                   DTSBU111
00046 *                                                                 DTSBU111
00047 *                                                                 DTSBU111
00048 *    IF A MASTER FILE RECORD IS NOT FOUND, THEN RETURN            DTSBU111
00049 *    L111-ADDR-NOT-FOUND-88.  (EXCEPT FOR L111-LOOKUP-TAD-88 MOPO)DTSBU111
00050 *                                                                 DTSBU111
00051 *****                                                             DTSBU111
00052      SKIP3                                                        DTSBU111
00053  ENVIRONMENT DIVISION.                                            DTSBU111
00054      SKIP3                                                        DTSBU111
00055  DATA DIVISION.                                                   DTSBU111
00056      SKIP3                                                        DTSBU111
00057  WORKING-STORAGE SECTION.                                         DTSBU111
000575 77  PAN-VALET PICTURE X(24) VALUE '008DTSBU111  01/06/99'.       DTSBU111
00058      SKIP3                                                        DTSBU111
00059  01  WRK-AREA.                                                    DTSBU111
00060      05  WRK-ABEND-CODE              PIC S9(04)  COMP             DTSBU111
00061                                                  VALUE +111.      DTSBU111
00062      EJECT                                                        DTSBU111
00063  01  L910-LINK-AREA.                                              DTSBU111
00064      05  L910-CONTROL-AREA.                                       DTSBU111
00065  ++INCLUDE DTSIL910                                                  CL**2
00066      SKIP3                                                        DTSBU111
00067  01  MSKL-LINK-AREA.                                              DTSBU111
00068      05  MSKL-REC.                                                DTSBU111
00069  ++INCLUDE DTSIMSKL                                                  CL**2
00070      SKIP3                                                        DTSBU111
00071  01  MTAD-REC.                                                    DTSBU111
00072  ++INCLUDE DTSIMTAD                                                  CL**2
00073      EJECT                                                        DTSBU111
00074  01  MTAA-REC.                                                    DTSBU111
00075  ++INCLUDE DTSIMTAA                                                  CL**2
00076      EJECT                                                        DTSBU111
00077  01  MOPO-REC.                                                    DTSBU111
00078  ++INCLUDE DTSIMOPO                                                  CL**2
00079      EJECT                                                        DTSBU111
00080  01  MBAA-REC.                                                    DTSBU111
00081  ++INCLUDE DTSIMBAA                                                  CL**2
00082      EJECT                                                        DTSBU111
00083  LINKAGE SECTION.                                                 DTSBU111
00084      SKIP3                                                        DTSBU111
00085  01  L111-LINK-AREA.                                              DTSBU111
00086  ++INCLUDE DTSIL111                                                  CL**2
00087      EJECT                                                        DTSBU111
00088  PROCEDURE DIVISION                                               DTSBU111
00089      USING L111-LINK-AREA.                                        DTSBU111
00090      SKIP2                                                        DTSBU111
00091      SET L111-ADDR-NOT-FOUND-88 TO TRUE.                          DTSBU111
00092      MOVE SPACE TO L111-RETURN-AREA                                  CL**6
00093                    L111-MSG-AREA.                                    CL**6
00094                                                                      CL**6
00095      EVALUATE TRUE                                                DTSBU111
00096          WHEN L111-LOOKUP-TAD-88                                  DTSBU111
00097              PERFORM P1000-TAD THRU P1000-EXIT                    DTSBU111
00098          WHEN L111-LOOKUP-TAA-88                                  DTSBU111
00099              PERFORM P2000-TAA THRU P2000-EXIT                    DTSBU111
00100          WHEN L111-LOOKUP-OPO-88                                  DTSBU111
00101              PERFORM P3000-OPO THRU P3000-EXIT                    DTSBU111
00102          WHEN L111-LOOKUP-BAA-88                                  DTSBU111
00103              PERFORM P4000-BAA THRU P4000-EXIT                    DTSBU111
00104          WHEN OTHER                                               DTSBU111
00105              PERFORM S999-ABEND THRU S999-EXIT.                   DTSBU111
00106                                                                      CL**6
00107                                                                      CL**6
00108      GOBACK.                                                      DTSBU111
00109      EJECT                                                        DTSBU111
00110  P1000-TAD.                                                       DTSBU111
00111      MOVE LOW-VALUES TO MTAD-KEY-AREA.                               CL**6
00112                                                                      CL**6
00113      MOVE L111-EMP-NO TO MTAD-EMP-NO.                                CL**6
00114                                                                      CL**6
00115      SET MTAD-TAD-88 TO TRUE.                                        CL**6
00116                                                                      CL**6
00117      MOVE L111-ID-NO TO MTAD-ID-NO.                                  CL**6
00118                                                                      CL**6
00119      MOVE MTAD-KEY-AREA TO MSKL-KEY-AREA.                            CL**6
00120                                                                      CL**6
00121      PERFORM S910-READ THRU S910-EXIT.                            DTSBU111
00122                                                                      CL**6
00123      IF L910-OK-88                                                DTSBU111
00124          MOVE MSKL-REC TO MTAD-REC                                   CL**6
00125          SET L111-ADDR-FOUND-88 TO TRUE                              CL**6
00126          MOVE MTAD-ADDRESS TO L111-ADDRESS.                          CL**6
00127  P1000-EXIT.                                                      DTSBU111
00128      EXIT.                                                        DTSBU111
00129      EJECT                                                        DTSBU111
00130  P2000-TAA.                                                       DTSBU111
00131      MOVE LOW-VALUES TO MTAA-KEY-AREA.                               CL**6
00132                                                                      CL**6
00133      MOVE L111-EMP-NO TO MTAA-EMP-NO.                                CL**6
00134                                                                      CL**6
00135      SET MTAA-TAA-88 TO TRUE.                                        CL**6
00136                                                                      CL**6
00137      MOVE L111-ID-NO TO MTAA-ID-NO.                                  CL**6
00138                                                                      CL**6
00139      MOVE MTAA-KEY-AREA TO MSKL-KEY-AREA.                            CL**6
00140                                                                      CL**6
00141      PERFORM S910-READ THRU S910-EXIT.                               CL**6
00142                                                                      CL**6
00143      IF L910-OK-88                                                   CL**6
00144          MOVE MSKL-REC TO MTAA-REC                                   CL**6
00145          IF MTAA-ADDRESS = SPACES OR LOW-VALUES                      CL**6
00146              NEXT SENTENCE                                           CL**6
00147          ELSE                                                        CL**6
00148              SET L111-ADDR-FOUND-88 TO TRUE                          CL**6
00149              MOVE MTAA-NAME TO L111-NAME                             CL**6
00150              MOVE MTAA-ADDRESS TO L111-ADDRESS.                      CL**6
00151  P2000-EXIT.                                                      DTSBU111
00152      EXIT.                                                        DTSBU111
00153      EJECT                                                        DTSBU111
00154  P3000-OPO.                                                       DTSBU111
00155      MOVE LOW-VALUES TO MOPO-KEY-AREA.                               CL**6
00156                                                                      CL**6
00157      MOVE L111-EMP-NO TO MOPO-EMP-NO.                                CL**6
00158                                                                      CL**6
00159      SET MOPO-OPO-88 TO TRUE.                                        CL**6
00160                                                                      CL**6
00161      MOVE L111-ID-NO TO MOPO-ID-NO.                                  CL**6
00162                                                                      CL**6
00163      MOVE MOPO-KEY-AREA TO MSKL-KEY-AREA.                            CL**6
00164                                                                      CL**6
00165      PERFORM S910-READ THRU S910-EXIT.                            DTSBU111
00166                                                                      CL**6
00167      IF L910-OK-88                                                DTSBU111
00168          MOVE MSKL-REC TO MOPO-REC                                   CL**6
00169          IF MOPO-ADDRESS = LOW-VALUES OR SPACES                   DTSBU111
00170              NEXT SENTENCE                                        DTSBU111
00171          ELSE                                                     DTSBU111
00172              SET L111-ADDR-FOUND-88 TO TRUE                       DTSBU111
00173              MOVE MOPO-NAME TO L111-NAME                             CL**6
00174              MOVE MOPO-TITLE TO L111-TITLE                           CL**6
00175              MOVE MOPO-ADDRESS TO L111-ADDRESS.                      CL**6
00176  P3000-EXIT.                                                      DTSBU111
00177      EXIT.                                                        DTSBU111
00178      SKIP3                                                        DTSBU111
00179  P4000-BAA.                                                       DTSBU111
00180      MOVE LOW-VALUES TO MBAA-KEY-AREA.                               CL**6
00181                                                                      CL**6
00182      MOVE L111-EMP-NO TO MBAA-EMP-NO.                                CL**6
00183                                                                      CL**6
00184      SET MBAA-BAA-88 TO TRUE.                                        CL**6
00185                                                                      CL**6
00186      MOVE L111-ID-NO TO MBAA-ID-NO.                                  CL**6
00187                                                                      CL**6
00188      MOVE MBAA-KEY-AREA TO MSKL-KEY-AREA.                            CL**6
00189                                                                      CL**6
00190      PERFORM S910-READ THRU S910-EXIT.                            DTSBU111
00191                                                                      CL**6
00192      IF L910-OK-88                                                DTSBU111
00193          MOVE MSKL-REC TO MBAA-REC                                   CL**6
00194          IF MBAA-ADDRESS = SPACES OR LOW-VALUES                   DTSBU111
00195              NEXT SENTENCE                                        DTSBU111
00196          ELSE                                                     DTSBU111
00197              SET L111-ADDR-FOUND-88 TO TRUE                          CL**6
00198              MOVE MBAA-NAME TO L111-NAME                             CL**6
00199              MOVE MBAA-ADDRESS TO L111-ADDRESS.                      CL**6
00200  P4000-EXIT.                                                      DTSBU111
00201      EXIT.                                                        DTSBU111
00202      EJECT                                                        DTSBU111
00203  S910-READ.                                                       DTSBU111
00204      SET L910-READ-88 TO TRUE.                                    DTSBU111
00205      GO TO S910-MSTR-IO.                                          DTSBU111
00206                                                                      CL**6
00207  S910-MSTR-IO.                                                    DTSBU111
00208      CALL 'DTSBU910'                                                 CL**2
00209          USING L910-LINK-AREA                                     DTSBU111
00210                MSKL-LINK-AREA.                                    DTSBU111
00211  S910-EXIT.                                                       DTSBU111
00212      EXIT.                                                        DTSBU111
00213      SKIP3                                                        DTSBU111
00214  S999-ABEND.                                                      DTSBU111
00215      CALL 'DTSBU999'                                                 CL**2
00216          USING WRK-ABEND-CODE.                                    DTSBU111
00217  S999-EXIT.                                                       DTSBU111
00218      EXIT.                                                        DTSBU111
