00001  IDENTIFICATION DIVISION.                                         01/19/99
00002  PROGRAM-ID.             DTSBU064.                                DTSBU064
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV005
00004  DATE-WRITTEN.           OCTOBER 1994.                            DTSBU064
00005  DATE-COMPILED.                                                   DTSBU064
00006      SKIP3                                                        DTSBU064
00007 *****                                                             DTSBU064
00008 *                                                                 DTSBU064
00009 *    FUNCTION:  LOOKUP ADDRESS USED TO DETERMINE FIELD REP ID.    DTSBU064
00010 *                                                                 DTSBU064
00011 *                                                                 DTSBU064
00012 *    MODIFICATION LOG:                                            DTSBU064
00013 *                                                                 DTSBU064
00014 *    11/04/98  INITIAL DEVELOPMENT.                                  CL**2
00015 *              WORK ORDER:                      PROGRAMMER: ZL1      CL**2
00016 *                                                                 DTSBU064
00017 *    XX/XX/XX  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU064
00018 *              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU064
00019 *              WORK ORDER:                      PROGRAMMER: XXX   DTSBU064
00020 *                                                                 DTSBU064
00021 *                                                                 DTSBU064
00022 *    DESCRIPTION:                                                 DTSBU064
00023 *                                                                 DTSBU064
00024 *    DTSBU064 LOOKS UP AND RETURNS THE TAX ADDRESS FROM WHICH        CL**2
00025 *    THE FIELD REP ID IS DETERMINED.                              DTSBU064
00026 *                                                                 DTSBU064
00027 *****                                                             DTSBU064
00028      SKIP3                                                        DTSBU064
00029  ENVIRONMENT DIVISION.                                            DTSBU064
00030      SKIP3                                                        DTSBU064
00031  DATA DIVISION.                                                   DTSBU064
00032      SKIP3                                                        DTSBU064
00033  WORKING-STORAGE SECTION.                                         DTSBU064
000335 77  PAN-VALET PICTURE X(24) VALUE '005DTSBU064  01/19/99'.       DTSBU064
00034      SKIP3                                                        DTSBU064
00035  01  WRK-AREA.                                                    DTSBU064
00036      05  WRK-ABEND-CODE              PIC S9(04)  COMP             DTSBU064
00037                                                  VALUE +064.      DTSBU064
00038      05  WRK-RESP-CODE               PIC S9(08)  COMP.            DTSBU064
00039      EJECT                                                        DTSBU064
00040  01  L910-LINK-AREA.                                              DTSBU064
00041      05  L910-CONTROL-AREA.                                       DTSBU064
00042  ++INCLUDE DTSIL910                                                  CL**2
00043      SKIP3                                                        DTSBU064
00044  01  MSKL-LINK-AREA.                                              DTSBU064
00045      05  MSKL-REC.                                                DTSBU064
00046  ++INCLUDE DTSIMSKL                                                  CL**2
00047      SKIP3                                                        DTSBU064
00048  01  MTAD-REC.                                                    DTSBU064
00049  ++INCLUDE DTSIMTAD                                                  CL**2
00050      EJECT                                                        DTSBU064
00051  LINKAGE SECTION.                                                 DTSBU064
00052      SKIP3                                                        DTSBU064
00053  01  L064-LINK-AREA.                                              DTSBU064
00054  ++INCLUDE DTSIL064                                                  CL**2
00055      EJECT                                                        DTSBU064
00056  PROCEDURE DIVISION USING L064-LINK-AREA.                         DTSBU064
00057      SKIP2                                                        DTSBU064
00058      SET L064-ADDR-NOT-FOUND-88 TO TRUE.                          DTSBU064
00059                                                                   DTSBU064
00060      MOVE +0 TO L064-ADDR-ID-NO.                                  DTSBU064
00061      MOVE ALL '?' TO L064-ADDRESS                                 DTSBU064
00062                      L064-VOICE.                                  DTSBU064
00063                                                                   DTSBU064
00064      PERFORM P0000-PROCESS THRU P0000-EXIT.                       DTSBU064
00065      SKIP2                                                        DTSBU064
00066      GOBACK.                                                      DTSBU064
00067      EJECT                                                        DTSBU064
00068  P0000-PROCESS.                                                   DTSBU064
00069      MOVE LOW-VALUES TO MTAD-KEY-AREA.                            DTSBU064
00070      MOVE L064-EMP-NO TO MTAD-EMP-NO.                             DTSBU064
00071      SET MTAD-TAD-88 TO TRUE.                                     DTSBU064
00072                                                                   DTSBU064
00073 *BO  IF L064-FLD-ADDR-DEFAULT-88                                     CL**4
00074 *        MOVE +2 TO MTAD-ID-NO                                       CL**4
00075 *    ELSE                                                            CL**4
00076 *BO      MOVE L064-FLD-ADDR-IND-9 TO MTAD-ID-NO.                     CL**4
00077      IF L064-TAX-REC-ADDR-YES-88                                     CL**4
00078          MOVE +2 TO MTAD-ID-NO                                       CL**4
00079      ELSE                                                            CL**4
00080          MOVE +1 TO MTAD-ID-NO.                                      CL**4
00081                                                                   DTSBU064
00082      MOVE MTAD-KEY-AREA TO MSKL-KEY-AREA.                         DTSBU064
00083                                                                   DTSBU064
00084      PERFORM S910-READ THRU S910-EXIT.                            DTSBU064
00085                                                                   DTSBU064
00086      IF L910-OK-88                                                DTSBU064
00087          MOVE MSKL-REC TO MTAD-REC                                DTSBU064
00088          SET L064-OK-88 TO TRUE                                   DTSBU064
00089          MOVE MTAD-ID-NO TO L064-ADDR-ID-NO                       DTSBU064
00090          MOVE MTAD-ADDRESS TO L064-ADDRESS                        DTSBU064
00091          MOVE MTAD-VOICE-1 TO L064-VOICE                             CL**3
00092 *BO      MOVE MTAD-VOICE TO L064-VOICE                               CL**3
00093          GO TO P0000-EXIT.                                        DTSBU064
00094                                                                   DTSBU064
00095 *BO  IF L064-FLD-ADDR-DEFAULT-88                                     CL**5
00096      IF L064-TAX-REC-ADDR-YES-88                                     CL**5
00097          NEXT SENTENCE                                            DTSBU064
00098      ELSE                                                         DTSBU064
00099          GO TO P0000-EXIT.                                        DTSBU064
00100                                                                   DTSBU064
00101      MOVE +1 TO MTAD-ID-NO.                                       DTSBU064
00102                                                                   DTSBU064
00103      MOVE MTAD-KEY-AREA TO MSKL-KEY-AREA.                         DTSBU064
00104                                                                   DTSBU064
00105      PERFORM S910-READ THRU S910-EXIT.                            DTSBU064
00106                                                                   DTSBU064
00107      IF L910-OK-88                                                DTSBU064
00108          MOVE MSKL-REC TO MTAD-REC                                DTSBU064
00109          SET L064-OK-88 TO TRUE                                   DTSBU064
00110          MOVE MTAD-ID-NO TO L064-ADDR-ID-NO                       DTSBU064
00111          MOVE MTAD-ADDRESS TO L064-ADDRESS                        DTSBU064
00112 *BO      MOVE MTAD-VOICE TO L064-VOICE                               CL**5
00113          MOVE MTAD-VOICE-1 TO L064-VOICE                             CL**5
00114          GO TO P0000-EXIT.                                        DTSBU064
00115  P0000-EXIT.                                                      DTSBU064
00116      EXIT.                                                        DTSBU064
00117  S910-READ.                                                       DTSBU064
00118      SET L910-READ-88 TO TRUE.                                    DTSBU064
00119      GO TO S910-MSTR-IO.                                          DTSBU064
00120      SKIP1                                                        DTSBU064
00121  S910-MSTR-IO.                                                    DTSBU064
00122      SKIP1                                                        DTSBU064
00123      CALL 'DTSBU910'                                                 CL**2
00124          USING L910-LINK-AREA                                     DTSBU064
00125                MSKL-LINK-AREA.                                    DTSBU064
00126      SKIP1                                                        DTSBU064
00127  S910-EXIT.                                                       DTSBU064
00128      EXIT.                                                        DTSBU064
00129      SKIP3                                                        DTSBU064
00130  S999-ABEND.                                                      DTSBU064
00131      SKIP1                                                        DTSBU064
00132      CALL 'DTSBU999'                                                 CL**2
00133          USING WRK-ABEND-CODE.                                    DTSBU064
00134      SKIP1                                                        DTSBU064
00135  S999-EXIT.                                                       DTSBU064
00136      EXIT.                                                        DTSBU064
