00001  IDENTIFICATION DIVISION.                                         05/02/12
00002  PROGRAM-ID.             DTSBU194.                                DTSBU194
00003  AUTHOR.                 NGC.                                        LV001
00004  DATE-WRITTEN.           APRIL 2012.                              DTSBU194
00005  DATE-COMPILED.                                                   DTSBU194
00006                                                                   DTSBU194
00007 *****                                                             DTSBU194
00008 *                                                                 DTSBU194
00009 *    FUNCTION:  CLEAR ICESA AND WAGE-ONLY INPUT FILES AFTER       DTSBU194
00010 *               PROCESSING.                                       DTSBU194
00011 *                                                                 DTSBU194
00012 *    MODIFICATION LOG:                                            DTSBU194
00013 *                                                                 DTSBU194
00014 *    04/25/2012  INITIAL DEVELOPMENT                              DTSBU194
00015 *                REFERENCE:                     PROGRAMMER: GD    DTSBU194
00016 *                                                                 DTSBU194
00017 *    MM/DD/YYYY  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU194
00018 *                XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DTSBU194
00019 *                REFERENCE: XXXXXXXXXXXXXXX     PROGRAMMER: XXX   DTSBU194
00020 *                                                                 DTSBU194
00021 *                                                                 DTSBU194
00022 *    DESCRIPTION:                                                 DTSBU194
00023 *                                                                 DTSBU194
00024 *        CLEAR THE FILES THAT CONTAIN DATA UPLOADED FROM THE      DTSBU194
00025 *        ICESA AND WAGE ONLY APPLICATIONS AFTER THE FILES         DTSBU194
00026 *        HAVE BEEN PROCESSED. THIS PROGRAM IS CALLED FROM         DTSBU194
00027 *        BOTH THE ICESA AND WAGE-ONLY JOBS - A PARM DETERMINES    DTSBU194
00028 *        WHICH FILES ARE AFFECTED.                                DTSBU194
00029 *                                                                 DTSBU194
00030 *****                                                             DTSBU194
00031                                                                   DTSBU194
00032  ENVIRONMENT DIVISION.                                            DTSBU194
00033                                                                   DTSBU194
00034  INPUT-OUTPUT SECTION.                                            DTSBU194
00035                                                                   DTSBU194
00036  FILE-CONTROL.                                                    DTSBU194
00037                                                                   DTSBU194
00038      SELECT ICESA-FILE             ASSIGN TO DTSFICES             DTSBU194
00039          FILE STATUS IS ICESA-STATUS.                             DTSBU194
00040                                                                   DTSBU194
00041      SELECT WAGE-ONLY-RPT-FILE     ASSIGN TO DTSFWRPT             DTSBU194
00042          FILE STATUS IS WAGE-RPT-STATUS.                          DTSBU194
00043                                                                   DTSBU194
00044      SELECT WAGE-ONLY-DTL-FILE     ASSIGN TO DTSFWDTL             DTSBU194
00045          FILE STATUS IS WAGE-DTL-STATUS.                          DTSBU194
00046                                                                   DTSBU194
00047  DATA DIVISION.                                                   DTSBU194
00048                                                                   DTSBU194
00049  FILE SECTION.                                                    DTSBU194
00050                                                                   DTSBU194
00051  FD  ICESA-FILE                                                   DTSBU194
00052      RECORDING MODE IS F                                          DTSBU194
00053      BLOCK CONTAINS 0 RECORDS.                                    DTSBU194
00054                                                                   DTSBU194
00055  01  ICESA-REC                    PIC  X(275).                    DTSBU194
00056                                                                   DTSBU194
00057  FD  WAGE-ONLY-RPT-FILE                                           DTSBU194
00058      RECORDING MODE IS F                                          DTSBU194
00059      BLOCK CONTAINS 0 RECORDS.                                    DTSBU194
00060                                                                   DTSBU194
00061  01  WAGE-ONLY-RPT-REC            PIC  X(134).                    DTSBU194
00062                                                                   DTSBU194
00063  FD  WAGE-ONLY-DTL-FILE                                           DTSBU194
00064      RECORDING MODE IS F                                          DTSBU194
00065      BLOCK CONTAINS 0 RECORDS.                                    DTSBU194
00066                                                                   DTSBU194
00067  01  WAGE-ONLY-DTL-REC            PIC  X(128).                    DTSBU194
00068                                                                   DTSBU194
00069  WORKING-STORAGE SECTION.                                         DTSBU194
000695 77  PAN-VALET PICTURE X(24) VALUE '001DTSBU194  05/02/12'.       DTSBU194
00070                                                                   DTSBU194
00071  01  WRK-AREA.                                                    DTSBU194
00072      05  WRK-ABEND-CD             PIC S9(04)  COMP VALUE +194.    DTSBU194
00073      05  WRK-MOD-NAME             PIC  X(08)  VALUE 'DTSBU194'.   DTSBU194
00074                                                                   DTSBU194
00075      05  ICESA-STATUS             PIC  X(02).                     DTSBU194
00076          88  ICESA-OK-88              VALUE '00'.                 DTSBU194
00077                                                                   DTSBU194
00078      05  WAGE-RPT-STATUS          PIC  X(02).                     DTSBU194
00079          88 WAGE-RPT-OK-88            VALUE '00'.                 DTSBU194
00080                                                                   DTSBU194
00081      05  WAGE-DTL-STATUS          PIC  X(02).                     DTSBU194
00082          88 WAGE-DTL-OK-88            VALUE '00'.                 DTSBU194
00083                                                                   DTSBU194
00084      05  WRK-FILE-TYPE              PIC  X(02).                   DTSBU194
00085          88  WRK-FILE-ICESA-88        VALUE 'IC'.                 DTSBU194
00086          88  WRK-FILE-WAGE-ONLY-88    VALUE 'WG'.                 DTSBU194
00087          88  WRK-FILE-VALID-88        VALUE 'IC' 'WG'.            DTSBU194
00088                                                                   DTSBU194
00089  LINKAGE SECTION.                                                 DTSBU194
00090                                                                   DTSBU194
00091  01  PARM-AREA.                                                   DTSBU194
00092      05  PARM-LENGTH                PIC S9(04)  COMP.             DTSBU194
00093      05  PARM-DATA.                                               DTSBU194
00094          10  PARM-FILE-TYPE         PIC  X(02).                   DTSBU194
00095              88  PARM-FILE-ICESA-88        VALUE 'IC'.            DTSBU194
00096              88  PARM-FILE-WAGE-ONLY-88    VALUE 'WG'.            DTSBU194
00097              88  PARM-FILE-VALID-88        VALUE 'IC' 'WG'.       DTSBU194
00098                                                                   DTSBU194
00099  PROCEDURE DIVISION USING PARM-AREA.                              DTSBU194
00100                                                                   DTSBU194
00101  DTSBU194-MAINLINE.                                               DTSBU194
00102      PERFORM I0000-INITIATE       THRU I0000-EXIT.                DTSBU194
00103                                                                   DTSBU194
00104      PERFORM P0000-CLEAR-FILES    THRU P0000-EXIT.                DTSBU194
00105                                                                   DTSBU194
00106      PERFORM T0000-TERMINATE      THRU T0000-EXIT.                DTSBU194
00107                                                                   DTSBU194
00108  DTSBU194-MAINLINE-EXIT.                                          DTSBU194
00109      GOBACK.                                                      DTSBU194
00110                                                                   DTSBU194
00111  I0000-INITIATE.                                                  DTSBU194
00112      IF PARM-FILE-VALID-88                                        DTSBU194
00113         MOVE PARM-FILE-TYPE       TO WRK-FILE-TYPE                DTSBU194
00114      ELSE                                                         DTSBU194
00115         DISPLAY 'INVALID PARM FILE TYPE: ' PARM-FILE-TYPE         DTSBU194
00116         PERFORM S999-ABEND        THRU S999-EXIT                  DTSBU194
00117      END-IF.                                                      DTSBU194
00118                                                                   DTSBU194
00119  I0000-EXIT.                                                      DTSBU194
00120      EXIT.                                                        DTSBU194
00121                                                                   DTSBU194
00122  P0000-CLEAR-FILES.                                               DTSBU194
00123      EVALUATE TRUE                                                DTSBU194
00124        WHEN WRK-FILE-ICESA-88                                     DTSBU194
00125          PERFORM P1000-ICESA           THRU P1000-EXIT            DTSBU194
00126                                                                   DTSBU194
00127        WHEN WRK-FILE-WAGE-ONLY-88                                 DTSBU194
00128          PERFORM P2000-WAGE-ONLY       THRU P2000-EXIT            DTSBU194
00129      END-EVALUATE.                                                DTSBU194
00130                                                                   DTSBU194
00131  P0000-EXIT.                                                      DTSBU194
00132      EXIT.                                                        DTSBU194
00133                                                                   DTSBU194
00134  P1000-ICESA.                                                     DTSBU194
00135      OPEN OUTPUT ICESA-FILE.                                      DTSBU194
00136      IF NOT ICESA-OK-88                                           DTSBU194
00137         DISPLAY 'BU194 - CANNOT OPEN ICESA FILE: ' ICESA-STATUS   DTSBU194
00138      ELSE                                                         DTSBU194
00139         CLOSE ICESA-FILE                                          DTSBU194
00140      END-IF.                                                      DTSBU194
00141                                                                   DTSBU194
00142  P1000-EXIT.                                                      DTSBU194
00143      EXIT.                                                        DTSBU194
00144                                                                   DTSBU194
00145  P2000-WAGE-ONLY.                                                 DTSBU194
00146      OPEN OUTPUT WAGE-ONLY-RPT-FILE.                              DTSBU194
00147      IF NOT WAGE-RPT-OK-88                                        DTSBU194
00148         DISPLAY 'BU194 - CANNOT OPEN WAGE REPORT FILE: '          DTSBU194
00149            WAGE-RPT-STATUS                                        DTSBU194
00150      ELSE                                                         DTSBU194
00151         CLOSE WAGE-ONLY-RPT-FILE                                  DTSBU194
00152      END-IF.                                                      DTSBU194
00153                                                                   DTSBU194
00154      OPEN OUTPUT WAGE-ONLY-DTL-FILE.                              DTSBU194
00155      IF NOT WAGE-DTL-OK-88                                        DTSBU194
00156         DISPLAY 'BU194 - CANNOT OPEN WAGE DETAIL FILE: '          DTSBU194
00157            WAGE-DTL-STATUS                                        DTSBU194
00158      ELSE                                                         DTSBU194
00159         CLOSE WAGE-ONLY-DTL-FILE                                  DTSBU194
00160      END-IF.                                                      DTSBU194
00161                                                                   DTSBU194
00162  P2000-EXIT.                                                      DTSBU194
00163      EXIT.                                                        DTSBU194
00164                                                                   DTSBU194
00165  T0000-TERMINATE.                                                 DTSBU194
00166      DISPLAY 'DTSBU194 TERMINATION STATISTICS'                    DTSBU194
00167      DISPLAY SPACE.                                               DTSBU194
00168      DISPLAY '   DTSBU194 COMPLETE      '                         DTSBU194
00169      DISPLAY SPACE.                                               DTSBU194
00170                                                                   DTSBU194
00171  T0000-EXIT.                                                      DTSBU194
00172      EXIT.                                                        DTSBU194
00173      EJECT                                                        DTSBU194
00174                                                                   DTSBU194
00175  S999-ABEND.                                                      DTSBU194
00176      DISPLAY '*** DTSBU194 ABENDING'.                             DTSBU194
00177                                                                   DTSBU194
00178      CALL 'DTSBU999' USING WRK-ABEND-CD.                          DTSBU194
00179  S999-EXIT.                                                       DTSBU194
00180      EXIT.                                                        DTSBU194
