00001  IDENTIFICATION DIVISION.                                         11/02/00
00002  PROGRAM-ID.             DTSBD570.                                DTSBD570
00003  AUTHOR.                 TRICOASTAL CONSULTING LTD.                  LV004
00004  DATE-WRITTEN.           DECEMBER 1997.                           DTSBD570
00005  DATE-COMPILED.                                                   DTSBD570
00006      SKIP3                                                        DTSBD570
00007 *****                                                             DTSBD570
00008 *                                                                 DTSBD570
00009 *    FUNCTION:  EDIT/CONVERT ADDRESSES USING FINALIST.            DTSBD570
00010 *                                                                 DTSBD570
00011 *                                                                 DTSBD570
00012 *    MODIFICATION LOG:                                            DTSBD570
00013 *                                                                 DTSBD570
00014 *    12/27/97  INITIAL DEVELOPMENT.                               DTSBD570
00015 *              WORK ORDER: TCL 214              PROGRAMMER: EHH   DTSBD570
00016 *                                                                 DTSBD570
00017 *    02/13/1999  REVIEWED AND MODIFIED FOR DC.                    DTSBD570
00018 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: EHH   DTSBD570
00019 *                                                                 DTSBD570
00020 *    09/20/2000  RECOMPILED FOR NEW VERSION(R720) OF FINALIST.    DTSBD570
00021 *                REFERENCE: DC DEVELOPMENT      PROGRAMMER: ZL1   DTSBD570
00022 *                                                                 DTSBD570
00023 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBD570
00024 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBD570
00025 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DTSBD570
00026 *                                                                 DTSBD570
00027 *                                                                 DTSBD570
00028 *  DESCRIPTION:                                                   DTSBD570
00029 *                                                                 DTSBD570
00030 *                                                                 DTSBD570
00031 *      REPORT RECORDS OUTPUT:                                     DTSBD570
00032 *                                                                 DTSBD570
00033 *        746  BATCH ADDRESS UPDATE ADDRESS ERROR REPORT.          DTSBD570
00034 *        747  BATCH ADDRESS UPDATE ADDRESS MODIFICATION REPORT.   DTSBD570
00035 *                                                                 DTSBD570
00036 *                                                                 DTSBD570
00037 *      TAPES INPUT:                                               DTSBD570
00038 *                                                                 DTSBD570
00039 *        NONE.                                                    DTSBD570
00040 *                                                                 DTSBD570
00041 *                                                                 DTSBD570
00042 *      MASTER FILE RECORDS READ:                                  DTSBD570
00043 *                                                                 DTSBD570
00044 *        NONE.                                                    DTSBD570
00045 *                                                                 DTSBD570
00046 *                                                                 DTSBD570
00047 *      MASTER FILE RECORDS UPDATED:                               DTSBD570
00048 *                                                                 DTSBD570
00049 *        NONE.                                                    DTSBD570
00050 *                                                                 DTSBD570
00051 *                                                                 DTSBD570
00052 *      RECORDS WRITTEN:                                           DTSBD570
00053 *                                                                 DTSBD570
00054 *        XLPC  INTERFACE TO FINALIST MODULE.                      DTSBD570
00055 *                                                                 DTSBD570
00056 *                                                                 DTSBD570
00057 *      MODULES CALLED:                                            DTSBD570
00058 *                                                                 DTSBD570
00059 *        FINAL     FINALIST INTERFACE.                            DTSBD570
00060 *                                                                 DTSBD570
00061 *                                                                 DTSBD570
00062 *****                                                             DTSBD570
00063      SKIP3                                                        DTSBD570
00064  ENVIRONMENT DIVISION.                                            DTSBD570
00065      SKIP3                                                        DTSBD570
00066  INPUT-OUTPUT SECTION.                                            DTSBD570
00067      SKIP2                                                        DTSBD570
00068  FILE-CONTROL.                                                    DTSBD570
00069      SELECT LPC-IN-FILE  ASSIGN TO DTSLPCI.                       DTSBD570
00070      SELECT LPC-OUT-FILE ASSIGN TO DTSLPCO.                       DTSBD570
00071  DATA DIVISION.                                                   DTSBD570
00072      SKIP3                                                        DTSBD570
00073  FILE SECTION.                                                    DTSBD570
00074      SKIP3                                                        DTSBD570
00075  FD  LPC-IN-FILE                                                  DTSBD570
00076      LABEL RECORDS ARE STANDARD                                   DTSBD570
00077      RECORDING MODE IS F                                          DTSBD570
00078      BLOCK CONTAINS 0 RECORDS.                                    DTSBD570
00079      SKIP2                                                        DTSBD570
00080  01  LPC-IN-REC                    PIC  X(450).                   DTSBD570
00081      SKIP3                                                        DTSBD570
00082  FD  LPC-OUT-FILE                                                 DTSBD570
00083      LABEL RECORDS ARE STANDARD                                   DTSBD570
00084      RECORDING MODE IS F                                          DTSBD570
00085      BLOCK CONTAINS 0 RECORDS.                                    DTSBD570
00086      SKIP2                                                        DTSBD570
00087  01  LPC-OUT-REC                   PIC  X(450).                   DTSBD570
00088      EJECT                                                        DTSBD570
00089  WORKING-STORAGE SECTION.                                         DTSBD570
000895 77  PAN-VALET PICTURE X(24) VALUE '004DTSBD570  11/02/00'.       DTSBD570
00090      SKIP3                                                        DTSBD570
00091  01  WRK-AREA.                                                    DTSBD570
00092      05  WRK-ABEND-CD                PIC S9(04)  COMP VALUE +570. DTSBD570
00093                                                                   DTSBD570
00094      05  ABEND-MSG                   PIC  X(60).                  DTSBD570
00095                                                                   DTSBD570
00096      05  WRK-LPC-IN-REC-CNT          PIC S9(07)  COMP-3.          DTSBD570
00097                                                                   DTSBD570
00098      05  WRK-LPC-OUT-REC-CNT         PIC S9(07)  COMP-3.          DTSBD570
00099                                                                   DTSBD570
00100      05  LPC-IN-FILE-EOF-IND         PIC  X(01).                  DTSBD570
00101                                                                   DTSBD570
00102      05  WRK-MSG-TEXT                PIC  X(60).                  DTSBD570
00103      EJECT                                                        DTSBD570
00104  01  LPC-REC.                                                     DTSBD570
00105  ++INCLUDE DTSIXLPC                                               DTSBD570
00106      EJECT                                                        DTSBD570
00107  ++INCLUDE LPFNCL01                                               DTSBD570
00108      EJECT                                                        DTSBD570
00109  01  RSKL-REC.                                                    DTSBD570
00110  ++INCLUDE DTSIRSK1                                               DTSBD570
00111      EJECT                                                        DTSBD570
00112  01  R746-REC.                                                    DTSBD570
00113  ++INCLUDE DTSIR746                                               DTSBD570
00114      EJECT                                                        DTSBD570
00115  01  R747-REC.                                                    DTSBD570
00116  ++INCLUDE DTSIR747                                               DTSBD570
00117      EJECT                                                        DTSBD570
00118  01  C072-LITERALS.                                               DTSBD570
00119  ++INCLUDE DTSIC072                                               DTSBD570
00120      EJECT                                                        DTSBD570
00121  PROCEDURE DIVISION.                                              DTSBD570
00122                                                                   DTSBD570
00123                                                                   DTSBD570
00124      PERFORM I0000-INITIATE THRU I0000-EXIT.                      DTSBD570
00125                                                                   DTSBD570
00126                                                                   DTSBD570
00127      MOVE 'N' TO LPC-IN-FILE-EOF-IND.                             DTSBD570
00128                                                                   DTSBD570
00129                                                                   DTSBD570
00130      PERFORM P0000-PROCESS THRU P0000-EXIT                        DTSBD570
00131          UNTIL LPC-IN-FILE-EOF-IND = 'Y'.                         DTSBD570
00132                                                                   DTSBD570
00133                                                                   DTSBD570
00134      PERFORM T0000-TERMINATE THRU T0000-EXIT.                     DTSBD570
00135                                                                   DTSBD570
00136                                                                   DTSBD570
00137      GOBACK.                                                      DTSBD570
00138      EJECT                                                        DTSBD570
00139  I0000-INITIATE.                                                  DTSBD570
00140      OPEN INPUT LPC-IN-FILE.                                      DTSBD570
00141                                                                   DTSBD570
00142      OPEN OUTPUT LPC-OUT-FILE.                                    DTSBD570
00143                                                                   DTSBD570
00144                                                                   DTSBD570
00145      MOVE '0' TO FINAL-FUNCTION-CODE.                             DTSBD570
00146                                                                   DTSBD570
00147      MOVE 'CNFIGAAR' TO FINAL-CNFIG-ID.                           DTSBD570
00148                                                                   DTSBD570
00149      PERFORM S1000-CALL-FINAL THRU S1000-EXIT.                    DTSBD570
00150                                                                   DTSBD570
00151                                                                   DTSBD570
00152      MOVE +0 TO WRK-LPC-IN-REC-CNT                                DTSBD570
00153                 WRK-LPC-OUT-REC-CNT.                              DTSBD570
00154  I0000-EXIT.                                                      DTSBD570
00155      EXIT.                                                        DTSBD570
00156      EJECT                                                        DTSBD570
00157  P0000-PROCESS.                                                   DTSBD570
00158      READ LPC-IN-FILE                                             DTSBD570
00159        AT END                                                     DTSBD570
00160          MOVE 'Y' TO LPC-IN-FILE-EOF-IND                          DTSBD570
00161          GO TO P0000-EXIT.                                        DTSBD570
00162                                                                   DTSBD570
00163      ADD +1 TO WRK-LPC-IN-REC-CNT.                                DTSBD570
00164                                                                   DTSBD570
00165      MOVE LPC-IN-REC TO LPC-REC.                                  DTSBD570
00166                                                                   DTSBD570
00167      MOVE XLPC-PRE-ADDRESS TO XLPC-POST-ADDRESS.                  DTSBD570
00168                                                                   DTSBD570
00169                                                                   DTSBD570
00170      MOVE SPACES TO R746-DATA-AREA.                               DTSBD570
00171                                                                   DTSBD570
00172      MOVE +0 TO R746-MSG-CNT.                                     DTSBD570
00173                                                                   DTSBD570
00174                                                                   DTSBD570
00175      MOVE XLPC-PRE-ST TO C072-ST.                                 DTSBD570
00176                                                                   DTSBD570
00177      IF C072-US-88                                                DTSBD570
00178          PERFORM P1000-PROCESS-ADDRESS THRU P1000-EXIT            DTSBD570
00179      ELSE                                                         DTSBD570
00180          MOVE 'INVALID STATE CODE ENCOUNTERED' TO WRK-MSG-TEXT    DTSBD570
00181          PERFORM S2000-MSG-TEXT THRU S2000-EXIT.                  DTSBD570
00182                                                                   DTSBD570
00183                                                                   DTSBD570
00184      IF R746-MSG-CNT > +0                                         DTSBD570
00185          MOVE XLPC-KEY-EMP-NO TO R746-EMP-NO                      DTSBD570
00186          MOVE XLPC-KEY-REC-TYPE TO R746-MSTR-REC-TYPE             DTSBD570
00187          MOVE XLPC-KEY-ADDR-ID-NO TO R746-ADDR-ID-NO              DTSBD570
00188          MOVE XLPC-PRIMARY-NAME TO R746-PRIMARY-NAME              DTSBD570
00189          MOVE XLPC-ADDR-TYPE TO R746-ADDR-TYPE                    DTSBD570
00190          MOVE XLPC-PRE-ADDRESS TO R746-PRE-ADDRESS                DTSBD570
00191          PERFORM S946-WRITE-R746 THRU S946-EXIT                   DTSBD570
00192          GO TO P0000-EXIT.                                        DTSBD570
00193                                                                   DTSBD570
00194                                                                   DTSBD570
00195      IF (XLPC-PRE-ATTN-LINE = XLPC-POST-ATTN-LINE)                DTSBD570
00196              AND                                                  DTSBD570
00197         (XLPC-PRE-DELIV-LINE-1 = XLPC-POST-DELIV-LINE-1)          DTSBD570
00198              AND                                                  DTSBD570
00199         (XLPC-PRE-DELIV-LINE-2 = XLPC-POST-DELIV-LINE-2)          DTSBD570
00200              AND                                                  DTSBD570
00201         (XLPC-PRE-CITY = XLPC-POST-CITY)                          DTSBD570
00202              AND                                                  DTSBD570
00203         (XLPC-PRE-ST = XLPC-POST-ST)                              DTSBD570
00204              AND                                                  DTSBD570
00205         (XLPC-PRE-ZIP (1:5) = XLPC-POST-ZIP (1:5))                DTSBD570
00206          CONTINUE                                                 DTSBD570
00207      ELSE                                                         DTSBD570
00208          MOVE XLPC-PRE-ZIP TO R747-SORT-ZIP                       DTSBD570
00209          MOVE XLPC-KEY-EMP-NO TO R747-EMP-NO                      DTSBD570
00210          MOVE XLPC-KEY-REC-TYPE TO R747-MSTR-REC-TYPE             DTSBD570
00211          MOVE XLPC-KEY-ADDR-ID-NO TO R747-ADDR-ID-NO              DTSBD570
00212          MOVE XLPC-MASTER-UPDATE-IND TO R747-MASTER-UPDATE-IND    DTSBD570
00213          MOVE XLPC-PRIMARY-NAME TO R747-PRIMARY-NAME              DTSBD570
00214          MOVE XLPC-ADDR-TYPE TO R747-ADDR-TYPE                    DTSBD570
00215          MOVE XLPC-PRE-ADDRESS TO R747-PRE-ADDRESS                DTSBD570
00216          MOVE XLPC-POST-ADDRESS TO R747-POST-ADDRESS              DTSBD570
00217          PERFORM S946-WRITE-R747 THRU S946-EXIT.                  DTSBD570
00218                                                                   DTSBD570
00219                                                                   DTSBD570
00220 *****IF XLPC-PRE-ADDRESS = XLPC-POST-ADDRESS                      DTSBD570
00221 *********CONTINUE                                                 DTSBD570
00222 *****ELSE                                                         DTSBD570
00223 *********PERFORM P0100-DISPLAY THRU P0100-EXIT.                   DTSBD570
00224                                                                   DTSBD570
00225                                                                   DTSBD570
00226      IF (XLPC-MASTER-UPDATE-NO-88)                                DTSBD570
00227                OR                                                 DTSBD570
00228         (XLPC-PRE-ADDRESS = XLPC-POST-ADDRESS)                    DTSBD570
00229          CONTINUE                                                 DTSBD570
00230      ELSE                                                         DTSBD570
00231          MOVE LPC-REC TO LPC-OUT-REC                              DTSBD570
00232          WRITE LPC-OUT-REC                                        DTSBD570
00233          ADD +1 TO WRK-LPC-OUT-REC-CNT.                           DTSBD570
00234  P0000-EXIT.                                                      DTSBD570
00235      EXIT.                                                        DTSBD570
00236      SKIP3                                                        DTSBD570
00237 *P0100-DISPLAY.                                                   DTSBD570
00238 *****IF XLPC-PRE-ATTN-IND = XLPC-POST-ATTN-IND                    DTSBD570
00239 *********CONTINUE                                                 DTSBD570
00240 *****ELSE                                                         DTSBD570
00241 *********DISPLAY ' '                                              DTSBD570
00242 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00243 *****************'  '                                             DTSBD570
00244 *****************XLPC-ADDR-TYPE                                   DTSBD570
00245 *****************'  '                                             DTSBD570
00246 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00247 *****************'     XLPC-PRE-ATTN-IND: '                       DTSBD570
00248 *****************XLPC-PRE-ATTN-IND                                DTSBD570
00249 *********DISPLAY '                 '                              DTSBD570
00250 *****************'    XLPC-POST-ATTN-IND: '                       DTSBD570
00251 *****************XLPC-POST-ATTN-IND.                              DTSBD570
00252                                                                   DTSBD570
00253 *****IF XLPC-PRE-ATTN-LINE = XLPC-POST-ATTN-LINE                  DTSBD570
00254 *********CONTINUE                                                 DTSBD570
00255 *****ELSE                                                         DTSBD570
00256 *********DISPLAY ' '                                              DTSBD570
00257 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00258 *****************'  '                                             DTSBD570
00259 *****************XLPC-ADDR-TYPE                                   DTSBD570
00260 *****************'  '                                             DTSBD570
00261 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00262 *****************'     XLPC-PRE-ATTN-LINE: '                      DTSBD570
00263 *****************XLPC-PRE-ATTN-LINE                               DTSBD570
00264 *********DISPLAY '                 '                              DTSBD570
00265 *****************'    XLPC-POST-ATTN-LINE: '                      DTSBD570
00266 *****************XLPC-POST-ATTN-LINE.                             DTSBD570
00267                                                                   DTSBD570
00268 *****IF XLPC-PRE-DELIV-LINE = XLPC-POST-DELIV-LINE                DTSBD570
00269 *********CONTINUE                                                 DTSBD570
00270 *****ELSE                                                         DTSBD570
00271 *********DISPLAY ' '                                              DTSBD570
00272 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00273 *****************'  '                                             DTSBD570
00274 *****************XLPC-ADDR-TYPE                                   DTSBD570
00275 *****************'  '                                             DTSBD570
00276 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00277 *****************'     XLPC-PRE-DELIV-LINE: '                     DTSBD570
00278 *****************XLPC-PRE-DELIV-LINE                              DTSBD570
00279 *********DISPLAY '                 '                              DTSBD570
00280 *****************'    XLPC-POST-DELIV-LINE: '                     DTSBD570
00281 *****************XLPC-POST-DELIV-LINE.                            DTSBD570
00282                                                                   DTSBD570
00283 *****IF XLPC-PRE-CITY = XLPC-POST-CITY                            DTSBD570
00284 *********CONTINUE                                                 DTSBD570
00285 *****ELSE                                                         DTSBD570
00286 *********DISPLAY ' '                                              DTSBD570
00287 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00288 *****************'  '                                             DTSBD570
00289 *****************XLPC-ADDR-TYPE                                   DTSBD570
00290 *****************'  '                                             DTSBD570
00291 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00292 *****************'     XLPC-PRE-CITY: '                           DTSBD570
00293 *****************XLPC-PRE-CITY                                    DTSBD570
00294 *********DISPLAY '                 '                              DTSBD570
00295 *****************'    XLPC-POST-CITY: '                           DTSBD570
00296 *****************XLPC-POST-CITY.                                  DTSBD570
00297                                                                   DTSBD570
00298 *****IF XLPC-PRE-ST = XLPC-POST-ST                                DTSBD570
00299 *********CONTINUE                                                 DTSBD570
00300 *****ELSE                                                         DTSBD570
00301 *********DISPLAY ' '                                              DTSBD570
00302 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00303 *****************'  '                                             DTSBD570
00304 *****************XLPC-ADDR-TYPE                                   DTSBD570
00305 *****************'  '                                             DTSBD570
00306 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00307 *****************'     XLPC-PRE-ST: '                             DTSBD570
00308 *****************XLPC-PRE-ST                                      DTSBD570
00309 *********DISPLAY '                 '                              DTSBD570
00310 *****************'    XLPC-POST-ST: '                             DTSBD570
00311 *****************XLPC-POST-ST.                                    DTSBD570
00312                                                                   DTSBD570
00313 *****IF XLPC-PRE-ZIP (1:5) = XLPC-POST-ZIP (1:5)                  DTSBD570
00314 *********CONTINUE                                                 DTSBD570
00315 *****ELSE                                                         DTSBD570
00316 *********DISPLAY ' '                                              DTSBD570
00317 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00318 *****************'  '                                             DTSBD570
00319 *****************XLPC-ADDR-TYPE                                   DTSBD570
00320 *****************'  '                                             DTSBD570
00321 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00322 *****************'     XLPC-PRE-ZIP (1:5): '                      DTSBD570
00323 *****************XLPC-PRE-ZIP (1:5)                               DTSBD570
00324 *********DISPLAY '                 '                              DTSBD570
00325 *****************'    XLPC-POST-ZIP (1:5): '                      DTSBD570
00326 *****************XLPC-POST-ZIP (1:5).                             DTSBD570
00327                                                                   DTSBD570
00328 *****IF XLPC-PRE-ZIP (7:4) = XLPC-POST-ZIP (7:4)                  DTSBD570
00329 *********CONTINUE                                                 DTSBD570
00330 *****ELSE                                                         DTSBD570
00331 *********DISPLAY ' '                                              DTSBD570
00332 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00333 *****************'  '                                             DTSBD570
00334 *****************XLPC-ADDR-TYPE                                   DTSBD570
00335 *****************'  '                                             DTSBD570
00336 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00337 *****************'     XLPC-PRE-ZIP (7:4): '                      DTSBD570
00338 *****************XLPC-PRE-ZIP (7:4)                               DTSBD570
00339 *********DISPLAY '                 '                              DTSBD570
00340 *****************'    XLPC-POST-ZIP (7:4): '                      DTSBD570
00341 *****************XLPC-POST-ZIP (7:4).                             DTSBD570
00342                                                                   DTSBD570
00343 *****IF XLPC-PRE-DELIV-POINT = XLPC-POST-DELIV-POINT              DTSBD570
00344 *********CONTINUE                                                 DTSBD570
00345 *****ELSE                                                         DTSBD570
00346 *********DISPLAY ' '                                              DTSBD570
00347 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00348 *****************'  '                                             DTSBD570
00349 *****************XLPC-ADDR-TYPE                                   DTSBD570
00350 *****************'  '                                             DTSBD570
00351 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00352 *****************'     XLPC-PRE-DELIV-POINT: '                    DTSBD570
00353 *****************XLPC-PRE-DELIV-POINT                             DTSBD570
00354 *********DISPLAY '                 '                              DTSBD570
00355 *****************'    XLPC-POST-DELIV-POINT: '                    DTSBD570
00356 *****************XLPC-POST-DELIV-POINT.                           DTSBD570
00357                                                                   DTSBD570
00358 *****IF XLPC-PRE-CHECK-DIGIT = XLPC-POST-CHECK-DIGIT              DTSBD570
00359 *********CONTINUE                                                 DTSBD570
00360 *****ELSE                                                         DTSBD570
00361 *********DISPLAY ' '                                              DTSBD570
00362 *********DISPLAY XLPC-KEY-EMP-NO                                  DTSBD570
00363 *****************'  '                                             DTSBD570
00364 *****************XLPC-ADDR-TYPE                                   DTSBD570
00365 *****************'  '                                             DTSBD570
00366 *****************XLPC-KEY-ADDR-ID-NO                              DTSBD570
00367 *****************'     XLPC-PRE-CHECK-DIGIT: '                    DTSBD570
00368 *****************XLPC-PRE-CHECK-DIGIT                             DTSBD570
00369 *********DISPLAY '                 '                              DTSBD570
00370 *****************'    XLPC-POST-CHECK-DIGIT: '                    DTSBD570
00371 *****************XLPC-POST-CHECK-DIGIT.                           DTSBD570
00372                                                                   DTSBD570
00373 *P0100-EXIT.                                                      DTSBD570
00374 *****EXIT.                                                        DTSBD570
00375      EJECT                                                        DTSBD570
00376  P1000-PROCESS-ADDRESS.                                           DTSBD570
00377      MOVE SPACES TO FINAL-ORIGINAL-RETURN-AREA                    DTSBD570
00378                     FINAL-EXPANDED-RETURN-AREA.                   DTSBD570
00379                                                                   DTSBD570
00380      MOVE '5' TO FINAL-FUNCTION-CODE.                             DTSBD570
00381                                                                   DTSBD570
00382      MOVE 'X' TO FINAL-FUNCTION-OPTION.                           DTSBD570
00383                                                                   DTSBD570
00384                                                                   DTSBD570
00385      MOVE SPACES TO FINAL-INPUT-ADDR-AREA.                        DTSBD570
00386                                                                   DTSBD570
00387      MOVE XLPC-PRE-DELIV-LINE-1 TO USER-INPUT-ADDRESS-1.          DTSBD570
00388                                                                   DTSBD570
00389      MOVE XLPC-PRE-DELIV-LINE-2 TO USER-INPUT-ADDRESS-2.          DTSBD570
00390                                                                   DTSBD570
00391      MOVE SPACES TO USER-INPUT-CSZ-AREA.                          DTSBD570
00392                                                                   DTSBD570
00393      MOVE XLPC-PRE-CITY TO USER-INPUT-CITY-STATE (1:25).          DTSBD570
00394                                                                   DTSBD570
00395      MOVE XLPC-PRE-ST TO USER-INPUT-CITY-STATE (28:2).            DTSBD570
00396                                                                   DTSBD570
00397      MOVE XLPC-PRE-ZIP TO USER-INPUT-ZIP.                         DTSBD570
00398                                                                   DTSBD570
00399      MOVE XLPC-PRE-ZIP (7:4) TO USER-INPUT-SEC-SEG.               DTSBD570
00400                                                                   DTSBD570
00401                                                                   DTSBD570
00402      PERFORM S1000-CALL-FINAL THRU S1000-EXIT.                    DTSBD570
00403                                                                   DTSBD570
00404                                                                   DTSBD570
00405      IF (FINAL-OUTSEL-BAD-YES)                                    DTSBD570
00406              AND                                                  DTSBD570
00407         (XLPC-PRE-ZIP (7:4) = SPACES)                             DTSBD570
00408          GO TO P1000-EXIT.                                        DTSBD570
00409                                                                   DTSBD570
00410                                                                   DTSBD570
00411      IF FINAL-OUTSEL-BAD-YES                                      DTSBD570
00412          MOVE 'ZIP+4 NOT ASSIGNED' TO WRK-MSG-TEXT                DTSBD570
00413          PERFORM S2000-MSG-TEXT THRU S2000-EXIT                   DTSBD570
00414          GO TO P1000-EXIT.                                        DTSBD570
00415                                                                   DTSBD570
00416                                                                   DTSBD570
00417      IF FINAL-LABEL-LENGTH1 > 40                                  DTSBD570
00418          MOVE 'ADDRESS LINE 1 LENGTH GREATER THAN 40 RETURNED'    DTSBD570
00419            TO WRK-MSG-TEXT                                        DTSBD570
00420          PERFORM S2000-MSG-TEXT THRU S2000-EXIT                   DTSBD570
00421      ELSE                                                         DTSBD570
00422          IF FINAL-LABEL-LENGTH1 > 0                               DTSBD570
00423              MOVE FINAL-LABEL-LINE1 TO XLPC-POST-DELIV-LINE-1     DTSBD570
00424          ELSE                                                     DTSBD570
00425              MOVE SPACES TO XLPC-POST-DELIV-LINE-1.               DTSBD570
00426                                                                   DTSBD570
00427      IF FINAL-LABEL-LENGTH2 > 40                                  DTSBD570
00428          MOVE 'ADDRESS LINE 2 LENGTH GREATER THAN 40 RETURNED'    DTSBD570
00429            TO WRK-MSG-TEXT                                        DTSBD570
00430          PERFORM S2000-MSG-TEXT THRU S2000-EXIT                   DTSBD570
00431      ELSE                                                         DTSBD570
00432          IF FINAL-LABEL-LENGTH2 > 0                               DTSBD570
00433              MOVE FINAL-LABEL-LINE2 TO XLPC-POST-DELIV-LINE-2     DTSBD570
00434          ELSE                                                     DTSBD570
00435              MOVE SPACES TO XLPC-POST-DELIV-LINE-2.               DTSBD570
00436                                                                   DTSBD570
00437      MOVE FINAL-FULL-CITY-NAME TO XLPC-POST-CITY.                 DTSBD570
00438                                                                   DTSBD570
00439      MOVE FINAL-STATE TO XLPC-POST-ST.                            DTSBD570
00440                                                                   DTSBD570
00441      MOVE FINAL-ZIP TO XLPC-POST-ZIP (1:5).                       DTSBD570
00442                                                                   DTSBD570
00443      IF FINAL-SEC-SEG = SPACE                                     DTSBD570
00444          MOVE SPACE TO XLPC-POST-ZIP (6:5)                        DTSBD570
00445      ELSE                                                         DTSBD570
00446          MOVE '-' TO XLPC-POST-ZIP (6:1)                          DTSBD570
00447          MOVE FINAL-SEC-SEG TO XLPC-POST-ZIP (7:4).               DTSBD570
00448                                                                   DTSBD570
00449      MOVE FINAL-ADVANCED-BARCODE TO XLPC-POST-ADVANCED-BARCODE.   DTSBD570
00450  P1000-EXIT.                                                      DTSBD570
00451      EXIT.                                                        DTSBD570
00452      EJECT                                                        DTSBD570
00453  T0000-TERMINATE.                                                 DTSBD570
00454      DISPLAY                                                      DTSBD570
00455       '***  DTSBD570 TERMINATION STATISTICS'.                     DTSBD570
00456                                                                   DTSBD570
00457      DISPLAY ' '.                                                 DTSBD570
00458                                                                   DTSBD570
00459      DISPLAY                                                      DTSBD570
00460       '***   NUMBER OF XLPC RECORDS INPUT: '                      DTSBD570
00461       WRK-LPC-IN-REC-CNT.                                         DTSBD570
00462                                                                   DTSBD570
00463      DISPLAY                                                      DTSBD570
00464       '***  NUMBER OF XLPC RECORDS OUTPUT: '                      DTSBD570
00465       WRK-LPC-OUT-REC-CNT.                                        DTSBD570
00466                                                                   DTSBD570
00467      CLOSE LPC-IN-FILE                                            DTSBD570
00468            LPC-OUT-FILE.                                          DTSBD570
00469                                                                   DTSBD570
00470                                                                   DTSBD570
00471      MOVE -1 TO RSK1-LENGTH.                                      DTSBD570
00472                                                                   DTSBD570
00473      PERFORM S946-WRITE-RSKL THRU S946-EXIT.                      DTSBD570
00474                                                                   DTSBD570
00475                                                                   DTSBD570
00476      MOVE '9' TO FINAL-FUNCTION-CODE.                             DTSBD570
00477                                                                   DTSBD570
00478      PERFORM S1000-CALL-FINAL THRU S1000-EXIT.                    DTSBD570
00479  T0000-EXIT.                                                      DTSBD570
00480      EXIT.                                                        DTSBD570
00481      EJECT                                                        DTSBD570
00482  S1000-CALL-FINAL.                                                DTSBD570
00483      CALL 'FINAL' USING FINAL-CALL-AREA.                          DTSBD570
00484  S1000-EXIT.                                                      DTSBD570
00485      EXIT.                                                        DTSBD570
00486                                                                   DTSBD570
00487                                                                   DTSBD570
00488                                                                   DTSBD570
00489  S2000-MSG-TEXT.                                                  DTSBD570
00490      IF R746-MSG-CNT < +3                                         DTSBD570
00491          ADD +1 TO R746-MSG-CNT                                   DTSBD570
00492          MOVE WRK-MSG-TEXT TO R746-MSG-TEXT (R746-MSG-CNT).       DTSBD570
00493  S2000-EXIT.                                                      DTSBD570
00494      EXIT.                                                        DTSBD570
00495                                                                   DTSBD570
00496                                                                   DTSBD570
00497                                                                   DTSBD570
00498  S946-WRITE-RSKL.                                                 DTSBD570
00499      CALL 'DTSBU946' USING RSKL-REC.                              DTSBD570
00500      GO TO S946-EXIT.                                             DTSBD570
00501                                                                   DTSBD570
00502  S946-WRITE-R746.                                                 DTSBD570
00503      MOVE LENGTH OF R746-REC TO R746-LENGTH.                      DTSBD570
00504      CALL 'DTSBU946' USING R746-REC.                              DTSBD570
00505      GO TO S946-EXIT.                                             DTSBD570
00506                                                                   DTSBD570
00507  S946-WRITE-R747.                                                 DTSBD570
00508      MOVE LENGTH OF R747-REC TO R747-LENGTH.                      DTSBD570
00509      CALL 'DTSBU946' USING R747-REC.                              DTSBD570
00510      GO TO S946-EXIT.                                             DTSBD570
00511                                                                   DTSBD570
00512  S946-EXIT.                                                       DTSBD570
00513      EXIT.                                                        DTSBD570
