00001  IDENTIFICATION DIVISION.                                         04/24/09
00002  PROGRAM-ID.  SAMPS043.                                           SAMPS043
00003  AUTHOR. JOHN VIENNAS.                                               LV003
00004  DATE-WRITTEN. APRIL, 1993.                                       SAMPS043
00005                                                                   SAMPS043
00006 ***************************************************************   SAMPS043
00007 ** --------------------PROGRAM DESCRIPTION------------------ **   SAMPS043
00008 ***************************************************************   SAMPS043
00009 **                     CODING FOR VS COBOL VSAM              **   SAMPS043
00010 ***************************************************************   SAMPS043
00011 **                                                           **   SAMPS043
00012 **                                                           **   SAMPS043
00013 ** THIS PROGRAM READS THREE FILES AS INPUT TO THE PROGRAM,   **   SAMPS043
00014 ** TRANS-FILE, CNTRL-DATA, AND SELECT-FILE.  THE TRANS-FILE  **   SAMPS043
00015 ** UTILIZES A VSAM FILE STRUCTURE WITH (SEQ-NMBR) AS THE     **   SAMPS043
00016 ** RECORD KEY.  THE CNTRL-DATA FILE CONTAINS SOME PROCESSING **   SAMPS043
00017 ** INFORMATION WHICH IS USED IN THE OUTPUT REPORTS           **   SAMPS043
00018 ** HIT-FILE, HIT-LIST, AND CHECK-LIST.  THE SELECT-FILE      **   SAMPS043
00019 ** CONTAINS THE RECORD NUMBERS OF THE RECORDS TO BE SELECTED **   SAMPS043
00020 ** FOR THE SAMPLE.  THESE NUMBERS ARE USED AS THE RECORD     **   SAMPS043
00021 ** KEY (SEQ-NMBR) TO ACCESS THE TRANS-FILE.  THE RECORDS     **   SAMPS043
00022 ** THAT ARE READ FROM THE TRANS-FILE ARE OUTPUT TO THE THREE **   SAMPS043
00023 ** FILES, HIT-FILE, HIT-LIST, AND CHECK-LIST.  EACH RECORD   **   SAMPS043
00024 ** THAT IS READ IS ALSO UPDATED TO INDICATE THAT THE RECORD  **   SAMPS043
00025 ** WAS SELECTED AS PART OF THE SAMPLE.  THIS IS DONE BY      **   SAMPS043
00026 ** CHANGING THE SELECTED-FLAG FIELD FROM A '1' TO A '2'.     **   SAMPS043
00027 **                                                           **   SAMPS043
00028 ***************************************************************   SAMPS043
00029 ** MODIFIED: 04/23/2009                           GD         **   SAMPS043
00030 **           ADDED EXPORT FILE FOR DOWNLOAD TO EXCEL         **   SAMPS043
00031 ***************************************************************   SAMPS043
00032                                                                   SAMPS043
00033  ENVIRONMENT DIVISION.                                            SAMPS043
00034  CONFIGURATION SECTION.                                           SAMPS043
00035  INPUT-OUTPUT SECTION.                                            SAMPS043
00036  FILE-CONTROL.                                                    SAMPS043
00037      SELECT TRANS-FILE                                            SAMPS043
00038          ASSIGN TO SYS003-DISKUNIT                                SAMPS043
00039          ORGANIZATION IS INDEXED                                  SAMPS043
00040          ACCESS MODE IS RANDOM                                    SAMPS043
00041          RECORD KEY IS SEQ-NMBR-A                                 SAMPS043
00042          FILE STATUS IS TRANS-FILE-ERROR-CODE.                    SAMPS043
00043      SELECT CNTRL-DATA                                            SAMPS043
00044          ASSIGN TO UT-S-CNTRLDTA.                                 SAMPS043
00045      SELECT SELECT-FILE                                           SAMPS043
00046          ASSIGN TO UT-S-SLCTREC.                                  SAMPS043
00047      SELECT HIT-FILE                                              SAMPS043
00048          ASSIGN TO UT-S-HITFILE.                                  SAMPS043
00049      SELECT HIT-LIST                                              SAMPS043
00050          ASSIGN TO UT-S-PRINTER.                                  SAMPS043
00051      SELECT EXPORT                                                SAMPS043
00052          ASSIGN TO EXPTPS22.                                      SAMPS043
00053      SELECT CHECK-LIST                                            SAMPS043
00054          ASSIGN TO UT-S-CHECK.                                    SAMPS043
00055      SELECT JOB-STATUS                                            SAMPS043
00056          ASSIGN TO UT-S-MSGOUT.                                   SAMPS043
00057                                                                   SAMPS043
00058  DATA DIVISION.                                                   SAMPS043
00059  FILE SECTION.                                                    SAMPS043
00060                                                                   SAMPS043
00061 ***************************************************************   SAMPS043
00062 ** TRANS-FILE IS THE VSAM FILE CREATED BY THE STATE          **   SAMPS043
00063 ** EMPLOYMENT SECURITY AGENCIES (SESA) WITH THE RECORDS THAT **   SAMPS043
00064 ** MAKE UP THE SAMPLING UNIVERSE.  THE KEY OF THE FILE IS    **   SAMPS043
00065 ** (SEQ-NMBR).  THIS FIELD CONTAINS THE SEQUENTIAL RECORD    **   SAMPS043
00066 ** NUMBER.                                                   **   SAMPS043
00067 ***************************************************************   SAMPS043
00068  FD  TRANS-FILE                                                   SAMPS043
00069      LABEL RECORDS ARE STANDARD                                   SAMPS043
00070      BLOCK CONTAINS 0 RECORDS.                                    SAMPS043
00071  01  TRANS-REC.                                                   SAMPS043
00072      05  SEQ-NMBR-A                         PIC X(8).             SAMPS043
00073      05  SEQ-NMBR REDEFINES SEQ-NMBR-A      PIC 9(8).             SAMPS043
00074      05  REC-TYPE                           PIC X(5).             SAMPS043
00075      05  TRANS-TYPE                         PIC X.                SAMPS043
00076      05  SELECT-FLAG                        PIC X.                SAMPS043
00077      05  EMP-ID                             PIC X(12).            SAMPS043
00078      05  DATE-FILE-CREATED                  PIC X(8).             SAMPS043
00079      05  TAX-DUE                            PIC S9(09)V99.        SAMPS043
00080      05  TAX-PAID                           PIC S9(09)V99.        SAMPS043
00081      05  STATE-OPTION                       PIC X(25).            SAMPS043
00082                                                                   SAMPS043
00083 ***************************************************************   SAMPS043
00084 ** CNTRL-DATA CONTAINS SOME OF THE PROCESSING INFORMATION    **   SAMPS043
00085 ** NEEDED FOR SAMPLING.  IT CONTAINS THE RANDOM NUMBER       **   SAMPS043
00086 ** (CNTRL-RANDOM), THE NUMBER OF RECORDS TO BE SELECTED FOR  **   SAMPS043
00087 ** THE SAMPLE (SAMPLED-NMBR), AND THE RECORD COUNT OF THE    **   SAMPS043
00088 ** NUMBER OF RECORDS (TRANS-REC-CNTR) CONTAINED ON THE       **   SAMPS043
00089 ** TRANS-FILE.  FOR THE PURPOSE OF THIS PROGRAM, ONLY        **   SAMPS043
00090 ** THE SESA-ID, SAMPLE-TYPE AND SAMPLED-NMBR FIELDS ARE      **   SAMPS043
00091 ** NEEDED.                                                   **   SAMPS043
00092 ***************************************************************   SAMPS043
00093                                                                   SAMPS043
00094  FD  CNTRL-DATA                                                   SAMPS043
00095      RECORDING MODE IS F                                          SAMPS043
00096      LABEL RECORD IS OMITTED                                      SAMPS043
00097      BLOCK CONTAINS 1 RECORDS.                                    SAMPS043
00098  01  CNTRL-DATA-REC.                                              SAMPS043
00099      05  CNTRL-TYPE                         PIC X(5).             SAMPS043
00100      05  CNTRL-TRANS-TYPE                   PIC X.                SAMPS043
00101      05  SESA-ID                            PIC XX.               SAMPS043
00102      05  CNTRL-RANDOM                       PIC V999.             SAMPS043
00103      05  CNTRL-RANDOM-ALF REDEFINES CNTRL-RANDOM  PIC X(3).       SAMPS043
00104      05  SAMPLED-NMBR                       PIC 9(4).             SAMPS043
00105      05  SAMPLED-NMBR-ALF REDEFINES SAMPLED-NMBR  PIC X(4).       SAMPS043
00106      05  TRANS-REC-CNTR                     PIC 9(8).             SAMPS043
00107      05  TRANS-REC-CNTR-ALF REDEFINES TRANS-REC-CNTR PIC X(8).    SAMPS043
00108      05  SAMPLE-TYPE                        PIC X(02).            SAMPS043
00109      05  CNTRL-YEAR-QTR                     PIC X(05).            SAMPS043
00110      05  DATE-FILLER                        PIC 9(03).            SAMPS043
00111                                                                   SAMPS043
00112 ***************************************************************   SAMPS043
00113 ** HIT-LIST CONTAINS THE PRINTED REPORT OF THE RECORDS       **   SAMPS043
00114 ** SELECTED FOR SAMPLING.                                    **   SAMPS043
00115 ***************************************************************   SAMPS043
00116                                                                   SAMPS043
00117  FD  HIT-LIST                                                     SAMPS043
00118      RECORDING MODE IS F                                          SAMPS043
00119      LABEL RECORD IS STANDARD.                                    SAMPS043
00120  01  PRINT-HIT-REC            PIC X(132).                         SAMPS043
00121                                                                   SAMPS043
00122  FD  EXPORT                                                       SAMPS043
00123      RECORDING MODE IS F                                          SAMPS043
00124      LABEL RECORD IS STANDARD.                                    SAMPS043
00125  01  EXPORT-REC               PIC X(80).                          SAMPS043
00126                                                                   SAMPS043
00127 *************************************************************     SAMPS043
00128 ***                                                       ***     SAMPS043
00129 ** THE CHECK-LIST CONTAINS THE INFORMATION NECCESSARY      **     SAMPS043
00130 ** TO CARRY OUT THE REVENUE QUALITY CONTROL (RQC) EMPLOYER **     SAMPS043
00131 ** CREDITS/REFUNDS TAX FUNCTION.  THIS CHECK LIST IS A     **     SAMPS043
00132 ** DUPLICATE OF THE EMPLOYER CREDITS/REFUNDS SAMPLING      **     SAMPS043
00133 ** CODING SHEET IN THE RQC HANDBOOK.                       **     SAMPS043
00134 ***                                                       ***     SAMPS043
00135 *************************************************************     SAMPS043
00136  FD  CHECK-LIST                                                   SAMPS043
00137      RECORDING MODE IS F                                          SAMPS043
00138      LABEL RECORD IS STANDARD.                                    SAMPS043
00139  01  CHECK-LIST-REC           PIC X(132).                         SAMPS043
00140                                                                   SAMPS043
00141 ***************************************************************   SAMPS043
00142 ** HIT-FILE IS THE DATA FILE FOR STORING THE RECORDS THAT    **   SAMPS043
00143 ** HAVE BEEN SELECTED FROM THE (TRANS-FILE) FOR THE SAMPLE.  **   SAMPS043
00144 ** THESE RECORDS ARE WRITTEN TO A DISK FILE WITH DELIMITERS  **   SAMPS043
00145 ** OF '|' BETWEEN EACH FIELD OF THE RECORD.  THIS FILE       **   SAMPS043
00146 ** (HIT-FILE), WILL BE PASSED TO THE INFORMIX SIDE OF THE    **   SAMPS043
00147 ** RQC SYSTEM FOR FURTHER PROCESSING.                        **   SAMPS043
00148 ***************************************************************   SAMPS043
00149                                                                   SAMPS043
00150  FD  HIT-FILE                                                     SAMPS043
00151      RECORDING MODE IS F                                          SAMPS043
00152      LABEL RECORDS ARE STANDARD.                                  SAMPS043
00153  01  TRANS-HIT-REC                PIC X(42).                      SAMPS043
00154                                                                   SAMPS043
00155 *********************************************************         SAMPS043
00156 ***                                                   ***         SAMPS043
00157 ** THE SELECT-FILE IS THE INPUT FILE THAT CONTAINS THE **         SAMPS043
00158 ** RECORD NUMBERS CREATED IN THE SAMPLE DETERMINATION  **         SAMPS043
00159 ** PROGRAM (PICKNMBR).  THESE NUMBERS ARE USED AS THE  **         SAMPS043
00160 ** RECORD KEY TO SELECT THE RECORDS FROM THE VSAM FILE **         SAMPS043
00161 ** (TRANS-FILE) FOR SAMPLING.                          **         SAMPS043
00162 ***                                                   ***         SAMPS043
00163 *********************************************************         SAMPS043
00164  FD  SELECT-FILE                                                  SAMPS043
00165      RECORDING MODE IS F                                          SAMPS043
00166      LABEL RECORD IS OMITTED                                      SAMPS043
00167      BLOCK CONTAINS 0 RECORDS.                                    SAMPS043
00168  01  SL-REC-NUM                   PIC 9(08).                      SAMPS043
00169                                                                   SAMPS043
00170 **********************************************                    SAMPS043
00171 ***                                        ***                    SAMPS043
00172 ** THE JOB-STATUS FILE IS A SEPERATE FILE   **                    SAMPS043
00173 ** CREATED TO OUTPUT THE END OF JOB MESSAGES**                    SAMPS043
00174 ** SAMPS043 - NORMAL END OF JOB, AND        **                    SAMPS043
00175 ** SAMPS043 - JOB TERMINATED.               **                    SAMPS043
00176 ***                                        ***                    SAMPS043
00177 **********************************************                    SAMPS043
00178  FD  JOB-STATUS                                                   SAMPS043
00179      RECORDING MODE IS F                                          SAMPS043
00180      LABEL RECORD IS STANDARD.                                    SAMPS043
00181  01  MESSAGE-RECORD           PIC X(132).                         SAMPS043
00182                                                                   SAMPS043
00183  WORKING-STORAGE SECTION.                                         SAMPS043
001835 77  PAN-VALET PICTURE X(24) VALUE '003SAMPS043  04/24/09'.       SAMPS043
00184                                                                   SAMPS043
00185  01  WS-WORK-AREA.                                                SAMPS043
00186      05  MATCH-CNTR              PIC 9(08) VALUE 0.               SAMPS043
00187      05  WS-SELECT-EOF           PIC X(01) VALUE 'N'.             SAMPS043
00188      05  CNTRL-FLAG              PIC X(01) VALUE 'N'.             SAMPS043
00189      05  SELECTED-FLAG           PIC 9(01) VALUE 2.               SAMPS043
00190      05  LIST-COUNTER            PIC 9(02) VALUE 0.               SAMPS043
00191      05  LIST-PAGE               PIC 9(06) VALUE 0.               SAMPS043
00192                                                                   SAMPS043
00193      05  WS-DATE             PIC 9(06) VALUE ZEROES.              SAMPS043
00194      05  WS-DATE-R REDEFINES WS-DATE.                             SAMPS043
00195          10  WS-YY               PIC 9(02).                       SAMPS043
00196          10  WS-MM               PIC 9(02).                       SAMPS043
00197          10  WS-DD               PIC 9(02).                       SAMPS043
00198                                                                   SAMPS043
00199      05  WRK-DATE-AREA.                                           SAMPS043
00200          10  WRK-MM              PIC X(02).                       SAMPS043
00201          10  FILLER              PIC X(01) VALUE '/'.             SAMPS043
00202          10  WRK-DD              PIC X(02).                       SAMPS043
00203          10  FILLER              PIC X(01) VALUE '/'.             SAMPS043
00204          10  WRK-YY              PIC X(02).                       SAMPS043
00205 ***************************************************               SAMPS043
00206 ***                                             ***               SAMPS043
00207 ** TRANS-FILE-ERROR-CODE.                        **               SAMPS043
00208 ** FILE STATUS FIELD WHICH STORES THE VALUE OF   **               SAMPS043
00209 ** AN ERROR CODE IF AN ERROR IS ENCOUNTERED      **               SAMPS043
00210 ** DURING A READ OR WRITE TO THE VSAM            **               SAMPS043
00211 ** (TRANS-FILE) FILE.                            **               SAMPS043
00212 ***                                             ***               SAMPS043
00213 ***************************************************               SAMPS043
00214  01  TRANS-FILE-ERROR-CODE      PIC X(02).                        SAMPS043
00215                                                                   SAMPS043
00216  01  WS-REPORT-CONTROLS.                                          SAMPS043
00217      05  WS-CHECKLIST-CNTR       PIC 9(02) VALUE 0.               SAMPS043
00218      05  WS-PAGE-CNTR            PIC 9(04) VALUE 0.               SAMPS043
00219                                                                   SAMPS043
00220  01  WS-HEADER-SWITCH-AREA.                                       SAMPS043
00221      05  WS-CHECKLIST-SWITCH     PIC X(01) VALUE '0'.             SAMPS043
00222      05  WS-HIT-LIST-SWITCH      PIC X(01) VALUE '0'.             SAMPS043
00223                                                                   SAMPS043
00224  01  WS-CHECKLIST-HOLD-AREA.                                      SAMPS043
00225                                                                   SAMPS043
00226      05  WS-EMPL-HOLD-AREA       PIC X(12).                       SAMPS043
00227      05  WS-CASE-HOLD-AREA       PIC 9(08).                       SAMPS043
00228      05  WS-SESA-NAME-AREA       PIC X(20).                       SAMPS043
00229      05  WS-SAMPLE-NAME-AREA     PIC X(24).                       SAMPS043
00230                                                                   SAMPS043
00231 ***************************************************************   SAMPS043
00232 ** (WS-MATCH-RECORD) STORES THE VALUE OF THE SELECTED RECORDS**   SAMPS043
00233 ** FROM THE VSAM FILE (TRANS-FILE).                          **   SAMPS043
00234 ***************************************************************   SAMPS043
00235                                                                   SAMPS043
00236  01  WS-MATCH-RECORD.                                             SAMPS043
00237      05  MATCH-SEQ-NMBR                     PIC 9(8).             SAMPS043
00238      05  MATCH-REC-TYPE                     PIC X(5).             SAMPS043
00239      05  MATCH-TRANS-TYPE                   PIC X(01).            SAMPS043
00240      05  MATCH-SELECT-FLAG                  PIC X(01).            SAMPS043
00241      05  MATCH-EMP-ID                       PIC X(12).            SAMPS043
00242      05  MATCH-DATE-CREATED                 PIC X(8).             SAMPS043
00243      05  MATCH-TAX-DUE                      PIC S9(09)V99.        SAMPS043
00244      05  MATCH-TAX-PAID                     PIC S9(09)V99.        SAMPS043
00245      05  MATCH-STATE-OPTION                 PIC X(25).            SAMPS043
00246                                                                   SAMPS043
00247                                                                   SAMPS043
00248  01  WS-SAMPLE-TABLE-CONTROLS.                                    SAMPS043
00249      05  WS-ENTRY-FOUND-SWITCH     PIC X(03).                     SAMPS043
00250          88  WS-SAMPLE-FOUND               VALUE 'YES'.           SAMPS043
00251          88  WS-END-OF-SAMPLE-TABLE        VALUE 'END'.           SAMPS043
00252                                                                   SAMPS043
00253                                                                   SAMPS043
00254 *********************************************                     SAMPS043
00255 ***                                       ***                     SAMPS043
00256 ** WS-SAMPLE-DATA.                         **                     SAMPS043
00257 ** CONTAINS THE RQC - SAMPLE TYPES;        **                     SAMPS043
00258 ** A 2 CHARACTER CODE AND A 24 CHARACTER   **                     SAMPS043
00259 ** DEFINITION.                             **                     SAMPS043
00260 ***                                       ***                     SAMPS043
00261 *********************************************                     SAMPS043
00262                                                                   SAMPS043
00263  01  WS-SAMPLE-DATA.                                              SAMPS043
00264      05  FILLER       PIC X(26)                                   SAMPS043
00265         VALUE 'A11ST ACCEPTANCE SAMPLE   '.                       SAMPS043
00266      05  FILLER       PIC X(26)                                   SAMPS043
00267         VALUE 'A22ND ACCEPTANCE SAMPLE   '.                       SAMPS043
00268      05  FILLER       PIC X(26)                                   SAMPS043
00269         VALUE 'E1EXPANDED SAMPLE         '.                       SAMPS043
00270      05  FILLER       PIC X(26)                                   SAMPS043
00271         VALUE 'O11ST SESA OPTIONAL SAMPLE'.                       SAMPS043
00272      05  FILLER       PIC X(26)                                   SAMPS043
00273         VALUE 'O22ND SESA OPTIONAL SAMPLE'.                       SAMPS043
00274  01  WS-SAMPLE-TABLE REDEFINES WS-SAMPLE-DATA.                    SAMPS043
00275      05  WS-SAMPLE-ENTRY             OCCURS 5 TIMES               SAMPS043
00276                                      INDEXED BY WS-INDEX.         SAMPS043
00277          10  WS-SAMPLE-ID                PIC X(02).               SAMPS043
00278          10  WS-SAMPLE-DESCRIPTION       PIC X(24).               SAMPS043
00279                                                                   SAMPS043
00280  01  ST-TABLE-CONTROLS.                                           SAMPS043
00281      05  ST-ENTRY-FOUND-SWITCH     PIC X(03).                     SAMPS043
00282          88  ST-ENTRY-FOUND                VALUE 'YES'.           SAMPS043
00283          88  ST-END-OF-TABLE               VALUE 'END'.           SAMPS043
00284                                                                   SAMPS043
00285 **************************************************                SAMPS043
00286 ***                                            ***                SAMPS043
00287 ** ST-STATE-DATA:                               **                SAMPS043
00288 ** CONTAINS THE FIPS CODE AND STATE NAME.       **                SAMPS043
00289 ***                                            ***                SAMPS043
00290 **************************************************                SAMPS043
00291  01  ST-STATE-DATA.                                               SAMPS043
00292      05  FILLER  PIC X(22) VALUE 'AKALASKA              '.        SAMPS043
00293      05  FILLER  PIC X(22) VALUE 'ALALABAMA             '.        SAMPS043
00294      05  FILLER  PIC X(22) VALUE 'ARARKANSAS            '.        SAMPS043
00295      05  FILLER  PIC X(22) VALUE 'AZARIZONA             '.        SAMPS043
00296      05  FILLER  PIC X(22) VALUE 'CACALIFORNIA          '.        SAMPS043
00297      05  FILLER  PIC X(22) VALUE 'COCOLORADO            '.        SAMPS043
00298      05  FILLER  PIC X(22) VALUE 'CTCONNECTICUT         '.        SAMPS043
00299      05  FILLER  PIC X(22) VALUE 'DCDISTRICT OF COLUMBIA'.        SAMPS043
00300      05  FILLER  PIC X(22) VALUE 'DEDELAWARE            '.        SAMPS043
00301      05  FILLER  PIC X(22) VALUE 'FLFLORIDA             '.        SAMPS043
00302      05  FILLER  PIC X(22) VALUE 'GAGEORGIA             '.        SAMPS043
00303      05  FILLER  PIC X(22) VALUE 'HIHAWAII              '.        SAMPS043
00304      05  FILLER  PIC X(22) VALUE 'IAIOWA                '.        SAMPS043
00305      05  FILLER  PIC X(22) VALUE 'IDIDAHO               '.        SAMPS043
00306      05  FILLER  PIC X(22) VALUE 'ILILLINOIS            '.        SAMPS043
00307      05  FILLER  PIC X(22) VALUE 'ININDIANA             '.        SAMPS043
00308      05  FILLER  PIC X(22) VALUE 'KSKANSAS              '.        SAMPS043
00309      05  FILLER  PIC X(22) VALUE 'KYKENTUCKY            '.        SAMPS043
00310      05  FILLER  PIC X(22) VALUE 'LALOUISIANA           '.        SAMPS043
00311      05  FILLER  PIC X(22) VALUE 'MAMASSACHUSETTS       '.        SAMPS043
00312      05  FILLER  PIC X(22) VALUE 'MDMARYLAND            '.        SAMPS043
00313      05  FILLER  PIC X(22) VALUE 'MEMAINE               '.        SAMPS043
00314      05  FILLER  PIC X(22) VALUE 'MIMICHIGAN            '.        SAMPS043
00315      05  FILLER  PIC X(22) VALUE 'MNMINNESOTA           '.        SAMPS043
00316      05  FILLER  PIC X(22) VALUE 'MOMISSOURI            '.        SAMPS043
00317      05  FILLER  PIC X(22) VALUE 'MSMISSISSIPPI         '.        SAMPS043
00318      05  FILLER  PIC X(22) VALUE 'MTMONTANA             '.        SAMPS043
00319      05  FILLER  PIC X(22) VALUE 'NENEBRASKA            '.        SAMPS043
00320      05  FILLER  PIC X(22) VALUE 'NHNEW HAMSHIRE        '.        SAMPS043
00321      05  FILLER  PIC X(22) VALUE 'NJNEW JERSEY          '.        SAMPS043
00322      05  FILLER  PIC X(22) VALUE 'NMNEW MEXICO          '.        SAMPS043
00323      05  FILLER  PIC X(22) VALUE 'NVNEVADA              '.        SAMPS043
00324      05  FILLER  PIC X(22) VALUE 'NYNEW YORK            '.        SAMPS043
00325      05  FILLER  PIC X(22) VALUE 'NCNORTH CAROLINA      '.        SAMPS043
00326      05  FILLER  PIC X(22) VALUE 'NDNORTH DAKOTA        '.        SAMPS043
00327      05  FILLER  PIC X(22) VALUE 'OHOHIO                '.        SAMPS043
00328      05  FILLER  PIC X(22) VALUE 'OKOKLAHOMA            '.        SAMPS043
00329      05  FILLER  PIC X(22) VALUE 'OROREGON              '.        SAMPS043
00330      05  FILLER  PIC X(22) VALUE 'PAPENNSYLVANIA        '.        SAMPS043
00331      05  FILLER  PIC X(22) VALUE 'PRPUERTO RICO         '.        SAMPS043
00332      05  FILLER  PIC X(22) VALUE 'RIRHODE ISLAND        '.        SAMPS043
00333      05  FILLER  PIC X(22) VALUE 'SCSOUTH CAROLINA      '.        SAMPS043
00334      05  FILLER  PIC X(22) VALUE 'SDSOUTH DAKOTA        '.        SAMPS043
00335      05  FILLER  PIC X(22) VALUE 'TNTENNESSEE           '.        SAMPS043
00336      05  FILLER  PIC X(22) VALUE 'TXTEXAS               '.        SAMPS043
00337      05  FILLER  PIC X(22) VALUE 'UTUTAH                '.        SAMPS043
00338      05  FILLER  PIC X(22) VALUE 'VAVIRGINIA            '.        SAMPS043
00339      05  FILLER  PIC X(22) VALUE 'VIVIRGIN ISLAND       '.        SAMPS043
00340      05  FILLER  PIC X(22) VALUE 'VTVERMONT             '.        SAMPS043
00341      05  FILLER  PIC X(22) VALUE 'WAWASHINGTON          '.        SAMPS043
00342      05  FILLER  PIC X(22) VALUE 'WVWEST VIRGINIA       '.        SAMPS043
00343      05  FILLER  PIC X(22) VALUE 'WIWISCONSIN           '.        SAMPS043
00344      05  FILLER  PIC X(22) VALUE 'WYWYOMING             '.        SAMPS043
00345  01  ST-STATE-TABLE REDEFINES ST-STATE-DATA.                      SAMPS043
00346      05  ST-STATE-ENTRY              OCCURS 53 TIMES              SAMPS043
00347                                      INDEXED BY ST-INDEX.         SAMPS043
00348          10  ST-STATE-ID                 PIC X(02).               SAMPS043
00349          10  ST-STATE-NAME               PIC X(20).               SAMPS043
00350                                                                   SAMPS043
00351                                                                   SAMPS043
00352 ************************************************                  SAMPS043
00353 ***                                          ***                  SAMPS043
00354 ** WS-END-OF-JOB-MESSAGES:                    **                  SAMPS043
00355 ** END OF JOB STATUS MESSAGES: MESSAGE-1      **                  SAMPS043
00356 ** AND MESSAGE-2.                             **                  SAMPS043
00357 ***                                          ***                  SAMPS043
00358 ************************************************                  SAMPS043
00359                                                                   SAMPS043
00360  01  WS-END-OF-JOB-MESSAGES.                                      SAMPS043
00361      05  MESSAGE-1               PIC X(28)                        SAMPS043
00362        VALUE 'SAMPS043 - NORMAL END OF JOB'.                      SAMPS043
00363      05  MESSAGE-2               PIC X(28)                        SAMPS043
00364        VALUE 'SAMPS043 - JOB TERMINATED   '.                      SAMPS043
00365                                                                   SAMPS043
00366  01  WS-EOJ-DETAIL-LINE.                                          SAMPS043
00367      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00368      05  WS-MESSAGE-FILE         PIC X(28).                       SAMPS043
00369      05  FILLER                  PIC X(102) VALUE SPACES.         SAMPS043
00370                                                                   SAMPS043
00371  01  DTL-DATE-REFORMAT-AREA.                                      SAMPS043
00372      05  DTL-DATE-CREATED            PIC X(08).                   SAMPS043
00373      05  FILLER REDEFINES DTL-DATE-CREATED.                       SAMPS043
00374          10  DTL-CREATED-YR        PIC X(04).                     SAMPS043
00375          10  DTL-CREATED-MO        PIC X(02).                     SAMPS043
00376          10  DTL-CREATED-DA        PIC X(02).                     SAMPS043
00377                                                                   SAMPS043
00378  01  WS-CHECKLIST-PERIOD-REFORMAT.                                SAMPS043
00379      05  WS-PERIOD-DATE              PIC X(05).                   SAMPS043
00380      05  WS-PERIOD-X REDEFINES WS-PERIOD-DATE.                    SAMPS043
00381          10  WS-CHECKLIST-YEAR       PIC X(04).                   SAMPS043
00382          10  WS-CHECKLIST-QUARTER    PIC X(01).                   SAMPS043
00383                                                                   SAMPS043
00384 ***************************************************************   SAMPS043
00385 ** (OUTPUT-HIT-REC) IS THE RECORD LAYOUT FOR THE RECORDS     **   SAMPS043
00386 ** THAT ARE WRITTEN TO THE FILE (HIT-FILE).  THIS FILE CAN   **   SAMPS043
00387 ** BE DOWNLOADED TO THE SUN MICROCOMPUTER INTO THE CORE      **   SAMPS043
00388 ** RQC SAMPLING SUBSYSTEM.                                   **   SAMPS043
00389 ***************************************************************   SAMPS043
00390  01  OUTPUT-HIT-REC.                                              SAMPS043
00391                                                                   SAMPS043
00392      05  HIT-RECORD-TYPE          PIC X(05) VALUE SPACES.         SAMPS043
00393      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00394      05  HIT-STATE                PIC X(02) VALUE SPACES.         SAMPS043
00395      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00396      05  HIT-SAMPLE-YEAR          PIC X(05) VALUE SPACES.         SAMPS043
00397      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00398      05  HIT-TRANS-TYPE           PIC X(01) VALUE ZEROS.          SAMPS043
00399      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00400      05  HIT-SAMPLE-TYPE          PIC X(02) VALUE ZEROS.          SAMPS043
00401      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00402      05  HIT-CASE-NUMBER          PIC 9(08) VALUE ZEROS.          SAMPS043
00403      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00404      05  HIT-EMPLOYER-ID          PIC X(12) VALUE SPACES.         SAMPS043
00405      05  FILLER                   PIC X(01) VALUE '|'.            SAMPS043
00406                                                                   SAMPS043
00407 ***************************************************************   SAMPS043
00408 ** (OUTPUT-TITLES) DESCRIBES THE LINES FOR EACH LINE OF THE  **   SAMPS043
00409 ** REPORT TITLE.                                             **   SAMPS043
00410 ***************************************************************   SAMPS043
00411                                                                   SAMPS043
00412  01  LIST-HEADING-1.                                              SAMPS043
00413      10  FILLER      PIC X(1)  VALUE SPACES.                      SAMPS043
00414      10  FILLER      PIC X(9)  VALUE 'RUN DATE:'.                 SAMPS043
00415      10  FILLER      PIC X(1)  VALUE SPACES.                      SAMPS043
00416      10  O-RUN-DATE  PIC X(8) VALUE SPACES.                       SAMPS043
00417      10  FILLER      PIC X(32) VALUE SPACES.                      SAMPS043
00418      10  FILLER      PIC X(24)                                    SAMPS043
00419          VALUE 'EMPLOYER CREDITS/REFUNDS'.                        SAMPS043
00420      10  FILLER      PIC X(36) VALUE SPACES.                      SAMPS043
00421      10  FILLER      PIC X(5) VALUE 'PAGE:'.                      SAMPS043
00422      10  FILLER      PIC X(1) VALUE SPACES.                       SAMPS043
00423      10  O-LIST-PAGE     PIC ZZZZZ9.                              SAMPS043
00424      10  FILLER      PIC X(04) VALUE SPACES.                      SAMPS043
00425                                                                   SAMPS043
00426  01  LIST-HEADING-2.                                              SAMPS043
00427      10  FILLER      PIC X(51) VALUE SPACES.                      SAMPS043
00428      10  FILLER      PIC X(25)                                    SAMPS043
00429               VALUE 'SAMPLING HIT FILE LISTING'.                  SAMPS043
00430      10  FILLER      PIC X(56) VALUE SPACES.                      SAMPS043
00431                                                                   SAMPS043
00432  01  LIST-HEADING-3.                                              SAMPS043
00433      10  FILLER            PIC X(51) VALUE SPACES.                SAMPS043
00434      10  FILLER            PIC X(9) VALUE 'STATE OF '.            SAMPS043
00435      10  O-CNTRL-SESA-NAME PIC X(20) VALUE SPACES.                SAMPS043
00436      10  FILLER            PIC X(52) VALUE SPACES.                SAMPS043
00437                                                                   SAMPS043
00438  01  LIST-HEADING-4.                                              SAMPS043
00439      10 FILLER       PIC X(22) VALUE SPACES.                      SAMPS043
00440      10 FILLER       PIC X(4)  VALUE 'CASE'.                      SAMPS043
00441      10 FILLER       PIC X(8)  VALUE SPACES.                      SAMPS043
00442      10 FILLER       PIC X(8)  VALUE 'EMPLOYER'.                  SAMPS043
00443      10 FILLER       PIC X(13) VALUE SPACES.                      SAMPS043
00444      10 FILLER       PIC X(03) VALUE 'TAX'.                       SAMPS043
00445      10 FILLER       PIC X(15) VALUE SPACES.                      SAMPS043
00446      10 FILLER       PIC X(03) VALUE 'TAX'.                       SAMPS043
00447      10 FILLER       PIC X(11) VALUE SPACES.                      SAMPS043
00448      10 FILLER       PIC X(4)  VALUE 'DATE'.                      SAMPS043
00449      10 FILLER       PIC X(07) VALUE SPACES.                      SAMPS043
00450      10 FILLER       PIC X(8)  VALUE 'SEQUENCE'.                  SAMPS043
00451      10 FILLER       PIC X(41) VALUE SPACES.                      SAMPS043
00452                                                                   SAMPS043
00453  01  LIST-HEADING-5.                                              SAMPS043
00454      10 FILLER       PIC X(22) VALUE SPACES.                      SAMPS043
00455      10 FILLER       PIC X(6)  VALUE 'NUMBER'.                    SAMPS043
00456      10 FILLER       PIC X(06) VALUE SPACES.                      SAMPS043
00457      10 FILLER       PIC X(9)  VALUE 'ID NUMBER'.                 SAMPS043
00458      10 FILLER       PIC X(12) VALUE SPACES.                      SAMPS043
00459      10 FILLER       PIC X(03) VALUE 'DUE'.                       SAMPS043
00460      10 FILLER       PIC X(15) VALUE SPACES.                      SAMPS043
00461      10 FILLER       PIC X(04) VALUE 'PAID'.                      SAMPS043
00462      10 FILLER       PIC X(09) VALUE SPACES.                      SAMPS043
00463      10 FILLER       PIC X(9)                                     SAMPS043
00464              VALUE 'CREATED'.                                     SAMPS043
00465      10 FILLER       PIC X(04) VALUE SPACES.                      SAMPS043
00466      10 FILLER       PIC X(06) VALUE 'NUMBER'.                    SAMPS043
00467      10 FILLER       PIC X(21) VALUE SPACES.                      SAMPS043
00468                                                                   SAMPS043
00469 ***************************************************************   SAMPS043
00470 ** (OUTPUT-DTL-LINE) DESCRIBES THE OUTPUT FOR THE DETAIL     **   SAMPS043
00471 ** LINES OF THE REPORT.                                      **   SAMPS043
00472 ***************************************************************   SAMPS043
00473                                                                   SAMPS043
00474  01  HIT-LIST-REC.                                                SAMPS043
00475      10  FILLER               PIC X(19) VALUE SPACES.             SAMPS043
00476      10  DTL-CASE-NO          PIC ZZZZZZZ9 VALUE ZEROS.           SAMPS043
00477      10  FILLER               PIC X(6)  VALUE SPACES.             SAMPS043
00478      10  DTL-EMP-ID           PIC X(12) VALUE SPACES.             SAMPS043
00479      10  FILLER               PIC X(03) VALUE SPACES.             SAMPS043
00480      10  DTL-TAX-DUE          PIC $$$,$$$,$$$.99-.                SAMPS043
00481      10  FILLER               PIC X(02) VALUE SPACES.             SAMPS043
00482      10  DTL-TAX-PAID         PIC $$$,$$$,$$$.99-.                SAMPS043
00483      10  FILLER               PIC X(03) VALUE SPACES.             SAMPS043
00484      10  O-CREATED-MO         PIC X(02) VALUE ZEROS.              SAMPS043
00485      10  FILLER               PIC X                               SAMPS043
00486          VALUE '/'.                                               SAMPS043
00487      10  O-CREATED-DA         PIC X(02) VALUE ZEROS.              SAMPS043
00488      10  FILLER               PIC X                               SAMPS043
00489          VALUE '/'.                                               SAMPS043
00490      10  O-CREATED-YR         PIC X(04) VALUE ZEROS.              SAMPS043
00491      10  FILLER               PIC X(3)  VALUE SPACES.             SAMPS043
00492      10  DTL-SEQ-NMBR         PIC ZZZZZZZ9 VALUE ZEROS.           SAMPS043
00493      10  FILLER               PIC X(32) VALUE SPACES.             SAMPS043
00494                                                                   SAMPS043
00495  01  WRK-EXPORT-REC.                                              SAMPS043
00496      10  EXP-CASE-NO          PIC 9(08)    VALUE ZEROS.           SAMPS043
00497      10  FILLER               PIC X(1)  VALUE ','.                SAMPS043
00498      10  EXP-EMP-ID           PIC X(06) VALUE SPACES.             SAMPS043
00499      10  FILLER               PIC X(01) VALUE ','.                SAMPS043
00500      10  EXP-TAX-DUE          PIC --------9.99.                   SAMPS043
00501      10  FILLER               PIC X(01) VALUE ','.                SAMPS043
00502      10  EXP-TAX-PAID         PIC --------9.99.                   SAMPS043
00503      10  FILLER               PIC X(01) VALUE ','.                SAMPS043
00504      10  EXP-MO               PIC X(02) VALUE ZEROS.              SAMPS043
00505      10  FILLER               PIC X                               SAMPS043
00506          VALUE '/'.                                               SAMPS043
00507      10  EXP-DA               PIC X(02) VALUE ZEROS.              SAMPS043
00508      10  FILLER               PIC X                               SAMPS043
00509          VALUE '/'.                                               SAMPS043
00510      10  EXP-YR               PIC X(04) VALUE ZEROS.              SAMPS043
00511      10  FILLER               PIC X(1)  VALUE ','.                SAMPS043
00512      10  EXP-SEQ-NMBR         PIC ZZZZZZZ9 VALUE ZEROS.           SAMPS043
00513                                                                   SAMPS043
00514 **********************************************                    SAMPS043
00515 ***                                        ***                    SAMPS043
00516 ** ADDITIONAL COBOL CODE TO CREATE A CHECK- **                    SAMPS043
00517 ** LIST FOR THE REVENUE QUALITY CONTROL     **                    SAMPS043
00518 ** (RQC) REVIEWER.  IT IS A DUPLICATE OF    **                    SAMPS043
00519 ** THE CODING SHEET IN THE RQC OPERATIONS   **                    SAMPS043
00520 ** HANDBOOK.                                **                    SAMPS043
00521 ***                                        ***                    SAMPS043
00522 **********************************************                    SAMPS043
00523  01  FL-BANNER-LINE         PIC X(132) VALUE ALL '-'.             SAMPS043
00524                                                                   SAMPS043
00525  01  HD-NEW-EMP-CHECKLIST.                                        SAMPS043
00526                                                                   SAMPS043
00527      05  FILLER              PIC X(53) VALUE SPACES.              SAMPS043
00528      05  FILLER              PIC X(23) VALUE                      SAMPS043
00529         'REVENUE QUALITY CONTROL'.                                SAMPS043
00530      05  FILLER              PIC X(34) VALUE SPACES.              SAMPS043
00531      05  FILLER              PIC X(06) VALUE                      SAMPS043
00532         'PAGE: '.                                                 SAMPS043
00533      05  HD-PAGE-NUMBER      PIC ZZZZZ9.                          SAMPS043
00534      05  FILLER              PIC X(10) VALUE SPACES.              SAMPS043
00535                                                                   SAMPS043
00536  01  HT-TAX-FUNCTION-HEADER.                                      SAMPS043
00537                                                                   SAMPS043
00538      05  FILLER              PIC X(01) VALUE SPACES.              SAMPS043
00539      05  FILLER              PIC X(39) VALUE                      SAMPS043
00540        'ACCOUNT MAINTENANCE SAMPLE CODING SHEET'.                 SAMPS043
00541      05  FILLER              PIC X(70) VALUE SPACES.              SAMPS043
00542      05  FILLER              PIC X(10) VALUE                      SAMPS043
00543         'RUN DATE: '.                                             SAMPS043
00544      05  HD-RUN-DATE         PIC X(08).                           SAMPS043
00545      05  FILLER              PIC X(04) VALUE SPACES.              SAMPS043
00546                                                                   SAMPS043
00547  01  H2-TAX-FUNCTION-HEADER-2.                                    SAMPS043
00548                                                                   SAMPS043
00549      05  FILLER              PIC X(01) VALUE SPACES.              SAMPS043
00550      05  FILLER              PIC X(39) VALUE                      SAMPS043
00551        'EMPLOYER CREDITS/REFUNDS - CHECKLIST #3'.                 SAMPS043
00552      05  FILLER              PIC X(92) VALUE SPACES.              SAMPS043
00553                                                                   SAMPS043
00554  01  FL-FIRST-LINE-COLUMN-HEADER.                                 SAMPS043
00555                                                                   SAMPS043
00556      05  FILLER              PIC X(02) VALUE SPACES.              SAMPS043
00557      05  FILLER              PIC X(11) VALUE                      SAMPS043
00558         'SESA NAME: '.                                            SAMPS043
00559      05  FL-SESA-NAME        PIC X(20).                           SAMPS043
00560      05  FILLER              PIC X(05) VALUE SPACES.              SAMPS043
00561      05  FILLER              PIC X(15)                            SAMPS043
00562        VALUE 'PERIOD/QUARTER:'.                                   SAMPS043
00563      05  FILLER              PIC X(01) VALUE SPACES.              SAMPS043
00564      05  FL-PERIOD.                                               SAMPS043
00565          10  FL-YEAR         PIC X(04).                           SAMPS043
00566          10  FILLER          PIC X(01) VALUE '/'.                 SAMPS043
00567          10  FL-QUARTER      PIC X(01).                           SAMPS043
00568      05  FILLER              PIC X(25) VALUE SPACES.              SAMPS043
00569      05  FILLER              PIC X(25) VALUE                      SAMPS043
00570         'REVIEWER: _______________'.                              SAMPS043
00571      05  FILLER              PIC X(22) VALUE SPACES.              SAMPS043
00572                                                                   SAMPS043
00573  01  WS-SAMPLE-TYPE-FIELD.                                        SAMPS043
00574                                                                   SAMPS043
00575      05  FILLER              PIC X(47) VALUE SPACES.              SAMPS043
00576      05  FILLER              PIC X(13) VALUE                      SAMPS043
00577         'SAMPLE TYPE: '.                                          SAMPS043
00578      05  WS-SAMPLE-TYPE      PIC X(24).                           SAMPS043
00579      05  FILLER              PIC X(48) VALUE SPACES.              SAMPS043
00580                                                                   SAMPS043
00581  01  SL-SECOND-LINE-COL-HEADER.                                   SAMPS043
00582                                                                   SAMPS043
00583      05  FILLER              PIC X(04) VALUE SPACES.              SAMPS043
00584      05  FILLER              PIC X(04) VALUE                      SAMPS043
00585         'CASE'.                                                   SAMPS043
00586      05  FILLER              PIC X(03) VALUE SPACES.              SAMPS043
00587      05  FILLER              PIC X(08) VALUE                      SAMPS043
00588         'EMPLOYER'.                                               SAMPS043
00589      05  FILLER              PIC X(08) VALUE SPACES.              SAMPS043
00590      05  FILLER              PIC X(02) VALUE '1A'.                SAMPS043
00591      05  FILLER              PIC X(04) VALUE SPACES.              SAMPS043
00592      05  FILLER              PIC X(02) VALUE '1B'.                SAMPS043
00593      05  FILLER              PIC X(06) VALUE SPACES.              SAMPS043
00594      05  FILLER              PIC X(01) VALUE '2'.                 SAMPS043
00595      05  FILLER              PIC X(06) VALUE SPACES.              SAMPS043
00596      05  FILLER              PIC X(01) VALUE '3'.                 SAMPS043
00597      05  FILLER              PIC X(06) VALUE SPACES.              SAMPS043
00598      05  FILLER              PIC X(01) VALUE '4'.                 SAMPS043
00599      05  FILLER              PIC X(06) VALUE SPACES.              SAMPS043
00600      05  FILLER              PIC X(01) VALUE '5'.                 SAMPS043
00601      05  FILLER              PIC X(06) VALUE SPACES.              SAMPS043
00602      05  FILLER              PIC X(01) VALUE '6'.                 SAMPS043
00603      05  FILLER              PIC X(05) VALUE SPACES.              SAMPS043
00604      05  FILLER              PIC X(09)                            SAMPS043
00605         VALUE 'PASS/FAIL'.                                        SAMPS043
00606      05  FILLER              PIC X(48) VALUE SPACES.              SAMPS043
00607                                                                   SAMPS043
00608  01  TL-THIRD-COLUMN-HEADER.                                      SAMPS043
00609                                                                   SAMPS043
00610      05  FILLER              PIC X(03) VALUE SPACES.              SAMPS043
00611      05  FILLER              PIC X(06) VALUE                      SAMPS043
00612         'NUMBER'.                                                 SAMPS043
00613      05  FILLER              PIC X(02) VALUE SPACES.              SAMPS043
00614      05  FILLER              PIC X(09) VALUE                      SAMPS043
00615         'ID NUMBER'.                                              SAMPS043
00616      05  FILLER                  PIC X(57) VALUE SPACES.          SAMPS043
00617      05  FILLER                  PIC X(05) VALUE '(Y/N)'.         SAMPS043
00618      05  FILLER                  PIC X(50) VALUE SPACES.          SAMPS043
00619                                                                   SAMPS043
00620  01  CL-COLUMN-UNDERLINE.                                         SAMPS043
00621                                                                   SAMPS043
00622      05  FILLER              PIC X(03) VALUE SPACES.              SAMPS043
00623      05  FILLER              PIC X(06) VALUE                      SAMPS043
00624         '------'.                                                 SAMPS043
00625      05  FILLER              PIC X(02) VALUE SPACES.              SAMPS043
00626      05  FILLER              PIC X(09) VALUE                      SAMPS043
00627         '---------'.                                              SAMPS043
00628      05  FILLER                  PIC X(06) VALUE SPACES.          SAMPS043
00629      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00630      05  FILLER                  PIC X(01) VALUE SPACES.          SAMPS043
00631      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00632      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00633      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00634      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00635      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00636      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00637      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00638      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00639      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00640      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00641      05  FILLER                  PIC X(05) VALUE '-----'.         SAMPS043
00642      05  FILLER                  PIC X(03) VALUE SPACES.          SAMPS043
00643      05  FILLER              PIC X(09) VALUE '---------'.         SAMPS043
00644      05  FILLER                  PIC X(66) VALUE SPACES.          SAMPS043
00645                                                                   SAMPS043
00646  01  DL-BANNER-LINE         PIC X(84) VALUE ALL '-'.              SAMPS043
00647                                                                   SAMPS043
00648  01  DL-CHECKLIST-DETAIL.                                         SAMPS043
00649      05  DL-CHECKLIST-CASE-NO    PIC ZZZZZZZ9.                    SAMPS043
00650      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00651      05  DL-CHECKLIST-EMP-ID     PIC X(12).                       SAMPS043
00652      05  FILLER                  PIC X(04) VALUE SPACES.          SAMPS043
00653      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00654      05  FILLER                  PIC X(01) VALUE SPACES.          SAMPS043
00655      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00656      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00657      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00658      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00659      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00660      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00661      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00662      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00663      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00664      05  FILLER                  PIC X(02) VALUE SPACES.          SAMPS043
00665      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00666      05  FILLER                  PIC X(05) VALUE SPACES.          SAMPS043
00667      05  FILLER                  PIC X(05) VALUE '(   )'.         SAMPS043
00668      05  FILLER                  PIC X(62) VALUE SPACES.          SAMPS043
00669                                                                   SAMPS043
00670  01  WS-FOOTNOTE-AREA.                                            SAMPS043
00671      05  FILLER                  PIC X(01) VALUE SPACES.          SAMPS043
00672      05  FILLER                  PIC X(47)                        SAMPS043
00673        VALUE 'QUESTIONS 1A, 1B, 3, 4, 5, AND 6 ARE EVALUATIVE'.   SAMPS043
00674      05  FILLER                  PIC X(85) VALUE SPACES.          SAMPS043
00675                                                                   SAMPS043
00676                                                                   SAMPS043
00677  PROCEDURE DIVISION.                                              SAMPS043
00678 ********************************************                      SAMPS043
00679 ***                                      ***                      SAMPS043
00680 ** THE DECLARATIVES SECTION THAT FOLLOWS  **                      SAMPS043
00681 ** IS PERFORMED IF AN INPUT/OUTPUT ERROR  **                      SAMPS043
00682 ** OCCURS TO THE VSAM FILE (TRANS-FILE)   **                      SAMPS043
00683 ** DURING PROCESSING.                     **                      SAMPS043
00684 ***                                      ***                      SAMPS043
00685 ********************************************                      SAMPS043
00686  DECLARATIVES.                                                    SAMPS043
00687  A000-EXCEPTION-HANDLING SECTION.                                 SAMPS043
00688      USE AFTER ERROR PROCEDURE                                    SAMPS043
00689          ON TRANS-FILE.                                           SAMPS043
00690                                                                   SAMPS043
00691 *******************************************                       SAMPS043
00692 ***                                     ***                       SAMPS043
00693 ** A100-CHECK-ERROR-ROUTINE.             **                       SAMPS043
00694 ** THIS SECTION WILL DISPLAY THAT AN     **                       SAMPS043
00695 ** INPUT/OUTPUT ERROR HAS OCCURRED,      **                       SAMPS043
00696 ** DISPLAY A FILE STATUS ERROR CODE      **                       SAMPS043
00697 ** (TRANS-FILE-ERROR-CODE), CLOSES ALL   **                       SAMPS043
00698 ** INPUT/OUTPUT FILES AND STOPS THE      **                       SAMPS043
00699 ** EXECUTION OF THE PROGRAM.             **                       SAMPS043
00700 ***                                     ***                       SAMPS043
00701 *******************************************                       SAMPS043
00702  A100-CHECK-ERROR-ROUTINE.                                        SAMPS043
00703                                                                   SAMPS043
00704      DISPLAY 'INPUT/OUTPUT ERROR HAS OCCURRED.'                   SAMPS043
00705      DISPLAY 'THE FILE STATUS CODE ERROR IS : '                   SAMPS043
00706      DISPLAY TRANS-FILE-ERROR-CODE                                SAMPS043
00707      DISPLAY ' - SAMPS043 - JOB TERMINATED '                      SAMPS043
00708      CLOSE SELECT-FILE                                            SAMPS043
00709      CLOSE CNTRL-DATA                                             SAMPS043
00710      CLOSE TRANS-FILE                                             SAMPS043
00711      CLOSE JOB-STATUS                                             SAMPS043
00712      CLOSE HIT-FILE                                               SAMPS043
00713      CLOSE HIT-LIST                                               SAMPS043
00714      CLOSE CHECK-LIST                                             SAMPS043
00715      STOP RUN.                                                    SAMPS043
00716                                                                   SAMPS043
00717  END DECLARATIVES.                                                SAMPS043
00718 ***************************************************************   SAMPS043
00719 ** 0000-DRIVER-ROUTINE.                                      **   SAMPS043
00720 ** THIS SECTION PERFORMS THE MAIN PROCESSING OF THE PROGRAM. **   SAMPS043
00721 ***************************************************************   SAMPS043
00722  B000-REGULAR-PROCESSING SECTION.                                 SAMPS043
00723  0000-DRIVER-ROUTINE.                                             SAMPS043
00724                                                                   SAMPS043
00725      PERFORM 0100-OPEN-ROUTINE                                    SAMPS043
00726          THRU 0100-OPEN-ROUTINE-EXIT.                             SAMPS043
00727      PERFORM 0200-VALIDATE-TRANSACTION-TYPE                       SAMPS043
00728          THRU 0200-VALIDATION-EXIT.                               SAMPS043
00729      PERFORM 0300-STATE-TABLE-ROUTINE                             SAMPS043
00730          THRU 0300-STATE-TABLE-EXIT.                              SAMPS043
00731      PERFORM 0305-SAMPLE-TABLE-ROUTINE                            SAMPS043
00732          THRU 0305-SAMPLE-TABLE-EXIT.                             SAMPS043
00733      PERFORM 0500-SELECT-RECORDS                                  SAMPS043
00734          THRU 0500-SELECT-RECS-EXIT                               SAMPS043
00735              UNTIL WS-SELECT-EOF = 'Y'.                           SAMPS043
00736                                                                   SAMPS043
00737 ************************************************************      SAMPS043
00738 ** 0100-OPEN-ROUTINE.                                     **      SAMPS043
00739 ** THIS SECTION OPENS INPUT FILES CNTRL-DATA, AND         **      SAMPS043
00740 ** SELECT-FILE.  THE FOLLOWING OUTPUT FILES ARE OPENED:   **      SAMPS043
00741 ** HIT-FILE, HIT-LIST, CHECK-LIST, AND JOB-STATUS.        **      SAMPS043
00742 ** THIS SECTION ALSO OPENS THE VSAM FILE TRANS-FILE AS    **      SAMPS043
00743 ** INPUT/OUTPUT, MOVES THE CURRENT DATE TO THE OUTPUT     **      SAMPS043
00744 ** FILE HIT-LIST AND CHECK-LIST FOR PRINTING, AND READS   **      SAMPS043
00745 ** THE RECORD IN THE CNTRL-DATA FILE.                     **      SAMPS043
00746 ************************************************************      SAMPS043
00747  0100-OPEN-ROUTINE.                                               SAMPS043
00748                                                                   SAMPS043
00749      OPEN INPUT CNTRL-DATA.                                       SAMPS043
00750      OPEN INPUT SELECT-FILE.                                      SAMPS043
00751      OPEN I-O TRANS-FILE.                                         SAMPS043
00752      OPEN OUTPUT HIT-FILE.                                        SAMPS043
00753      OPEN OUTPUT HIT-LIST.                                        SAMPS043
00754      OPEN OUTPUT EXPORT.                                          SAMPS043
00755      OPEN OUTPUT CHECK-LIST.                                      SAMPS043
00756      OPEN OUTPUT JOB-STATUS.                                      SAMPS043
00757      ACCEPT WS-DATE    FROM DATE.                                 SAMPS043
00758      MOVE WS-YY         TO WRK-YY.                                SAMPS043
00759      MOVE WS-MM         TO WRK-MM.                                SAMPS043
00760      MOVE WS-DD         TO WRK-DD.                                SAMPS043
00761      MOVE WRK-DATE-AREA TO O-RUN-DATE HD-RUN-DATE.                SAMPS043
00762      READ CNTRL-DATA AT END MOVE 'Y' TO CNTRL-FLAG.               SAMPS043
00763                                                                   SAMPS043
00764  0100-OPEN-ROUTINE-EXIT.                                          SAMPS043
00765      EXIT.                                                        SAMPS043
00766                                                                   SAMPS043
00767 *******************************************************           SAMPS043
00768 ***                                                 ***           SAMPS043
00769 ** 0200-VALIDATE-TRANSACTION-TYPE.                   **           SAMPS043
00770 ** UTILIZING THE CNTRL-TRANS-TYPE FIELD FROM THE     **           SAMPS043
00771 ** INPUT FILE CNTRL-DATA, THIS PROCEDURE VALIDATES   **           SAMPS043
00772 ** THIS FIELD FOR A VALUE OF 1.  THE CREDITS/REFUNDS **           SAMPS043
00773 ** TAX FUNCTION USES ONLY THE VALUE OF '1' AS ITS    **           SAMPS043
00774 ** CONTROL TRANSACTION TYPE DESIGNATION.  IF THIS    **           SAMPS043
00775 ** FIELD IS ANYTHING OTHER THAN A '1', AN ERROR      **           SAMPS043
00776 ** MESSAGE IS DISPLAYED AND THE PROGRAM RUN IS       **           SAMPS043
00777 ** TERMINATED.                                       **           SAMPS043
00778 ***                                                 ***           SAMPS043
00779 *******************************************************           SAMPS043
00780                                                                   SAMPS043
00781  0200-VALIDATE-TRANSACTION-TYPE.                                  SAMPS043
00782                                                                   SAMPS043
00783      IF CNTRL-TRANS-TYPE = '1'                                    SAMPS043
00784          NEXT SENTENCE                                            SAMPS043
00785      ELSE                                                         SAMPS043
00786              DISPLAY 'INVALID TRANSACTION TYPE'                   SAMPS043
00787              DISPLAY 'TRANSACTION TYPE IN ERROR IS: '             SAMPS043
00788              DISPLAY CNTRL-TRANS-TYPE                             SAMPS043
00789              MOVE MESSAGE-2 TO WS-MESSAGE-FILE                    SAMPS043
00790              PERFORM 9999-CLOSE-FILES                             SAMPS043
00791              STOP RUN.                                            SAMPS043
00792                                                                   SAMPS043
00793  0200-VALIDATION-EXIT.                                            SAMPS043
00794      EXIT.                                                        SAMPS043
00795                                                                   SAMPS043
00796 *************************************************                 SAMPS043
00797 ***                                           ***                 SAMPS043
00798 ** 0300-STATE-TABLE-ROUTINE.                   **                 SAMPS043
00799 ** THIS ROUTINE SEARCHES THE ST-STATE-DATA     **                 SAMPS043
00800 ** TABLE, FOUND IN THE WORKING STORAGE SECTION,**                 SAMPS043
00801 ** FOR A MATCHING CONDITION OF THE SESA-ID     **                 SAMPS043
00802 ** FIELD OF THE CNTRL-DATA FILE.  IF A MATCH   **                 SAMPS043
00803 ** OCCURS, THE STATE ABBREVIATION (SESA-ID) IS **                 SAMPS043
00804 ** REPLACED WITH THE STATE NAME DESCRIPTION.   **                 SAMPS043
00805 ** IF A MATCH IS NOT FOUND, AN ERROR MESSAGE IS**                 SAMPS043
00806 ** DISPLAYED AND THE PROGRAM RUN IS TERMINATED.**                 SAMPS043
00807 ***                                           ***                 SAMPS043
00808 *************************************************                 SAMPS043
00809  0300-STATE-TABLE-ROUTINE.                                        SAMPS043
00810                                                                   SAMPS043
00811      SET ST-INDEX TO 1.                                           SAMPS043
00812      SEARCH ST-STATE-ENTRY                                        SAMPS043
00813            AT END MOVE 'END' TO ST-ENTRY-FOUND-SWITCH             SAMPS043
00814            WHEN SESA-ID                                           SAMPS043
00815                IS EQUAL TO ST-STATE-ID (ST-INDEX)                 SAMPS043
00816                MOVE 'YES' TO ST-ENTRY-FOUND-SWITCH.               SAMPS043
00817      IF ST-ENTRY-FOUND                                            SAMPS043
00818         MOVE ST-STATE-NAME (ST-INDEX)                             SAMPS043
00819             TO WS-SESA-NAME-AREA                                  SAMPS043
00820      ELSE                                                         SAMPS043
00821          DISPLAY  SESA-ID, ' - NOT FOUND ON STATE TABLE'          SAMPS043
00822          MOVE MESSAGE-2 TO WS-MESSAGE-FILE                        SAMPS043
00823          PERFORM 9999-CLOSE-FILES                                 SAMPS043
00824          STOP RUN.                                                SAMPS043
00825                                                                   SAMPS043
00826  0300-STATE-TABLE-EXIT.                                           SAMPS043
00827      EXIT.                                                        SAMPS043
00828                                                                   SAMPS043
00829 *************************************************                 SAMPS043
00830 ***                                           ***                 SAMPS043
00831 ** 0305-SAMPLE-TABLE-ROUTINE.                  **                 SAMPS043
00832 ** THIS ROUTINE SEARCHES THE WS-SAMPLE-DATA    **                 SAMPS043
00833 ** TABLE, FOUND IN THE WORKING STORAGE SECTION,**                 SAMPS043
00834 ** FOR A MATCHING CONDITION OF THE SAMPLE-TYPE **                 SAMPS043
00835 ** FIELD OF THE CNTRL-DATA FILE.  IF A MATCH   **                 SAMPS043
00836 ** OCCURS, THE SAMPLE-TYPE ABBREVIATION IS     **                 SAMPS043
00837 ** REPLACED WITH THE SAMPLE-TYPE DESCRIPTION.  **                 SAMPS043
00838 ** IF A MATCH IS NOT FOUND, AN ERROR MESSAGE IS**                 SAMPS043
00839 ** DISPLAYED AND THE PROGRAM RUN IS TERMINATED.**                 SAMPS043
00840 ***                                           ***                 SAMPS043
00841 *************************************************                 SAMPS043
00842  0305-SAMPLE-TABLE-ROUTINE.                                       SAMPS043
00843                                                                   SAMPS043
00844      SET WS-INDEX TO 1.                                           SAMPS043
00845      SEARCH WS-SAMPLE-ENTRY                                       SAMPS043
00846            AT END MOVE 'END' TO WS-ENTRY-FOUND-SWITCH             SAMPS043
00847            WHEN SAMPLE-TYPE                                       SAMPS043
00848                IS EQUAL TO WS-SAMPLE-ID (WS-INDEX)                SAMPS043
00849                MOVE 'YES' TO WS-ENTRY-FOUND-SWITCH.               SAMPS043
00850      IF WS-SAMPLE-FOUND                                           SAMPS043
00851         MOVE WS-SAMPLE-DESCRIPTION (WS-INDEX)                     SAMPS043
00852             TO WS-SAMPLE-NAME-AREA                                SAMPS043
00853      ELSE                                                         SAMPS043
00854          DISPLAY SAMPLE-TYPE, '- NOT ON SAMPLE TABLE'             SAMPS043
00855          MOVE MESSAGE-2 TO WS-MESSAGE-FILE                        SAMPS043
00856          PERFORM 9999-CLOSE-FILES                                 SAMPS043
00857          STOP RUN.                                                SAMPS043
00858                                                                   SAMPS043
00859  0305-SAMPLE-TABLE-EXIT.                                          SAMPS043
00860      EXIT.                                                        SAMPS043
00861                                                                   SAMPS043
00862 *********************************************************         SAMPS043
00863 **0400-HIT-LIST-HEADING.                               **         SAMPS043
00864 ** THIS SECTION GENERATES THE PAGE AND COLUMN HEADERS  **         SAMPS043
00865 ** FOR THE HIT-LIST OUTPUT REPORT.                     **         SAMPS043
00866 *********************************************************         SAMPS043
00867                                                                   SAMPS043
00868  0400-HIT-LIST-HEADING.                                           SAMPS043
00869                                                                   SAMPS043
00870      ADD 1                TO LIST-PAGE.                           SAMPS043
00871      MOVE SPACES          TO PRINT-HIT-REC.                       SAMPS043
00872      MOVE LIST-PAGE       TO O-LIST-PAGE.                         SAMPS043
00873      MOVE WS-SESA-NAME-AREA TO O-CNTRL-SESA-NAME.                 SAMPS043
00874      WRITE PRINT-HIT-REC FROM LIST-HEADING-1                      SAMPS043
00875          AFTER ADVANCING PAGE.                                    SAMPS043
00876      WRITE PRINT-HIT-REC FROM LIST-HEADING-2                      SAMPS043
00877          AFTER ADVANCING 1 LINE.                                  SAMPS043
00878      WRITE PRINT-HIT-REC FROM LIST-HEADING-3                      SAMPS043
00879          AFTER ADVANCING 1 LINE.                                  SAMPS043
00880      WRITE PRINT-HIT-REC FROM LIST-HEADING-4                      SAMPS043
00881          AFTER ADVANCING 3 LINES.                                 SAMPS043
00882      WRITE PRINT-HIT-REC FROM LIST-HEADING-5                      SAMPS043
00883          AFTER ADVANCING 1 LINE.                                  SAMPS043
00884      MOVE SPACES TO PRINT-HIT-REC.                                SAMPS043
00885      WRITE PRINT-HIT-REC AFTER ADVANCING 1 LINE.                  SAMPS043
00886                                                                   SAMPS043
00887  0400-HIT-LIST-EXIT.                                              SAMPS043
00888      EXIT.                                                        SAMPS043
00889                                                                   SAMPS043
00890 *********************************************                     SAMPS043
00891 ***                                       ***                     SAMPS043
00892 ** 0405-CHECKLIST-HEADER-RTN.              **                     SAMPS043
00893 ** THIS SECTION CREATES THE PAGE, AND      **                     SAMPS043
00894 ** COLUMN HEADERS FOR THE CHECK-LIST OUTPUT**                     SAMPS043
00895 ** REPORT.                                 **                     SAMPS043
00896 ***                                       ***                     SAMPS043
00897 *********************************************                     SAMPS043
00898  0405-CHECKLIST-HEADER-RTN.                                       SAMPS043
00899                                                                   SAMPS043
00900      ADD 1             TO WS-PAGE-CNTR.                           SAMPS043
00901      MOVE SPACES       TO CHECK-LIST-REC.                         SAMPS043
00902      MOVE WS-PAGE-CNTR TO HD-PAGE-NUMBER.                         SAMPS043
00903      WRITE CHECK-LIST-REC FROM FL-BANNER-LINE                     SAMPS043
00904          AFTER ADVANCING PAGE.                                    SAMPS043
00905      WRITE CHECK-LIST-REC FROM HD-NEW-EMP-CHECKLIST               SAMPS043
00906          AFTER ADVANCING 1 LINE.                                  SAMPS043
00907      WRITE CHECK-LIST-REC FROM HT-TAX-FUNCTION-HEADER             SAMPS043
00908          AFTER ADVANCING 1 LINE.                                  SAMPS043
00909      WRITE CHECK-LIST-REC FROM H2-TAX-FUNCTION-HEADER-2           SAMPS043
00910          AFTER ADVANCING 1 LINE.                                  SAMPS043
00911      WRITE CHECK-LIST-REC FROM FL-BANNER-LINE                     SAMPS043
00912          AFTER ADVANCING 1 LINE.                                  SAMPS043
00913      MOVE WS-SESA-NAME-AREA   TO FL-SESA-NAME.                    SAMPS043
00914      MOVE CNTRL-YEAR-QTR      TO WS-PERIOD-DATE.                  SAMPS043
00915      MOVE WS-CHECKLIST-YEAR   TO FL-YEAR.                         SAMPS043
00916      MOVE WS-CHECKLIST-QUARTER  TO FL-QUARTER.                    SAMPS043
00917      MOVE WS-SAMPLE-NAME-AREA TO WS-SAMPLE-TYPE.                  SAMPS043
00918      WRITE CHECK-LIST-REC FROM FL-FIRST-LINE-COLUMN-HEADER        SAMPS043
00919          AFTER ADVANCING 2 LINES.                                 SAMPS043
00920      WRITE CHECK-LIST-REC FROM WS-SAMPLE-TYPE-FIELD               SAMPS043
00921          AFTER ADVANCING 1 LINE.                                  SAMPS043
00922      WRITE CHECK-LIST-REC FROM SL-SECOND-LINE-COL-HEADER          SAMPS043
00923          AFTER ADVANCING 2 LINES.                                 SAMPS043
00924      WRITE CHECK-LIST-REC FROM TL-THIRD-COLUMN-HEADER             SAMPS043
00925          AFTER ADVANCING 1 LINE.                                  SAMPS043
00926      WRITE CHECK-LIST-REC FROM CL-COLUMN-UNDERLINE                SAMPS043
00927          AFTER ADVANCING 1 LINE.                                  SAMPS043
00928      MOVE SPACES     TO CHECK-LIST-REC.                           SAMPS043
00929      WRITE CHECK-LIST-REC AFTER ADVANCING 1 LINES.                SAMPS043
00930                                                                   SAMPS043
00931  0405-CHECKLIST-HEADER-EXIT.                                      SAMPS043
00932      EXIT.                                                        SAMPS043
00933                                                                   SAMPS043
00934                                                                   SAMPS043
00935 ***************************************************************   SAMPS043
00936 ** 0500-SELECT-RECORDS.                                      **   SAMPS043
00937 ** THIS SECTION WILL READ THE SELECT-FILE WHICH CONTAINS THE **   SAMPS043
00938 ** SELECTED NUMBERS FOR THE SAMPLE.  EACH SELECT RECORD WILL **   SAMPS043
00939 ** ALSO BE USED AS THE RECORD KEY TO READ THE SAMPLING       **   SAMPS043
00940 ** TRANSACTION VSAM  FILE (TRANS-FILE).  THE TRANSACTION FILE**   SAMPS043
00941 ** IS INDEXED BY A FIELD (SEQ-NMBR) WHICH IS THE KEY USED    **   SAMPS043
00942 ** DURING THE READ OF THE VSAM FILE.  THE VALUE OF THE SELECT**   SAMPS043
00943 ** RECORD NUMBER (SL-REC-NUM) IS MOVED TO (SEQ-NMBR) AND THE **   SAMPS043
00944 ** RECORD ON THE TRANSACTION FILE FOR THAT RECORD NUMBER IS  **   SAMPS043
00945 ** READ AND PROCESSED.  FOR THE RECORDS THAT HAVE BEEN       **   SAMPS043
00946 ** SELECTED FROM THE TRANSACTION FILE, THE SELECTED-FLAG     **   SAMPS043
00947 ** FIELD IS CHANGED TO A 2, AND THE RECORD IS WRITTEN TO THE **   SAMPS043
00948 ** DISK FILE (HIT-FILE).  THIS SAME RECORD IS WRITTEN TO A   **   SAMPS043
00949 ** HIT FILE LISTING (HIT-LIST) AND A CODING SHEET OUTPUT     **   SAMPS043
00950 ** REPORT (CHECK-LIST).  THIS PROCESSING IS CONTINUED UNTIL  **   SAMPS043
00951 ** EACH RECORD FROM THE SELECT-FILE HAS BEEN READ.           **   SAMPS043
00952 ***************************************************************   SAMPS043
00953  0500-SELECT-RECORDS.                                             SAMPS043
00954                                                                   SAMPS043
00955      READ SELECT-FILE                                             SAMPS043
00956         AT END MOVE 'Y' TO WS-SELECT-EOF.                         SAMPS043
00957      IF WS-SELECT-EOF = 'Y'                                       SAMPS043
00958           AND MATCH-CNTR NOT EQUAL TO SAMPLED-NMBR                SAMPS043
00959         DISPLAY 'RECORDS SELECTED NE TO RECORDS DESIRED'          SAMPS043
00960         MOVE MESSAGE-1   TO WS-MESSAGE-FILE                       SAMPS043
00961         PERFORM 9999-CLOSE-FILES                                  SAMPS043
00962         STOP RUN.                                                 SAMPS043
00963                                                                   SAMPS043
00964      IF WS-SELECT-EOF = 'Y'                                       SAMPS043
00965           AND MATCH-CNTR EQUAL TO SAMPLED-NMBR                    SAMPS043
00966         WRITE CHECK-LIST-REC FROM WS-FOOTNOTE-AREA                SAMPS043
00967             AFTER ADVANCING 1 LINE                                SAMPS043
00968         MOVE MESSAGE-1   TO WS-MESSAGE-FILE                       SAMPS043
00969         PERFORM 9999-CLOSE-FILES                                  SAMPS043
00970         STOP RUN.                                                 SAMPS043
00971                                                                   SAMPS043
00972      IF WS-SELECT-EOF NOT EQUAL 'Y'                               SAMPS043
00973         ADD 1           TO MATCH-CNTR                             SAMPS043
00974         MOVE SL-REC-NUM TO SEQ-NMBR                               SAMPS043
00975         READ TRANS-FILE RECORD INTO WS-MATCH-RECORD.              SAMPS043
00976                                                                   SAMPS043
00977             IF WS-HIT-LIST-SWITCH = '0'                           SAMPS043
00978                 PERFORM 0400-HIT-LIST-HEADING                     SAMPS043
00979                        THRU 0400-HIT-LIST-EXIT.                   SAMPS043
00980                                                                   SAMPS043
00981             IF WS-CHECKLIST-SWITCH = '0'                          SAMPS043
00982                 PERFORM 0405-CHECKLIST-HEADER-RTN                 SAMPS043
00983                        THRU 0405-CHECKLIST-HEADER-EXIT.           SAMPS043
00984                                                                   SAMPS043
00985                 PERFORM 0600-PRINT-HIT-RECS                       SAMPS043
00986                        THRU 0600-PRINT-EXIT.                      SAMPS043
00987                 MOVE SELECTED-FLAG  TO SELECT-FLAG.               SAMPS043
00988                 MOVE SELECTED-FLAG  TO MATCH-SELECT-FLAG.         SAMPS043
00989                 REWRITE TRANS-REC.                                SAMPS043
00990                                                                   SAMPS043
00991  0500-SELECT-RECS-EXIT.                                           SAMPS043
00992      EXIT.                                                        SAMPS043
00993                                                                   SAMPS043
00994                                                                   SAMPS043
00995 ***************************************************************   SAMPS043
00996 ** 0600-PRINT-HIT-RECS.                                      **   SAMPS043
00997 ** THIS ROUTINE MOVES THE INFORMATION REQUIRED TO EACH OF THE**   SAMPS043
00998 ** FOLLOWING OUTPUT FILES:  HIT-FILE, HIT-LIST, AND CHECK-   **   SAMPS043
00999 ** LIST.  THE ROUTINE ALSO CONTROLS LINE COUNT, AND HEADER   **   SAMPS043
01000 ** GENERATION FOR THE HIT-LIST, AND CHECK-LIST.              **   SAMPS043
01001 ***************************************************************   SAMPS043
01002  0600-PRINT-HIT-RECS.                                             SAMPS043
01003                                                                   SAMPS043
01004      MOVE '1'                  TO WS-CHECKLIST-SWITCH.            SAMPS043
01005      MOVE '1'                  TO WS-HIT-LIST-SWITCH.             SAMPS043
01006      MOVE MATCH-CNTR           TO DTL-CASE-NO.                    SAMPS043
01007      MOVE MATCH-SEQ-NMBR       TO DTL-SEQ-NMBR.                   SAMPS043
01008      MOVE MATCH-EMP-ID         TO DTL-EMP-ID.                     SAMPS043
01009      MOVE MATCH-DATE-CREATED   TO DTL-DATE-CREATED.               SAMPS043
01010      MOVE CNTRL-YEAR-QTR       TO WS-PERIOD-DATE.                 SAMPS043
01011      MOVE WS-CHECKLIST-YEAR    TO FL-YEAR.                        SAMPS043
01012      MOVE WS-CHECKLIST-QUARTER TO FL-QUARTER.                     SAMPS043
01013      MOVE MATCH-TAX-DUE        TO DTL-TAX-DUE.                    SAMPS043
01014      MOVE MATCH-TAX-PAID       TO DTL-TAX-PAID.                   SAMPS043
01015      MOVE DTL-CREATED-YR       TO O-CREATED-YR.                   SAMPS043
01016      MOVE DTL-CREATED-MO       TO O-CREATED-MO.                   SAMPS043
01017      MOVE DTL-CREATED-DA       TO O-CREATED-DA.                   SAMPS043
01018      MOVE CNTRL-TYPE           TO HIT-RECORD-TYPE.                SAMPS043
01019      MOVE SESA-ID              TO HIT-STATE.                      SAMPS043
01020      MOVE MATCH-CNTR           TO HIT-CASE-NUMBER.                SAMPS043
01021      MOVE MATCH-TRANS-TYPE     TO HIT-TRANS-TYPE.                 SAMPS043
01022      MOVE MATCH-EMP-ID         TO HIT-EMPLOYER-ID.                SAMPS043
01023      MOVE CNTRL-YEAR-QTR       TO HIT-SAMPLE-YEAR.                SAMPS043
01024      MOVE SAMPLE-TYPE          TO HIT-SAMPLE-TYPE.                SAMPS043
01025      MOVE MATCH-CNTR           TO WS-CASE-HOLD-AREA.              SAMPS043
01026      MOVE WS-CASE-HOLD-AREA    TO DL-CHECKLIST-CASE-NO.           SAMPS043
01027      MOVE MATCH-EMP-ID         TO WS-EMPL-HOLD-AREA.              SAMPS043
01028      MOVE WS-EMPL-HOLD-AREA    TO DL-CHECKLIST-EMP-ID.            SAMPS043
01029      ADD 1                     TO LIST-COUNTER.                   SAMPS043
01030      IF LIST-COUNTER > 50                                         SAMPS043
01031          MOVE 1    TO LIST-COUNTER                                SAMPS043
01032          PERFORM 0400-HIT-LIST-HEADING                            SAMPS043
01033                THRU 0400-HIT-LIST-EXIT.                           SAMPS043
01034      WRITE PRINT-HIT-REC FROM HIT-LIST-REC.                       SAMPS043
01035                                                                   SAMPS043
01036      MOVE DTL-CASE-NO         TO EXP-CASE-NO.                     SAMPS043
01037      MOVE DTL-EMP-ID (7:6)    TO EXP-EMP-ID.                      SAMPS043
01038      MOVE DTL-TAX-DUE         TO EXP-TAX-DUE.                     SAMPS043
01039      MOVE DTL-TAX-PAID        TO EXP-TAX-PAID.                    SAMPS043
01040      MOVE DTL-CREATED-MO      TO EXP-MO.                          SAMPS043
01041      MOVE DTL-CREATED-DA      TO EXP-DA.                          SAMPS043
01042      MOVE DTL-CREATED-YR      TO EXP-YR.                          SAMPS043
01043      MOVE DTL-SEQ-NMBR        TO EXP-SEQ-NMBR.                    SAMPS043
01044      WRITE EXPORT-REC         FROM WRK-EXPORT-REC.                SAMPS043
01045                                                                   SAMPS043
01046      PERFORM 0700-CHECKLIST-ROUTINE                               SAMPS043
01047            THRU 0700-CHECKLIST-EXIT.                              SAMPS043
01048      WRITE TRANS-HIT-REC FROM OUTPUT-HIT-REC.                     SAMPS043
01049                                                                   SAMPS043
01050  0600-PRINT-EXIT.                                                 SAMPS043
01051      EXIT.                                                        SAMPS043
01052                                                                   SAMPS043
01053 *******************************************************           SAMPS043
01054 ***                                                 ***           SAMPS043
01055 ** 0700-CHECKLIST-ROUTINE.                           **           SAMPS043
01056 ** THIS SECTION CONTROLS THE PROCESSING OF THE       **           SAMPS043
01057 ** CHECK-LIST REPORT.                                **           SAMPS043
01058 ***                                                 ***           SAMPS043
01059 *******************************************************           SAMPS043
01060  0700-CHECKLIST-ROUTINE.                                          SAMPS043
01061                                                                   SAMPS043
01062      ADD 1    TO WS-CHECKLIST-CNTR.                               SAMPS043
01063      IF WS-CHECKLIST-CNTR > 20                                    SAMPS043
01064         WRITE CHECK-LIST-REC FROM WS-FOOTNOTE-AREA                SAMPS043
01065             AFTER ADVANCING 1 LINE                                SAMPS043
01066         MOVE 1    TO WS-CHECKLIST-CNTR                            SAMPS043
01067         PERFORM 0405-CHECKLIST-HEADER-RTN                         SAMPS043
01068               THRU 0405-CHECKLIST-HEADER-EXIT                     SAMPS043
01069      ELSE                                                         SAMPS043
01070          NEXT SENTENCE.                                           SAMPS043
01071      WRITE CHECK-LIST-REC FROM DL-CHECKLIST-DETAIL                SAMPS043
01072          AFTER ADVANCING 1 LINE.                                  SAMPS043
01073      WRITE CHECK-LIST-REC FROM DL-BANNER-LINE                     SAMPS043
01074          AFTER ADVANCING 1 LINE.                                  SAMPS043
01075                                                                   SAMPS043
01076  0700-CHECKLIST-EXIT.                                             SAMPS043
01077      EXIT.                                                        SAMPS043
01078                                                                   SAMPS043
01079 ***************************************************************   SAMPS043
01080 ***                                                         ***   SAMPS043
01081 ** 9999-CLOSE-FILES.                                         **   SAMPS043
01082 ** THIS SECTION WRITES AN END OF JOB MESSAGE, AND CLOSES THE **   SAMPS043
01083 ** INPUT FILES: SELECT-FILE, CNTRL-DATA, AND INPUT/OUTPUT    **   SAMPS043
01084 ** FILE TRANS-FILE.  THE FOLLOWING OUTPUT FILES ARE ALSO     **   SAMPS043
01085 ** CLOSED: JOB-STATUS, HIT-FILE, HIT-LIST, CHECK-LIST.       **   SAMPS043
01086 ***                                                         ***   SAMPS043
01087 ***************************************************************   SAMPS043
01088  9999-CLOSE-FILES.                                                SAMPS043
01089                                                                   SAMPS043
01090      WRITE MESSAGE-RECORD FROM WS-EOJ-DETAIL-LINE.                SAMPS043
01091      CLOSE SELECT-FILE                                            SAMPS043
01092      CLOSE CNTRL-DATA                                             SAMPS043
01093      CLOSE TRANS-FILE                                             SAMPS043
01094      CLOSE JOB-STATUS                                             SAMPS043
01095      CLOSE HIT-FILE                                               SAMPS043
01096      CLOSE HIT-LIST                                               SAMPS043
01097      CLOSE EXPORT                                                 SAMPS043
01098      CLOSE CHECK-LIST.                                            SAMPS043
01099  9999-EXIT.                                                       SAMPS043
01100      EXIT.                                                        SAMPS043
