Appendix 2: Employment Variable Creation

Main Employment Program, Creation of Variables Linked to Past Rounds Section

Return to Appendix 2 main file


***********************************************************************

** Preliminary steps for linking current round information with data from previous rounds    **

***********************************************************************

 

***************************
** Calulate Age 18 year **
***************************;

AGE18YR=birthyr+18;

if age18yr=1997 then ag18jan=888;
if age18yr=1998 then ag18jan=940;
if age18yr=1999 then ag18jan=992;
if age18yr=2000 then ag18jan=1044;
if age18yr=2001 then ag18jan=1097;
if age18yr=2002 then ag18jan=1149;
if age18yr=2003 then ag18jan=1200;

 

  /* Define the following c.v.'s to match up the array sizes, they are zero by definition. */

  r1wks99=0; r1wks00=0; r1wks01=0; r1wks02=0; r1wks03=0; r1wks04=0;

  r2wks00=0; r2wks01=0; r2wks02=0; r2wks03=0; r2wks04=0;

  r3wks01=0; r3wks02=0; r3wks03=0; r3wks04=0;

  r4wks02=0; r4ewks02=0; r4swks02=0; r4wks03=0; r4ewks03=0; r4swks03=0; r4wks04=0; r4ewks04=0; r4swks04=0;

  r5wks03=0; r5ewks03=0; r5swks03=0; r5wks04=0; r5ewks04=0; r5swks04=0;

  r6wks04=0; r6ewks04=0; r6swks04=0;

 

 

  array r1wks  (i) r1wks80-r1wks99   r1wks00-r1wks04; /* Round 1 created variable */

  array r2wks  (i) r2wks80-r2wks99   r2wks00-r2wks04; /* Round 2 created variable */

  array r3wks  (i) r3wks80-r3wks99   r3wks00-r3wks04; /* Round 3 created variable */

 

  array r4wks  (i) r4wks80-r4wks99   r4wks00-r4wks04; /* Round 4 created variable, all jobs */

  array r4ewks (i) r4ewks80-r4ewks99 r4ewks00-r4ewks04;   /* Round 4 created variable, employee jobs*/

  array r4swks (i) r4swks80-r4swks99 r4swks00-r4swks04;   /* Round 4 created variable, self-employed jobs */

 

  array r5wks  (i) r5wks80-r5wks99   r5wks00-r5wks04;     /* Round 5 created variable, all jobs */

  array r5ewks (i) r5ewks80-r5ewks99 r5ewks00-r5ewks04;   /* Round 5 created variable, employee jobs */

  array r5swks (i) r5swks80-r5swks99 r5swks00-r5swks04;   /* Round 5 created variable, self-employed jobs */

 

  array r6wks  (i) r6wks80-r6wks99    r6wks00-r6wks04;    /* Round 6 created variable, all jobs */

  array r6ewks (i) r6ewks80-r6ewks99  r6ewks00-r6ewks04;  /* Round 6 created variable, employee jobs */

  array r6swks (i) r6swks80-r6swks99  r6swks00-r6swks04;  /* Round 6 created variable, self-employed jobs */

 

  array r7wks  (i) r7wks80-r7wks99   r7wks00-r7wks04;     /*number of weeks worked in each year for all jobs);*/

  array r7swks (i) r7swks80-r7swks99 r7swks00-r7swks04;   /*number of weeks worked in each year for employ type jobs);*/

  array r7ewks (i) r7ewks80-r7ewks99 r7ewks00-r7ewks04;   /*number of weeks worked in each year self-employed*/

 

  array twks  (i) twks80-twks99      twks00-twks04;       /* Total created variable, all jobs */

  array tewks (i) tewks80-tewks99    tewks00-tewks04;     /* Total created variable, employee jobs  */

  array tswks (i) tswks80-tswks99    tswks00-tswks04;     /* Total created variable, self-employed jobs */

 

 

  /* 4-16-04 These people backreported on a military job. The problem is that the backreporting skips them into the

  bottom calculation of the c.v.'s, so their "back" is set back to "." */

 

  array br (i) br1-br10;

  array milflag (i) milflag1-milflag10;

  do over br;

     if br=1 and milflag=1 then do;

      flagmi=1;

      back=.;

     end;

  end;

 

 

  /* Begin by splitting up periods where Round5 the dli c.v. exclusively collect weeks worked information.

  Define the dli interview year as the split. By construction, any weeks worked information collected

  before the dli interview week should be independent of information collected in Round6.  */

  /* 4-11-04 For the new Round 7 c.v.'s, we are assuming that all dli jobs are employee-type jobs.

  Thus, dli information

  will be added to the "all jobs" and "employee jobs" c.v.'s but not "self-employed jobs"  c.v.'s. */

 

  do over r7wks;

     twks=0;

     tswks=0;

     tewks=0;

     if r7wks>0 then do;

        twks=r7wks;

     end;

     if r7swks>0 then do;

        tswks=r7swks;

     end;

     if r7ewks>0 then do;

        tewks=r7ewks;

     end;

 

   /* dli is Round 6 */

    if r6wks>0 and dliwk=r6int then do;

        twks=r6wks;

     end;

     if r6swks>0 and dliwk=r6int then do;

        tswks=r6swks;

     end;

     if r6ewks>0 and dliwk=r6int then do;

        tewks=r6ewks;

     end;

     if r6wks>0 and r7wks>0 and dliwk=r6int then do;

        twks=r6wks+r7wks;

     end;

     if r6swks>0 and r7swks>0 and dliwk=r6int then do;

        tswks=r6swks+r7swks;

     end;

     if r6ewks>0 and r7ewks>0 and dliwk=r6int then do;

        tewks=r6ewks+r7ewks;

     end;

 

 

   /* 4-19-04 dli is Round 5 */

    if r5wks>0 and dliwk=r5int then do;

        twks=r5wks;

     end;

     if r5swks>0 and dliwk=r5int then do;

        tswks=r5swks;

     end;

     if r5ewks>0 and dliwk=r5int then do;

        tewks=r5ewks;

     end;

     if r5wks>0 and r7wks>0 and dliwk=r5int then do;

        twks=r5wks+r7wks;

     end;

     if r5swks>0 and r7swks>0 and dliwk=r5int then do;

        tswks=r5swks+r7swks;

     end;

     if r5ewks>0 and r7ewks>0 and dliwk=r5int then do;

        tewks=r5ewks+r7ewks;

     end;

 

 

     /* 4-19-04 dli is Round 4 */

     if r4wks>0 and dliwk=r4int then do;

        twks=r4wks;

     end;

     if r4swks>0 and dliwk=r4int then do;

        tswks=r4swks;

     end;

     if r4ewks>0 and dliwk=r4int then do;

        tewks=r4ewks;

     end;

     if r4wks>0 and r7wks>0 and dliwk=r4int then do;

        twks=r4wks+r7wks;

     end;

     if r4swks>0 and r7swks>0 and dliwk=r4int then do;

        tswks=r4swks+r7swks;

     end;

     if r4ewks>0 and r7ewks>0 and dliwk=r4int then do;

        tewks=r4ewks+r7ewks;

     end;

 

     /* 4-19-04 dli is Round 3 */

     if r3wks>0 and dliwk=r3int then do;

        twks=r3wks;

        tewks=r3wks;

     end;

     if r3wks>0 and r7wks>0 and dliwk=r3int then do;

        twks=r3wks+r7wks;

     end;

     if r3wks>0 and r7ewks>0 and dliwk=r3int then do;

        tewks=r3wks+r7ewks;

     end;

 

     /* 4-19-04 dli is Round 2 */

     if r2wks>0 and dliwk=r2int then do;

        twks=r2wks;

        tewks=r2wks;

     end;

     if r2wks>0 and r7wks>0 and dliwk=r2int then do;

        twks=r2wks+r7wks;

     end;

     if r2wks>0 and r7ewks>0 and dliwk=r2int then do;

        tewks=r2wks+r7ewks;

     end;

 

     /* 4-19-04 dli is Round 1 */

     if r1wks>0 and dliwk=r1int then do;

        twks=r1wks;

        tewks=r1wks;

     end;

     if r1wks>0 and r7wks>0 and dliwk=r1int then do;

        twks=r1wks+r7wks;

     end;

     if r1wks>0 and r7ewks>0 and dliwk=r1int then do;

        tewks=r1wks+r7ewks;

     end;

  end;

 

 

  /* 4-19-04 This section is written for the backreporters. We load in the weeks array from the Round 6 c.v.'s and

  use it to update the corresponding Round 7 array. */

 

  array alljobs  (i) wks1-wks1280;  /*  form R7 status array emp29_numwks*/

  array selfjobs (i) swks1-swks1280; /* form R7 selfemp status array emp29_numwks*/

  array empjobs  (i) ewks1-ewks1280; /* form R7 emp status array emp29_numwks*/

 

 

  array r6ar  (i) r6w0001-r6w1253 r6w1254-r6w1280;    /*  R1-R6 tnwksa weeks status array  */

  array r6sar (i) r6s0001-r6s1253 r6s1254-r6s1280;  /*  R1-R6 tnwksa weeks selfemp status  array */

  array r6ear (i) r6e0001-r6e1253 r6e1254-r6e1280;  /*  R1-R6 tnwksa weeks emp status array */

 

  if back=1 then do;

 

  do over alljobs;

    if r6ar=1 then do;

       alljobs=r6ar;

    end;

    if r6ear=1 then do;

       empjobs=r6ear;

    end;

 

    if r6ar=1 and r6sar=0 and r6ear=0 then do;

       empjobs=r6ar;

    end;

 

    if r6sar=1 then do;

       selfjobs=r6sar;

    end;

 

    if r6ar=-3 and alljobs=0 then do;

       alljobs=r6ar;

    end;

    if r6ear=-3 and empjobs=0 and r6sar=0 then do;

       empjobs=r6ar;

    end;

  end;

 

 

  twks90=0;

  tswks90=0;

  tewks90=0;

 

  do i=523 to 574;

     if alljobs=1 then do;

        twks90=twks90+1;

     end;

     if selfjobs=1 then do;

        tswks90=tswks90+1;

     end;

     if empjobs=1 then do;

        tewks90=tewks90+1;

     end;

  end;

  do i=523 to 574;

     if alljobs=-3 then do;

        twks90=-3;

     end;

     if selfjobs=-3 then do;

        tswks90=-3;

     end;

     if empjobs=-3 then do;

        tewks90=-3;

     end;

  end;

 

 

 

  twks91=0;

  tswks91=0;

  tewks91=0;

 

  do i=575 to 626;

     if alljobs=1 then do;

        twks91=twks91+1;

     end;

     if selfjobs=1 then do;

        tswks91=tswks91+1;

     end;

     if empjobs=1 then do;

        tewks91=tewks91+1;

     end;

  end;

  do i=575 to 626;

     if alljobs=-3 then do;

        twks91=-3;

     end;

     if selfjobs=-3 then do;

        tswks91=-3;

     end;

     if empjobs=-3 then do;

        tewks91=-3;

     end;

  end;

 

 

  twks92=0;

  tswks92=0;

  tewks92=0;

 

  do i=627 to 678;

     if alljobs=1 then do;

        twks92=twks92+1;

     end;

     if selfjobs=1 then do;

        tswks92=tswks92+1;

     end;

     if empjobs=1 then do;

        tewks92=tewks92+1;

     end;

  end;

  do i=627 to 678;

     if alljobs=-3 then do;

        twks92=-3;

     end;

     if selfjobs=-3 then do;

        tswks92=-3;

     end;

     if empjobs=-3 then do;

        tewks92=-3;

     end;

  end;

 

 

 

  twks93=0;

  tswks93=0;

  tewks93=0;

 

  do i=679 to 730;

     if alljobs=1 then do;

        twks93=twks93+1;

     end;

     if selfjobs=1 then do;

        tswks93=tswks93+1;

     end;

     if empjobs=1 then do;

        tewks93=tewks93+1;

     end;

  end;

  do i=679 to 730;

     if alljobs=-3 then do;

        twks93=-3;

     end;

     if selfjobs=-3 then do;

        tswks93=-3;

     end;

     if empjobs=-3 then do;

        tewks93=-3;

     end;

  end;

 

  /* 1994 */

 

  twks94=0;

  tswks94=0;

  tewks94=0;

 

  do i=731 to 783;

     if alljobs=1 then do;

        twks94=twks94+1;

     end;

     if selfjobs=1 then do;

        tswks94=tswks94+1;

     end;

     if empjobs=1 then do;

        tewks94=tewks94+1;

     end;

  end;

  do i=731 to 783;

     if alljobs=-3 then do;

        twks94=-3;

     end;

     if selfjobs=-3 then do;

        tswks94=-3;

     end;

     if empjobs=-3 then do;

        tewks94=-3;

     end;

  end;

 

  /* 1995 */

 

  twks95=0;

  tswks95=0;

  tewks95=0;

 

  do i=784 to 835;

     if alljobs=1 then do;

        twks95=twks95+1;

     end;

     if selfjobs=1 then do;

        tswks95=tswks95+1;

     end;

     if empjobs=1 then do;

        tewks95=tewks95+1;

     end;

  end;

  do i=784 to 835;

     if alljobs=-3 then do;

        twks95=-3;

     end;

     if selfjobs=-3 then do;

        tswks95=-3;

     end;

     if empjobs=-3 then do;

        tewks95=-3;

     end;

  end;

 

  /* 1996 */

 

  twks96=0;

  tswks96=0;

  tewks96=0;

 

  do i=836 to 887;

     if alljobs=1 then do;

        twks96=twks96+1;

     end;

     if selfjobs=1 then do;

        tswks96=tswks96+1;

     end;

     if empjobs=1 then do;

        tewks96=tewks96+1;

     end;

  end;

  do i=836 to 887;

     if alljobs=-3 then do;

        twks96=-3;

     end;

     if selfjobs=-3 then do;

        tswks96=-3;

     end;

     if empjobs=-3 then do;

        tewks96=-3;

     end;

  end;

 

  /* 1997 */

 

  twks97=0;

  tswks97=0;

  tewks97=0;

 

  do i=888 to 939;

     if alljobs=1 then do;

        twks97=twks97+1;

     end;

     if selfjobs=1 then do;

        tswks97=tswks97+1;

     end;

     if empjobs=1 then do;

        tewks97=tewks97+1;

     end;

  end;

  do i=888 to 939;

     if alljobs=-3 then do;

        twks97=-3;

     end;

     if selfjobs=-3 then do;

        tswks97=-3;

     end;

     if empjobs=-3 then do;

        tewks97=-3;

     end;

  end;

 

  /* 1998 */

 

  twks98=0;

  tswks98=0;

  tewks98=0;

 

  do i=940 to 991;

     if alljobs=1 then do;

        twks98=twks98+1;

     end;

     if selfjobs=1 then do;

        tswks98=tswks98+1;

     end;

     if empjobs=1 then do;

        tewks98=tewks98+1;

     end;

  end;

  do i=940 to 991;

     if alljobs=-3 then do;

        twks98=-3;

     end;

     if selfjobs=-3 then do;

        tswks98=-3;

     end;

     if empjobs=-3 then do;

        tewks98=-3;

     end;

  end;

 

  /* 1999 */

 

  twks99=0;

  tswks99=0;

  tewks99=0;

 

  do i=992 to 1043;

     if alljobs=1 then do;

        twks99=twks99+1;

     end;

     if selfjobs=1 then do;

        tswks99=tswks99+1;

     end;

     if empjobs=1 then do;

        tewks99=tewks99+1;

     end;

  end;

  do i=992 to 1043;

     if alljobs=-3 then do;

        twks99=-3;

     end;

     if selfjobs=-3 then do;

        tswks99=-3;

     end;

     if empjobs=-3 then do;

        tewks99=-3;

     end;

  end;

 

  /* 2000 */

 

  twks00=0;

  tswks00=0;

  tewks00=0;

 

  do i=1044 to 1096;

     if alljobs=1 then do;

        twks00=twks00+1;

     end;

     if selfjobs=1 then do;

        tswks00=tswks00+1;

     end;

     if empjobs=1 then do;

        tewks00=tewks00+1;

     end;

  end;

  do i=1044 to 1096;

     if alljobs=-3 then do;

        twks00=-3;

     end;

     if selfjobs=-3 then do;

        tswks00=-3;

     end;

     if empjobs=-3 then do;

        tewks00=-3;

     end;

  end;

 

  /* 2001 */

 

  twks01=0;

  tswks01=0;

  tewks01=0;

 

  do i=1097 to 1148;

     if alljobs=1 then do;

        twks01=twks01+1;

     end;

     if selfjobs=1 then do;

        tswks01=tswks01+1;

     end;

     if empjobs=1 then do;

        tewks01=tewks01+1;

     end;

  end;

  do i=1097 to 1148;

     if alljobs=-3 then do;

        twks01=-3;

     end;

     if selfjobs=-3 then do;

        tswks01=-3;

     end;

     if empjobs=-3 then do;

        tewks01=-3;

     end;

  end;

 

  /* 2002 */

 

  twks02=0;

  tswks02=0;

  tewks02=0;

 

  do i=1149 to 1200;

     if alljobs=1 then do;

        twks02=twks02+1;

     end;

     if selfjobs=1 then do;

        tswks02=tswks02+1;

     end;

     if empjobs=1 then do;

        tewks02=tewks02+1;

     end;

  end;

  do i=1149 to 1200;

     if alljobs=-3 then do;

        twks02=-3;

     end;

     if selfjobs=-3 then do;

        tswks02=-3;

     end;

     if empjobs=-3 then do;

        tewks02=-3;

     end;

  end;

 

    /* 2003 */

 

  twks03=0;

  tswks03=0;

  tewks03=0;

 

  do i=1201 to 1252;

     if alljobs=1 then do;

        twks03=twks03+1;

     end;

     if selfjobs=1 then do;

        tswks03=tswks03+1;

     end;

     if empjobs=1 then do;

        tewks03=tewks03+1;

     end;

  end;

  do i=1201 to 1252;

     if alljobs=-3 then do;

        twks03=-3;

     end;

     if selfjobs=-3 then do;

        tswks03=-3;

     end;

     if empjobs=-3 then do;

        tewks03=-3;

     end;

  end;

 

    /* 2004 */

 

  twks04=0;

  tswks04=0;

  tewks04=0;

 

  do i=1253 to 1280;

     if alljobs=1 then do;

        twks04=twks04+1;

     end;

     if selfjobs=1 then do;

        tswks04=tswks04+1;

     end;

     if empjobs=1 then do;

        tewks04=tewks04+1;

     end;

  end;

  do i=1253 to 1280;

     if alljobs=-3 then do;

        twks04=-3;

     end;

     if selfjobs=-3 then do;

        tswks04=-3;

     end;

     if empjobs=-3 then do;

        tewks04=-3;

     end;

  end;

  end;

 

  /* If either created variable from Round 7 or dli is a -2 or -3,

  then the overall created variable will be -2 or -3,

  respectively. */

  do over r7wks;

     if r7wks in (-1,-2,-3) then do;

        twks=-3;

     end;

     if r7swks in (-1,-2,-3) then do;

        tswks=-3;

     end;

     if r7ewks in (-1,-2,-3) then do;

        tewks=-3;

     end;

 

     if r6wks in (-1,-2,-3) and dliwk=r6int then do;

        twks=-3;

     end;

     if r6swks in (-1,-2,-3) and dliwk=r6int then do;

        tswks=-3;

     end;

     if r6ewks in (-1,-2,-3) and dliwk=r6int then do;

        tewks=-3;

     end;

 

     if r5wks in (-1,-2,-3) and dliwk=r5int then do;

        twks=-3;

     end;

     if r5swks in (-1,-2,-3) and dliwk=r5int then do;

        tswks=-3;

     end;

     if r5ewks in (-1,-2,-3) and dliwk=r5int then do;

        tewks=-3;

     end;

 

     if r4wks in (-1,-2,-3) and dliwk=r4int then do;

        twks=-3;

     end;

     if r4swks in (-1,-2,-3) and dliwk=r4int then do;

        tswks=-3;

     end;

     if r4ewks in (-1,-2,-3) and dliwk=r4int then do;

        tewks=-3;

     end;

     if r3wks in (-1,-2,-3) and dliwk=r3int then do;

        twks=-3;

        tewks=-3;

     end;

     if r2wks in (-1,-2,-3) and dliwk=r2int then do;

        twks=-3;

        tewks=-3;

     end;

     if r1wks in (-1,-2,-3) and dliwk=r1int then do;

        twks=-3;

        tewks=-3;

     end;

  end;

 

  /* Round 7 non-interview cases */

  do over twks;

     if r7int=-5 then do;

        twks=-5;

        tswks=-5;

        tewks=-5;

     end;

  end;

 

Return to top


 

*****************************************************************************************

**  Weeks Worked at Employee Job #x during 19xx/20xx

*****************************************************************************************

**  This program connects the Round7 and dli created variables for number of weeks worked at job x during year. **

  Variables Created:    twks**_nn                                         CV_WKSWK_JOB_YR.nn.**

  (** refers to the year number; "nn" refers to the job number.)

*****************************************************************************************;

 

 

  /* Arrange the jobs by year for Round 7 and for total c.v. */

  array r7wks  r7w80_1-r7w80_10 r7w81_1-r7w81_10 r7w82_1-r7w82_10 r7w83_1-r7w83_10 r7w84_1-r7w84_10

               r7w85_1-r7w85_10 r7w86_1-r7w86_10 r7w87_1-r7w87_10 r7w88_1-r7w88_10 r7w89_1-r7w89_10

               r7w90_1-r7w90_10 r7w91_1-r7w91_10 r7w92_1-r7w92_10 r7w93_1-r7w93_10 r7w94_1-r7w94_10

               r7w95_1-r7w95_10 r7w96_1-r7w96_10 r7w97_1-r7w97_10 r7w98_1-r7w98_10 r7w99_1-r7w99_10

               r7w00_1-r7w00_10 r7w01_1-r7w01_10 r7w02_1-r7w02_10 r7w03_1-r7w03_10 r7w04_1-r7w04_10;

 

  array twks   twk80_1-twk80_10 twk81_1-twk81_10 twk82_1-twk82_10 twk83_1-twk83_10 twk84_1-twk84_10

               twk85_1-twk85_10 twk86_1-twk86_10 twk87_1-twk87_10 twk88_1-twk88_10 twk89_1-twk89_10

               twk90_1-twk90_10 twk91_1-twk91_10 twk92_1-twk92_10 twk93_1-twk93_10 twk94_1-twk94_10

               twk95_1-twk95_10 twk96_1-twk96_10 twk97_1-twk97_10 twk98_1-twk98_10 twk99_1-twk99_10

               twk00_1-twk00_10 twk01_1-twk01_10 twk02_1-twk02_10 twk03_1-twk03_10 twk04_1-twk04_10;

 

 

  /* Initialize total weeks count to zero, Initialize the "total" variables by the round 7 created variables */

  do over twks;

    twks=0;

    if r7int=-5 then twks=-5;

    if r7wks=>0 then twks=r7wks;

    if -4<r7wks<0 then twks=-3;

  end;

 

 

  /* When matching jobs from a dli Round to Round 7, we only need to worry about jobs in Round 7 with a UID not

  beginning with "2004" since only those jobs could have been worked in both rounds. */

  /* Define "mat1_4" as the dummy variable that equals 1 when the first job in the last round and the fourth job in the

  current round Roster have the same UID. */

  /* If UID from the dli Round matches with UID in Round 7 */

 

  array match1 (i) match1_1-match1_10;

  array match2 (i) match2_1-match2_10;

  array match3 (i) match3_1-match3_10;

  array match4 (i) match4_1-match4_10;

  array match5 (i) match5_1-match5_10;

  array match6 (i) match6_1-match6_10;

  array match7 (i) match7_1-match7_10;

  array match8 (i) match8_1-match8_10;

  array match9 (i) match9_1-match9_10;

  array match10 (i) match10_1-match10_10;

  array match11 (i) match11_1-match11_10;

  array r7uid   (i) uid01-uid10;

 

  array r7wks80 (i) r7w80_1 r7w80_2 r7w80_3 r7w80_4 r7w80_5 r7w80_6 r7w80_7 r7w80_8 r7w80_9 r7w80_10;

  array r7wks81 (i) r7w81_1 r7w81_2 r7w81_3 r7w81_4 r7w81_5 r7w81_6 r7w81_7 r7w81_8 r7w81_9 r7w81_10;

  array r7wks82 (i) r7w82_1 r7w82_2 r7w82_3 r7w82_4 r7w82_5 r7w82_6 r7w82_7 r7w82_8 r7w82_9 r7w82_10;

  array r7wks83 (i) r7w83_1 r7w83_2 r7w83_3 r7w83_4 r7w83_5 r7w83_6 r7w83_7 r7w83_8 r7w83_9 r7w83_10;

  array r7wks84 (i) r7w84_1 r7w84_2 r7w84_3 r7w84_4 r7w84_5 r7w84_6 r7w84_7 r7w84_8 r7w84_9 r7w84_10;

  array r7wks85 (i) r7w85_1 r7w85_2 r7w85_3 r7w85_4 r7w85_5 r7w85_6 r7w85_7 r7w85_8 r7w85_9 r7w85_10;

  array r7wks86 (i) r7w86_1 r7w86_2 r7w86_3 r7w86_4 r7w86_5 r7w86_6 r7w86_7 r7w86_8 r7w86_9 r7w86_10;

  array r7wks87 (i) r7w87_1 r7w87_2 r7w87_3 r7w87_4 r7w87_5 r7w87_6 r7w87_7 r7w87_8 r7w87_9 r7w87_10;

  array r7wks88 (i) r7w88_1 r7w88_2 r7w88_3 r7w88_4 r7w88_5 r7w88_6 r7w88_7 r7w88_8 r7w88_9 r7w88_10;

  array r7wks89 (i) r7w89_1 r7w89_2 r7w89_3 r7w89_4 r7w89_5 r7w89_6 r7w89_7 r7w89_8 r7w89_9 r7w89_10;

  array r7wks90 (i) r7w90_1 r7w90_2 r7w90_3 r7w90_4 r7w90_5 r7w90_6 r7w90_7 r7w90_8 r7w90_9 r7w90_10;

  array r7wks91 (i) r7w91_1 r7w91_2 r7w91_3 r7w91_4 r7w91_5 r7w91_6 r7w91_7 r7w91_8 r7w91_9 r7w91_10;

  array r7wks92 (i) r7w92_1 r7w92_2 r7w92_3 r7w92_4 r7w92_5 r7w92_6 r7w92_7 r7w92_8 r7w92_9 r7w92_10;

  array r7wks93 (i) r7w93_1 r7w93_2 r7w93_3 r7w93_4 r7w93_5 r7w93_6 r7w93_7 r7w93_8 r7w93_9 r7w93_10;

  array r7wks94 (i) r7w94_1 r7w94_2 r7w94_3 r7w94_4 r7w94_5 r7w94_6 r7w94_7 r7w94_8 r7w94_9 r7w94_10;

  array r7wks95 (i) r7w95_1 r7w95_2 r7w95_3 r7w95_4 r7w95_5 r7w95_6 r7w95_7 r7w95_8 r7w95_9 r7w95_10;

  array r7wks96 (i) r7w96_1 r7w96_2 r7w96_3 r7w96_4 r7w96_5 r7w96_6 r7w96_7 r7w96_8 r7w96_9 r7w96_10;

  array r7wks97 (i) r7w97_1 r7w97_2 r7w97_3 r7w97_4 r7w97_5 r7w97_6 r7w97_7 r7w97_8 r7w97_9 r7w97_10;

  array r7wks98 (i) r7w98_1 r7w98_2 r7w98_3 r7w98_4 r7w98_5 r7w98_6 r7w98_7 r7w98_8 r7w98_9 r7w98_10;

  array r7wks99 (i) r7w99_1 r7w99_2 r7w99_3 r7w99_4 r7w99_5 r7w99_6 r7w99_7 r7w99_8 r7w99_9 r7w99_10;

  array r7wks00 (i) r7w00_1 r7w00_2 r7w00_3 r7w00_4 r7w00_5 r7w00_6 r7w00_7 r7w00_8 r7w00_9 r7w00_10;

  array r7wks01 (i) r7w01_1 r7w01_2 r7w01_3 r7w01_4 r7w01_5 r7w01_6 r7w01_7 r7w01_8 r7w01_9 r7w01_10;

  array r7wks02 (i) r7w02_1 r7w02_2 r7w02_3 r7w02_4 r7w02_5 r7w02_6 r7w02_7 r7w02_8 r7w02_9 r7w02_10;

  array r7wks03 (i) r7w03_1 r7w03_2 r7w03_3 r7w03_4 r7w03_5 r7w03_6 r7w03_7 r7w03_8 r7w03_9 r7w03_10;

  array twks80  (i) twk80_1 twk80_2 twk80_3 twk80_4 twk80_5 twk80_6 twk80_7 twk80_8 twk80_9 twk80_10;

  array twks81  (i) twk81_1 twk81_2 twk81_3 twk81_4 twk81_5 twk81_6 twk81_7 twk81_8 twk81_9 twk81_10;

  array twks82  (i) twk82_1 twk82_2 twk82_3 twk82_4 twk82_5 twk82_6 twk82_7 twk82_8 twk82_9 twk82_10;

  array twks83  (i) twk83_1 twk83_2 twk83_3 twk83_4 twk83_5 twk83_6 twk83_7 twk83_8 twk83_9 twk83_10;

  array twks84  (i) twk84_1 twk84_2 twk84_3 twk84_4 twk84_5 twk84_6 twk84_7 twk84_8 twk84_9 twk84_10;

  array twks85  (i) twk85_1 twk85_2 twk85_3 twk85_4 twk85_5 twk85_6 twk85_7 twk85_8 twk85_9 twk85_10;

  array twks86  (i) twk86_1 twk86_2 twk86_3 twk86_4 twk86_5 twk86_6 twk86_7 twk86_8 twk86_9 twk86_10;

  array twks87  (i) twk87_1 twk87_2 twk87_3 twk87_4 twk87_5 twk87_6 twk87_7 twk87_8 twk87_9 twk87_10;

  array twks88  (i) twk88_1 twk88_2 twk88_3 twk88_4 twk88_5 twk88_6 twk88_7 twk88_8 twk88_9 twk88_10;

  array twks89  (i) twk89_1 twk89_2 twk89_3 twk89_4 twk89_5 twk89_6 twk89_7 twk89_8 twk89_9 twk89_10;

  array twks90  (i) twk90_1 twk90_2 twk90_3 twk90_4 twk90_5 twk90_6 twk90_7 twk90_8 twk90_9 twk90_10;

  array twks91  (i) twk91_1 twk91_2 twk91_3 twk91_4 twk91_5 twk91_6 twk91_7 twk91_8 twk91_9 twk91_10;

  array twks92  (i) twk92_1 twk92_2 twk92_3 twk92_4 twk92_5 twk92_6 twk92_7 twk92_8 twk92_9 twk92_10;

  array twks93  (i) twk93_1 twk93_2 twk93_3 twk93_4 twk93_5 twk93_6 twk93_7 twk93_8 twk93_9 twk93_10;

  array twks94  (i) twk94_1 twk94_2 twk94_3 twk94_4 twk94_5 twk94_6 twk94_7 twk94_8 twk94_9 twk94_10;

  array twks95  (i) twk95_1 twk95_2 twk95_3 twk95_4 twk95_5 twk95_6 twk95_7 twk95_8 twk95_9 twk95_10;

  array twks96  (i) twk96_1 twk96_2 twk96_3 twk96_4 twk96_5 twk96_6 twk96_7 twk96_8 twk96_9 twk96_10;

  array twks97  (i) twk97_1 twk97_2 twk97_3 twk97_4 twk97_5 twk97_6 twk97_7 twk97_8 twk97_9 twk97_10;

  array twks98  (i) twk98_1 twk98_2 twk98_3 twk98_4 twk98_5 twk98_6 twk98_7 twk98_8 twk98_9 twk98_10;

  array twks99  (i) twk99_1 twk99_2 twk99_3 twk99_4 twk99_5 twk99_6 twk99_7 twk99_8 twk99_9 twk99_10;

  array twks00  (i) twk00_1 twk00_2 twk00_3 twk00_4 twk00_5 twk00_6 twk00_7 twk00_8 twk00_9 twk00_10;

  array twks01  (i) twk01_1 twk01_2 twk01_3 twk01_4 twk01_5 twk01_6 twk01_7 twk01_8 twk01_9 twk01_10;

  array twks02  (i) twk02_1 twk02_2 twk02_3 twk02_4 twk02_5 twk02_6 twk02_7 twk02_8 twk02_9 twk02_10;

  array twks03  (i) twk03_1 twk03_2 twk03_3 twk03_4 twk03_5 twk03_6 twk03_7 twk03_8 twk03_9 twk03_10;

 

 

 

  do i=1 to 10;

     match1=0; match2=0; match3=0; match4=0; match5=0; match6=0; match7=0; match8=0; match9=0;

     match10=0; match11=0;

  end;

 

 

  /* If any UID from the first position in dli Round matches with any UID in Round 7 */

  /* Using match=round number to identify the most recent round when the match occurs */

  do over r7uid;

 

     if match1=0 and r6uid01>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid01=r7uid then do;

           match1=6;

        end;

     end;

 

     if match1=0 and r5uid1>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid1=r7uid then do;

           match1=5;

        end;

     end;

 

     if match1=0 and r4uid1>0 and r7uid>0  and r4int>0 and r7int>0 then do;

        if r4uid1=r7uid then do;

           match1=4;

        end;

     end;

 

     if match1=0 and r3uid1>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid1=r7uid then do;

           match1=3;

        end;

     end;

 

     if match1=0 and r2uid1>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid1=r7uid then do;

           match1=2;

        end;

     end;

 

     if match1=0 and r1uid1>0 and r7uid>0 and r7int>0 then do;

        if r1uid1=r7uid then do;

           match1=1;

        end;

     end;

  end;

 

 

 

  do over r7uid;

     if match1<6 and match2<6 and r6uid02>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid02=r7uid then do;

           match2=6; match1=0;

        end;

     end;

 

     if match1<5 and match2<5 and r5uid2>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid2=r7uid then do;

           match2=5; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and r4uid2>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid2=r7uid then do;

           match2=4; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and r3uid2>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid2=r7uid then do;

           match2=3; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and r2uid2>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid2=r7uid then do;

           match2=2; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and r1uid2>0 and r7uid>0 and r7int>0 then do;

        if r1uid2=r7uid then do;

           match2=1;

        end;

     end;

  end;

 

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and r6uid03>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid03=r7uid then do;

           match3=6; match2=0; match1=0;

        end;

     end;

 

      if match1<5 and match2<5 and match3<5 and r5uid3>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid3=r7uid then do;

           match3=5; match2=0; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and r4uid3>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid3=r7uid then do;

           match3=4; match2=0; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and r3uid3>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid3=r7uid then do;

           match3=3; match2=0; match1=0;

        end;

     end;

 

 

     if match1<2 and match2<2 and match3<2 and r2uid3>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid3=r7uid then do;

           match3=2; match2=0; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and r1uid3>0 and r7uid>0 and r7int>0 then do;

        if r1uid3=r7uid then do;

           match3=1;

        end;

     end;

  end;

 

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and

             r6uid04>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid04=r7uid then do;

           match4=6; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<5 and match2<5 and match3<5 and match4<5 and

             r5uid4>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid4=r7uid then do;

           match4=5; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and match4<4 and

         r4uid4>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid4=r7uid then do;

           match4=4; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and

         r3uid4>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid4=r7uid then do;

           match4=3; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and match3<2 and match4<2 and

         r2uid4>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid4=r7uid then do;

           match4=2; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and match4=0 and

         r1uid4>0 and r7uid>0 and r7int>0 then do;

        if r1uid4=r7uid then do;

           match4=1;

        end;

     end;

  end;

 

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and

        r6uid05>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid05=r7uid then do;

           match5=6; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<5 and match2<5 and match3<5 and match4<5 and match5<5 and

        r5uid5>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid5=r7uid then do;

           match5=5; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and match4<4 and match5<4 and

         r4uid5>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid5=r7uid then do;

           match5=4; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and match5<3 and

         r3uid5>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid5=r7uid then do;

           match5=3; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and match3<2 and match4<2 and match5<2 and

         r2uid5>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid5=r7uid then do;

           match5=2; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and match4=0 and match5=0 and

         r1uid5>0 and r7uid>0 and r7int>0 then do;

        if r1uid5=r7uid then do;

           match5=1;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and

         r6uid06>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid06=r7uid then do;

           match6=6; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<5 and match2<5 and match3<5 and match4<5 and match5<5 and match6<5 and

         r5uid6>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid6=r7uid then do;

           match6=5; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and match4<4 and match5<4 and match6<4 and

         r4uid6>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid6=r7uid then do;

           match6=4; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and match5<3 and match6<3 and

         r3uid6>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid6=r7uid then do;

           match6=3; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and match3<2 and match4<2 and match5<2 and match6<2 and

         r2uid6>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid6=r7uid then do;

           match6=2; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and match4=0 and match5=0 and match6=0 and

         r1uid6>0 and r7uid>0 and r7int>0 then do;

        if r1uid6=r7uid then do;

           match6=1;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and match7<6 and

         r6uid07>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid07=r7uid then do;

           match7=6; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<5 and match2<5 and match3<5 and match4<5 and match5<5 and match6<5 and match7<5 and

         r5uid7>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid7=r7uid then do;

           match7=5; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and match4<4 and match5<4 and match6<4 and match7<4 and

         r4uid7>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid7=r7uid then do;

           match7=4; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and match5<3 and match6<3 and match7<3 and

         r3uid7>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid7=r7uid then do;

           match7=3; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and match3<2 and match4<2 and match5<2 and match6<2 and match7<2 and

          r2uid7>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid7=r7uid then do;

           match7=2; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and match4=0 and match5=0 and match6=0 and match7=0 and

         r1uid7>0 and r7uid>0 and r7int>0 then do;

        if r1uid7=r7uid then do;

           match7=1;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and match7<6 and match8<6 and

        r6uid08>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid08=r7uid then do;

           match8=6; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

 

     if match1<5 and match2<5 and match3<5 and match4<5 and match5<5 and match6<5 and match7<5 and match8<5 and

         r5uid8>0 and r7uid>0 and r5int>0 and r7int>0 then do;

        if r5uid8=r7uid then do;

           match8=5; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

 

     if match1<4 and match2<4 and match3<4 and match4<4 and match5<4 and match6<4 and match7<4 and match8<4 and

         r4uid8>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid8=r7uid then do;

           match8=4; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and match5<3 and match6<3 and match7<3 and match8<3 and

          r3uid8>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid8=r7uid then do;

           match8=3; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

 

     if match1=0 and match2=0 and match3=0 and match4=0 and match5=0 and match6=0 and match7=0 and match8=0 and

          r2uid8>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid8=r7uid then do;

           match8=2; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and match7<6 and

          match8<6 and match9<6 and r6uid09>0 and r7uid>0 and r6int>0 and r7int>0 then do ;

        if r6uid09=r7uid then do;

           match9=6; match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0 ; match1=0;

        end;

     end;

 

 

     if match1<4 and match2<4 and match3<4 and match4<4 and match5<4 and match6<4 and match7<4 and

          match8<4 and match9<4 and r4uid9>0 and r7uid>0 and r4int>0 and r7int>0 then do;

        if r4uid9=r7uid then do;

           match9=4; match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0 ; match1=0;

        end;

     end;

 

     if match1<3 and match2<3 and match3<3 and match4<3 and match5<3 and match6<3 and match7<3 and

          match8<3 and match9<3 and r3uid9>0 and r7uid>0 and r3int>0 and r7int>0 then do;

        if r3uid9=r7uid then do;

           match9=3; match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0 ; match1=0;

        end;

     end;

 

     if match1<2 and match2<2 and match3<2 and match4<2 and match5<2 and match6<2 and match7<2 and

          match8<2 and match9<2 and r2uid9>0 and r7uid>0 and r2int>0 and r7int>0 then do;

        if r2uid9=r7uid then do;

           match9=2; match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0 ; match1=0;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and match7<6 and

          match8<6 and match9<6 and match10<6 and r6uid10>0 and r7uid>0 and r6int>0 and r7int>0 then do;

        if r6uid10=r7uid then do;

           match10=6; match9=0;

           match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

  end;

 

  do over r7uid;

     if match1<6 and match2<6 and match3<6 and match4<6 and match5<6 and match6<6 and match7<6 and

          match8<6 and match9<6 and match10<6 and match11<6 and r6uid11>0 and r7uid>0 and

          r6int>0 and r7int>0 then do;

        if r6uid11=r7uid then do;

           match11=6; match10=0; match9=0;

           match8=0; match7=0; match6=0; match5=0; match4=0; match3=0; match2=0; match1=0 ;

        end;

     end;

  end;

 

 

 

 

  /* Now reassign total created variable if there is an identical job was worked in both rounds. Using the match variable,

  a job worked in both rounds will update the total created variable. Need to add positivity condition on the weeks

  worked values since some of the values equal -3. */

 

  /* For respondents last interviewed in Round 6, 2003 */

  if r6int_y=2003 then do;

     do over match1;

         if match1=6 then do;

           if r6wks801 not in (-5,-4,0,.) then twks80=r6wks801;   if r6wks891 not in (-5,-4,0,.) then twks89=r6wks891;

       if r6wks811 not in (-5,-4,0,.) then twks81=r6wks811;   if r6wks901 not in (-5,-4,0,.) then twks90=r6wks901;

       if r6wks821 not in (-5,-4,0,.) then twks82=r6wks821;   if r6wks911 not in (-5,-4,0,.) then twks91=r6wks911;

       if r6wks831 not in (-5,-4,0,.) then twks83=r6wks831;   if r6wks921 not in (-5,-4,0,.) then twks92=r6wks921;

       if r6wks841 not in (-5,-4,0,.) then twks84=r6wks841;   if r6wks931 not in (-5,-4,0,.) then twks93=r6wks931;

       if r6wks851 not in (-5,-4,0,.) then twks85=r6wks851;   if r6wks941 not in (-5,-4,0,.) then twks94=r6wks941;

       if r6wks861 not in (-5,-4,0,.) then twks86=r6wks861;   if r6wks951 not in (-5,-4,0,.) then twks95=r6wks951;

       if r6wks871 not in (-5,-4,0,.) then twks87=r6wks871;   if r6wks961 not in (-5,-4,0,.) then twks96=r6wks961;

           if r6wks881 not in (-5,-4,0,.) then twks88=r6wks881;   if r6wks971 not in (-5,-4,0,.) then twks97=r6wks971;

                                      if r6wks981 not in (-5,-4,0,.) then twks98=r6wks981 ;

                                      if r6wks991 not in (-5,-4,0,.) then twks99=r6wks991 ;

                                      if r6wks001 not in (-5,-4,0,.) then twks00=r6wks001 ;

                                      if r6wks011 not in (-5,-4,0,.) then twks01=r6wks011 ;

                                      if r6wks021 not in (-5,-4,0,.) then twks02=r6wks021 ;

 

 

        end;

     end;

 

     do over match1;

         if match1=6 and r7wks03=>0 and r6wks031=>0 then do;

           twks03=r6wks031+r7wks03;

        end;

        if match1=6 and (-4<r7wks03<0 or -4<r6wks031<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match1;

        if match1=5 then do;

           if r5wks801 not in (-5,-4,0,.) then twks80=r5wks801;   if r5wks891 not in (-5,-4,0,.) then twks89=r5wks891;

       if r5wks811 not in (-5,-4,0,.) then twks81=r5wks811;   if r5wks901 not in (-5,-4,0,.) then twks90=r5wks901;

       if r5wks821 not in (-5,-4,0,.) then twks82=r5wks821;   if r5wks911 not in (-5,-4,0,.) then twks91=r5wks911;

       if r5wks831 not in (-5,-4,0,.) then twks83=r5wks831;   if r5wks921 not in (-5,-4,0,.) then twks92=r5wks921;

       if r5wks841 not in (-5,-4,0,.) then twks84=r5wks841;   if r5wks931 not in (-5,-4,0,.) then twks93=r5wks931;

       if r5wks851 not in (-5,-4,0,.) then twks85=r5wks851;   if r5wks941 not in (-5,-4,0,.) then twks94=r5wks941;

       if r5wks861 not in (-5,-4,0,.) then twks86=r5wks861;   if r5wks951 not in (-5,-4,0,.) then twks95=r5wks951;

       if r5wks871 not in (-5,-4,0,.) then twks87=r5wks871;   if r5wks961 not in (-5,-4,0,.) then twks96=r5wks961;

           if r5wks881 not in (-5,-4,0,.) then twks88=r5wks881;   if r5wks971 not in (-5,-4,0,.) then twks97=r5wks971;

                                      if r5wks981 not in (-5,-4,0,.) then twks98=r5wks981 ;

                                      if r5wks991 not in (-5,-4,0,.) then twks99=r5wks991 ;

                                      if r5wks001 not in (-5,-4,0,.) then twks00=r5wks001 ;

                                      if r5wks011 not in (-5,-4,0,.) then twks01=r5wks011 ;

 

        end;

     end;

 

     do over match1;

        if match1=5 and r7wks02=>0 and r5wks021=>0 then do;

           twks02=r5wks021+r7wks02;

        end;

        if match1=5 and (-4<r7wks02<0 or -4<r5wks021<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match1;

        if match1=4 then do;

           if r4wks801 not in (-5,-4,0,.) then twks80=r4wks801;   if r4wks891 not in (-5,-4,0,.) then twks89=r4wks891;

       if r4wks811 not in (-5,-4,0,.) then twks81=r4wks811;   if r4wks901 not in (-5,-4,0,.) then twks90=r4wks901;

       if r4wks821 not in (-5,-4,0,.) then twks82=r4wks821;   if r4wks911 not in (-5,-4,0,.) then twks91=r4wks911;

       if r4wks831 not in (-5,-4,0,.) then twks83=r4wks831;   if r4wks921 not in (-5,-4,0,.) then twks92=r4wks921;

       if r4wks841 not in (-5,-4,0,.) then twks84=r4wks841;   if r4wks931 not in (-5,-4,0,.) then twks93=r4wks931;

       if r4wks851 not in (-5,-4,0,.) then twks85=r4wks851;   if r4wks941 not in (-5,-4,0,.) then twks94=r4wks941;

       if r4wks861 not in (-5,-4,0,.) then twks86=r4wks861;   if r4wks951 not in (-5,-4,0,.) then twks95=r4wks951;

       if r4wks871 not in (-5,-4,0,.) then twks87=r4wks871;   if r4wks961 not in (-5,-4,0,.) then twks96=r4wks961;

           if r4wks881 not in (-5,-4,0,.) then twks88=r4wks881;   if r4wks971 not in (-5,-4,0,.) then twks97=r4wks971;

                                      if r4wks981 not in (-5,-4,0,.) then twks98=r4wks981 ;

                                      if r4wks991 not in (-5,-4,0,.) then twks99=r4wks991 ;

                                      if r4wks001 not in (-5,-4,0,.) then twks00=r4wks001 ;

        end;

     end;

 

     do over match1;

        if match1=4 and r7wks01=>0 and r4wks011=>0 then do;

           twks01=r4wks011+r7wks01;

        end;

        if match1=4 and (-4<r7wks01<0 or -4<r4wks011<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match1;

        if match1=3 then do;

           if r3wks801 not in (-5,-4,0,.) then twks80=r3wks801;   if r3wks891 not in (-5,-4,0,.) then twks89=r3wks891;

       if r3wks811 not in (-5,-4,0,.) then twks81=r3wks811;   if r3wks901 not in (-5,-4,0,.) then twks90=r3wks901;

       if r3wks821 not in (-5,-4,0,.) then twks82=r3wks821;   if r3wks911 not in (-5,-4,0,.) then twks91=r3wks911;

       if r3wks831 not in (-5,-4,0,.) then twks83=r3wks831;   if r3wks921 not in (-5,-4,0,.) then twks92=r3wks921;

       if r3wks841 not in (-5,-4,0,.) then twks84=r3wks841;   if r3wks931 not in (-5,-4,0,.) then twks93=r3wks931;

       if r3wks851 not in (-5,-4,0,.) then twks85=r3wks851;   if r3wks941 not in (-5,-4,0,.) then twks94=r3wks941;

       if r3wks861 not in (-5,-4,0,.) then twks86=r3wks861;   if r3wks951 not in (-5,-4,0,.) then twks95=r3wks951;

       if r3wks871 not in (-5,-4,0,.) then twks87=r3wks871;   if r3wks961 not in (-5,-4,0,.) then twks96=r3wks961;

           if r3wks881 not in (-5,-4,0,.) then twks88=r3wks881;   if r3wks971 not in (-5,-4,0,.) then twks97=r3wks971;

                                      if r3wks981 not in (-5,-4,0,.) then twks98=r3wks981 ;

                                      if r3wks991 not in (-5,-4,0,.) then twks99=r3wks991 ;

        end;

     end;

 

     do over match1;

        if match1=3 and r7wks00=>0 and r3wks001=>0 then do;

           twks00=r3wks001+r7wks00;

        end;

        if match1=3 and (-4<r7wks00<0 or -4<r3wks001<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match1;

        if match1=2 then do;

           if r2wks801 not in (-5,-4,0,.) then twks80=r2wks801;   if r2wks891 not in (-5,-4,0,.) then twks89=r2wks891;

           if r2wks811 not in (-5,-4,0,.) then twks81=r2wks811;   if r2wks901 not in (-5,-4,0,.) then twks90=r2wks901;

       if r2wks821 not in (-5,-4,0,.) then twks82=r2wks821;   if r2wks911 not in (-5,-4,0,.) then twks91=r2wks911;

       if r2wks831 not in (-5,-4,0,.) then twks83=r2wks831;   if r2wks921 not in (-5,-4,0,.) then twks92=r2wks921;

       if r2wks841 not in (-5,-4,0,.) then twks84=r2wks841;   if r2wks931 not in (-5,-4,0,.) then twks93=r2wks931;

       if r2wks851 not in (-5,-4,0,.) then twks85=r2wks851;   if r2wks941 not in (-5,-4,0,.) then twks94=r2wks941;

       if r2wks861 not in (-5,-4,0,.) then twks86=r2wks861;   if r2wks951 not in (-5,-4,0,.) then twks95=r2wks951;

       if r2wks871 not in (-5,-4,0,.) then twks87=r2wks871;   if r2wks961 not in (-5,-4,0,.) then twks96=r2wks961;

           if r2wks881 not in (-5,-4,0,.) then twks88=r2wks881;   if r2wks971 not in (-5,-4,0,.) then twks97=r2wks971;

        end;

     end;

 

     do over match1;

        if match1=2 and r7wks98=>0 and r2wks981=>0 then do;

           twks98=r2wks981+r7wks98;

        end;

        if match1=2 and (-4<r7wks98<0 or -4<r2wks981<0) then do;

           twks98=-3;

        end;

     end;

 

 

     do over match2;

       if match2=6 then do;

       if r6wks802 not in (-5,-4,0,.) then twks80=r6wks802;   if r6wks892 not in (-5,-4,0,.) then twks89=r6wks892;

       if r6wks812 not in (-5,-4,0,.) then twks81=r6wks812;   if r6wks902 not in (-5,-4,0,.) then twks90=r6wks902;

       if r6wks822 not in (-5,-4,0,.) then twks82=r6wks822;   if r6wks912 not in (-5,-4,0,.) then twks91=r6wks912;

       if r6wks832 not in (-5,-4,0,.) then twks83=r6wks832;   if r6wks922 not in (-5,-4,0,.) then twks92=r6wks922;

       if r6wks842 not in (-5,-4,0,.) then twks84=r6wks842;   if r6wks932 not in (-5,-4,0,.) then twks93=r6wks932;

       if r6wks852 not in (-5,-4,0,.) then twks85=r6wks852;   if r6wks942 not in (-5,-4,0,.) then twks94=r6wks942;

       if r6wks862 not in (-5,-4,0,.) then twks86=r6wks862;   if r6wks952 not in (-5,-4,0,.) then twks95=r6wks952;

       if r6wks872 not in (-5,-4,0,.) then twks87=r6wks872;   if r6wks962 not in (-5,-4,0,.) then twks96=r6wks962;

       if r6wks882 not in (-5,-4,0,.) then twks88=r6wks882;   if r6wks972 not in (-5,-4,0,.) then twks97=r6wks972;

                                      if r6wks982 not in (-5,-4,0,.) then twks98=r6wks982 ;

                                      if r6wks992 not in (-5,-4,0,.) then twks99=r6wks992 ;

                                      if r6wks002 not in (-5,-4,0,.) then twks00=r6wks002 ;

                                      if r6wks012 not in (-5,-4,0,.) then twks01=r6wks012 ;

                                      if r6wks022 not in (-5,-4,0,.) then twks02=r6wks022 ;

 

        end;

     end;

 

     do over match2;

        if match2=6 and r7wks03=>0 and r6wks032=>0 then do;

           twks03=r6wks032+r7wks03;

        end;

        if match2=6 and (-4<r7wks03<0 or -4<r6wks032<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match2;

        if match2=5 then do;

           if r5wks802 not in (-5,-4,0,.) then twks80=r5wks802;   if r5wks892 not in (-5,-4,0,.) then twks89=r5wks892;

           if r5wks812 not in (-5,-4,0,.) then twks81=r5wks812;   if r5wks902 not in (-5,-4,0,.) then twks90=r5wks902;

       if r5wks822 not in (-5,-4,0,.) then twks82=r5wks822;   if r5wks912 not in (-5,-4,0,.) then twks91=r5wks912;

       if r5wks832 not in (-5,-4,0,.) then twks83=r5wks832;   if r5wks922 not in (-5,-4,0,.) then twks92=r5wks922;

       if r5wks842 not in (-5,-4,0,.) then twks84=r5wks842;   if r5wks932 not in (-5,-4,0,.) then twks93=r5wks932;

       if r5wks852 not in (-5,-4,0,.) then twks85=r5wks852;   if r5wks942 not in (-5,-4,0,.) then twks94=r5wks942;

       if r5wks862 not in (-5,-4,0,.) then twks86=r5wks862;   if r5wks952 not in (-5,-4,0,.) then twks95=r5wks952;

       if r5wks872 not in (-5,-4,0,.) then twks87=r5wks872;   if r5wks962 not in (-5,-4,0,.) then twks96=r5wks962;

           if r5wks882 not in (-5,-4,0,.) then twks88=r5wks882;   if r5wks972 not in (-5,-4,0,.) then twks97=r5wks972;

                                      if r5wks982 not in (-5,-4,0,.) then twks98=r5wks982 ;

                                      if r5wks992 not in (-5,-4,0,.) then twks99=r5wks992 ;

                                      if r5wks002 not in (-5,-4,0,.) then twks00=r5wks002 ;

                                      if r5wks012 not in (-5,-4,0,.) then twks01=r5wks012 ;

 

        end;

     end;

 

     do over match2;

        if match2=5 and r7wks02=>0 and r5wks022=>0 then do;

           twks02=r5wks022+r7wks02;

        end;

        if match2=5 and (-4<r7wks02<0 or -4<r5wks022<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match2;

        if match2=4 then do;

           if r4wks802 not in (-5,-4,0,.) then twks80=r4wks802;   if r4wks892 not in (-5,-4,0,.) then twks89=r4wks892;

           if r4wks812 not in (-5,-4,0,.) then twks81=r4wks812;   if r4wks902 not in (-5,-4,0,.) then twks90=r4wks902;

       if r4wks822 not in (-5,-4,0,.) then twks82=r4wks822;   if r4wks912 not in (-5,-4,0,.) then twks91=r4wks912;

       if r4wks832 not in (-5,-4,0,.) then twks83=r4wks832;   if r4wks922 not in (-5,-4,0,.) then twks92=r4wks922;

       if r4wks842 not in (-5,-4,0,.) then twks84=r4wks842;   if r4wks932 not in (-5,-4,0,.) then twks93=r4wks932;

       if r4wks852 not in (-5,-4,0,.) then twks85=r4wks852;   if r4wks942 not in (-5,-4,0,.) then twks94=r4wks942;

       if r4wks862 not in (-5,-4,0,.) then twks86=r4wks862;   if r4wks952 not in (-5,-4,0,.) then twks95=r4wks952;

       if r4wks872 not in (-5,-4,0,.) then twks87=r4wks872;   if r4wks962 not in (-5,-4,0,.) then twks96=r4wks962;

           if r4wks882 not in (-5,-4,0,.) then twks88=r4wks882;   if r4wks972 not in (-5,-4,0,.) then twks97=r4wks972;

                                      if r4wks982 not in (-5,-4,0,.) then twks98=r4wks982 ;

                                      if r4wks992 not in (-5,-4,0,.) then twks99=r4wks992 ;

        end;

     end;

 

     do over match2;

        if match2=4 and r7wks00=>0 and r4wks002=>0 then do;

           twks00=r4wks002+r7wks00;

        end;

        if match2=4 and (-4<r7wks00<0 or -4<r4wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982 ;

                                      if r3wks992 not in (-5,-4,0,.) then twks99=r3wks992 ;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks00=>0 and r3wks002=>0 then do;

           twks00=r3wks002+r7wks00;

        end;

        if match2=3 and (-4<r7wks00<0 or -4<r3wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=2 then do;

           if r2wks802 not in (-5,-4,0,.) then twks80=r2wks802;   if r2wks892 not in (-5,-4,0,.) then twks89=r2wks892;

       if r2wks812 not in (-5,-4,0,.) then twks81=r2wks812;   if r2wks902 not in (-5,-4,0,.) then twks90=r2wks902;

       if r2wks822 not in (-5,-4,0,.) then twks82=r2wks822;   if r2wks912 not in (-5,-4,0,.) then twks91=r2wks912;

       if r2wks832 not in (-5,-4,0,.) then twks83=r2wks832;   if r2wks922 not in (-5,-4,0,.) then twks92=r2wks922;

       if r2wks842 not in (-5,-4,0,.) then twks84=r2wks842;   if r2wks932 not in (-5,-4,0,.) then twks93=r2wks932;

       if r2wks852 not in (-5,-4,0,.) then twks85=r2wks852;   if r2wks942 not in (-5,-4,0,.) then twks94=r2wks942;

       if r2wks862 not in (-5,-4,0,.) then twks86=r2wks862;   if r2wks952 not in (-5,-4,0,.) then twks95=r2wks952;

       if r2wks872 not in (-5,-4,0,.) then twks87=r2wks872;   if r2wks962 not in (-5,-4,0,.) then twks96=r2wks962;

           if r2wks882 not in (-5,-4,0,.) then twks88=r2wks882;   if r2wks972 not in (-5,-4,0,.) then twks97=r2wks972;

        end;

     end;

 

     do over match2;

        if match2=2 and r7wks98=>0 and r2wks982=>0 then do;

           twks98=r2wks982+r7wks98;

        end;

        if match2=2 and (-4<r7wks98<0 or -4<r2wks982<0) then do;

           twks98=-3;

        end;

     end;

 

     do over match3;

        if match3=6 then do;

           if r6wks803 not in (-5,-4,0,.) then twks80=r6wks803;   if r6wks893 not in (-5,-4,0,.) then twks89=r6wks893;

       if r6wks813 not in (-5,-4,0,.) then twks81=r6wks813;   if r6wks903 not in (-5,-4,0,.) then twks90=r6wks903;

       if r6wks823 not in (-5,-4,0,.) then twks82=r6wks823;   if r6wks913 not in (-5,-4,0,.) then twks91=r6wks913;

       if r6wks833 not in (-5,-4,0,.) then twks83=r6wks833;   if r6wks923 not in (-5,-4,0,.) then twks92=r6wks923;

       if r6wks843 not in (-5,-4,0,.) then twks84=r6wks843;   if r6wks933 not in (-5,-4,0,.) then twks93=r6wks933;

       if r6wks853 not in (-5,-4,0,.) then twks85=r6wks853;   if r6wks943 not in (-5,-4,0,.) then twks94=r6wks943;

       if r6wks863 not in (-5,-4,0,.) then twks86=r6wks863;   if r6wks953 not in (-5,-4,0,.) then twks95=r6wks953;

       if r6wks873 not in (-5,-4,0,.) then twks87=r6wks873;   if r6wks963 not in (-5,-4,0,.) then twks96=r6wks963;

           if r6wks883 not in (-5,-4,0,.) then twks88=r6wks883;   if r6wks973 not in (-5,-4,0,.) then twks97=r6wks973;

                                      if r6wks983 not in (-5,-4,0,.) then twks98=r6wks983 ;

                                      if r6wks993 not in (-5,-4,0,.) then twks99=r6wks993 ;

                                      if r6wks003 not in (-5,-4,0,.) then twks00=r6wks003 ;

                                      if r6wks013 not in (-5,-4,0,.) then twks01=r6wks013 ;

                                      if r6wks023 not in (-5,-4,0,.) then twks02=r6wks023 ;

        end;

     end;

 

     do over match3;

        if match3=6 and r7wks03=>0 and r6wks033=>0 then do;

           twks03=r6wks033+r7wks03;

        end;

        if match3=6 and (-4<r7wks03<0 or -4<r6wks033<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match3;

        if match3=5 then do;

           if r5wks803 not in (-5,-4,0,.) then twks80=r5wks803;   if r5wks893 not in (-5,-4,0,.) then twks89=r5wks893;

       if r5wks813 not in (-5,-4,0,.) then twks81=r5wks813;   if r5wks903 not in (-5,-4,0,.) then twks90=r5wks903;

       if r5wks823 not in (-5,-4,0,.) then twks82=r5wks823;   if r5wks913 not in (-5,-4,0,.) then twks91=r5wks913;

       if r5wks833 not in (-5,-4,0,.) then twks83=r5wks833;   if r5wks923 not in (-5,-4,0,.) then twks92=r5wks923;

       if r5wks843 not in (-5,-4,0,.) then twks84=r5wks843;   if r5wks933 not in (-5,-4,0,.) then twks93=r5wks933;

       if r5wks853 not in (-5,-4,0,.) then twks85=r5wks853;   if r5wks943 not in (-5,-4,0,.) then twks94=r5wks943;

       if r5wks863 not in (-5,-4,0,.) then twks86=r5wks863;   if r5wks953 not in (-5,-4,0,.) then twks95=r5wks953;

       if r5wks873 not in (-5,-4,0,.) then twks87=r5wks873;   if r5wks963 not in (-5,-4,0,.) then twks96=r5wks963;

           if r5wks883 not in (-5,-4,0,.) then twks88=r5wks883;   if r5wks973 not in (-5,-4,0,.) then twks97=r5wks973;

                                      if r5wks983 not in (-5,-4,0,.) then twks98=r5wks983 ;

                                      if r5wks993 not in (-5,-4,0,.) then twks99=r5wks993 ;

                                      if r5wks003 not in (-5,-4,0,.) then twks00=r5wks003 ;

                                      if r5wks013 not in (-5,-4,0,.) then twks01=r5wks013 ;

 

        end;

     end;

 

     do over match3;

        if match3=5 and r7wks02=>0 and r5wks023=>0 then do;

           twks02=r5wks023+r7wks02;

        end;

        if match3=5 and (-4<r7wks02<0 or -4<r5wks023<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match3;

        if match3=4 then do;

           if r4wks803 not in (-5,-4,0,.) then twks80=r4wks803;   if r4wks893 not in (-5,-4,0,.) then twks89=r4wks893;

       if r4wks813 not in (-5,-4,0,.) then twks81=r4wks813;   if r4wks903 not in (-5,-4,0,.) then twks90=r4wks903;

       if r4wks823 not in (-5,-4,0,.) then twks82=r4wks823;   if r4wks913 not in (-5,-4,0,.) then twks91=r4wks913;

       if r4wks833 not in (-5,-4,0,.) then twks83=r4wks833;   if r4wks923 not in (-5,-4,0,.) then twks92=r4wks923;

       if r4wks843 not in (-5,-4,0,.) then twks84=r4wks843;   if r4wks933 not in (-5,-4,0,.) then twks93=r4wks933;

       if r4wks853 not in (-5,-4,0,.) then twks85=r4wks853;   if r4wks943 not in (-5,-4,0,.) then twks94=r4wks943;

       if r4wks863 not in (-5,-4,0,.) then twks86=r4wks863;   if r4wks953 not in (-5,-4,0,.) then twks95=r4wks953;

       if r4wks873 not in (-5,-4,0,.) then twks87=r4wks873;   if r4wks963 not in (-5,-4,0,.) then twks96=r4wks963;

           if r4wks883 not in (-5,-4,0,.) then twks88=r4wks883;   if r4wks973 not in (-5,-4,0,.) then twks97=r4wks973;

                                      if r4wks983 not in (-5,-4,0,.) then twks98=r4wks983 ;

                                      if r4wks993 not in (-5,-4,0,.) then twks99=r4wks993 ;

                                      if r4wks003 not in (-5,-4,0,.) then twks00=r4wks003 ;

        end;

     end;

 

     do over match3;

        if match3=4 and r7wks01=>0 and r4wks013=>0 then do;

           twks01=r4wks013+r7wks01;

        end;

        if match3=4 and (-4<r7wks01<0 or -4<r4wks013<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match3;

        if match3=3 then do;

           if r3wks803 not in (-5,-4,0,.) then twks80=r3wks803;   if r3wks893 not in (-5,-4,0,.) then twks89=r3wks893;

       if r3wks813 not in (-5,-4,0,.) then twks81=r3wks813;   if r3wks903 not in (-5,-4,0,.) then twks90=r3wks903;

       if r3wks823 not in (-5,-4,0,.) then twks82=r3wks823;   if r3wks913 not in (-5,-4,0,.) then twks91=r3wks913;

       if r3wks833 not in (-5,-4,0,.) then twks83=r3wks833;   if r3wks923 not in (-5,-4,0,.) then twks92=r3wks923;

       if r3wks843 not in (-5,-4,0,.) then twks84=r3wks843;   if r3wks933 not in (-5,-4,0,.) then twks93=r3wks933;

       if r3wks853 not in (-5,-4,0,.) then twks85=r3wks853;   if r3wks943 not in (-5,-4,0,.) then twks94=r3wks943;

       if r3wks863 not in (-5,-4,0,.) then twks86=r3wks863;   if r3wks953 not in (-5,-4,0,.) then twks95=r3wks953;

       if r3wks873 not in (-5,-4,0,.) then twks87=r3wks873;   if r3wks963 not in (-5,-4,0,.) then twks96=r3wks963;

           if r3wks883 not in (-5,-4,0,.) then twks88=r3wks883;   if r3wks973 not in (-5,-4,0,.) then twks97=r3wks973;

                                      if r3wks983 not in (-5,-4,0,.) then twks98=r3wks983 ;

                                      if r3wks993 not in (-5,-4,0,.) then twks99=r3wks993 ;

        end;

     end;

 

     do over match3;

        if match3=3 and r7wks00=>0 and r3wks003=>0 then do;

           twks00=r3wks003+r7wks00;

        end;

        if match3=3 and (-4<r7wks00<0 or -4<r3wks003<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match4;

        if match4=6 then do;

           if r6wks804 not in (-5,-4,0,.) then twks80=r6wks804;   if r6wks894 not in (-5,-4,0,.) then twks89=r6wks894;

       if r6wks814 not in (-5,-4,0,.) then twks81=r6wks814;   if r6wks904 not in (-5,-4,0,.) then twks90=r6wks904;

       if r6wks824 not in (-5,-4,0,.) then twks82=r6wks824;   if r6wks914 not in (-5,-4,0,.) then twks91=r6wks914;

       if r6wks834 not in (-5,-4,0,.) then twks83=r6wks834;   if r6wks924 not in (-5,-4,0,.) then twks92=r6wks924;

       if r6wks844 not in (-5,-4,0,.) then twks84=r6wks844;   if r6wks934 not in (-5,-4,0,.) then twks93=r6wks934;

       if r6wks854 not in (-5,-4,0,.) then twks85=r6wks854;   if r6wks944 not in (-5,-4,0,.) then twks94=r6wks944;

       if r6wks864 not in (-5,-4,0,.) then twks86=r6wks864;   if r6wks954 not in (-5,-4,0,.) then twks95=r6wks954;

       if r6wks874 not in (-5,-4,0,.) then twks87=r6wks874;   if r6wks964 not in (-5,-4,0,.) then twks96=r6wks964;

           if r6wks884 not in (-5,-4,0,.) then twks88=r6wks884;   if r6wks974 not in (-5,-4,0,.) then twks97=r6wks974;

                                  if r6wks984 not in (-5,-4,0,.) then twks98=r6wks984;

                                  if r6wks994 not in (-5,-4,0,.) then twks99=r6wks994;

                                  if r6wks004 not in (-5,-4,0,.) then twks00=r6wks004;

                                  if r6wks014 not in (-5,-4,0,.) then twks01=r6wks014;

                                  if r6wks024 not in (-5,-4,0,.) then twks02=r6wks024;

        end;

     end;

 

     do over match4;

        if match4=6 and r7wks03=>0 and r6wks034=>0 then do;

           twks03=r6wks034+r7wks03;

        end;

        if match4=6 and (-4<r7wks03<0 or -4<r6wks034<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match4;

        if match4=5 then do;

           if r5wks804 not in (-5,-4,0,.) then twks80=r5wks804;   if r5wks894 not in (-5,-4,0,.) then twks89=r5wks894;

       if r5wks814 not in (-5,-4,0,.) then twks81=r5wks814;   if r5wks904 not in (-5,-4,0,.) then twks90=r5wks904;

       if r5wks824 not in (-5,-4,0,.) then twks82=r5wks824;   if r5wks914 not in (-5,-4,0,.) then twks91=r5wks914;

       if r5wks834 not in (-5,-4,0,.) then twks83=r5wks834;   if r5wks924 not in (-5,-4,0,.) then twks92=r5wks924;

       if r5wks844 not in (-5,-4,0,.) then twks84=r5wks844;   if r5wks934 not in (-5,-4,0,.) then twks93=r5wks934;

       if r5wks854 not in (-5,-4,0,.) then twks85=r5wks854;   if r5wks944 not in (-5,-4,0,.) then twks94=r5wks944;

       if r5wks864 not in (-5,-4,0,.) then twks86=r5wks864;   if r5wks954 not in (-5,-4,0,.) then twks95=r5wks954;

       if r5wks874 not in (-5,-4,0,.) then twks87=r5wks874;   if r5wks964 not in (-5,-4,0,.) then twks96=r5wks964;

           if r5wks884 not in (-5,-4,0,.) then twks88=r5wks884;   if r5wks974 not in (-5,-4,0,.) then twks97=r5wks974;

                                  if r5wks984 not in (-5,-4,0,.) then twks98=r5wks984;

                                  if r5wks994 not in (-5,-4,0,.) then twks99=r5wks994;

                                  if r5wks004 not in (-5,-4,0,.) then twks00=r5wks004;

                                  if r5wks014 not in (-5,-4,0,.) then twks01=r5wks014;

 

        end;

     end;

 

     do over match4;

        if match4=5 and r7wks02=>0 and r5wks024=>0 then do;

           twks02=r5wks024+r7wks02;

        end;

        if match4=5 and (-4<r7wks02<0 or -4<r5wks024<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match4;

        if match4=4 then do;

           if r4wks804 not in (-5,-4,0,.) then twks80=r4wks804;   if r4wks894 not in (-5,-4,0,.) then twks89=r4wks894;

       if r4wks814 not in (-5,-4,0,.) then twks81=r4wks814;   if r4wks904 not in (-5,-4,0,.) then twks90=r4wks904;

       if r4wks824 not in (-5,-4,0,.) then twks82=r4wks824;   if r4wks914 not in (-5,-4,0,.) then twks91=r4wks914;

       if r4wks834 not in (-5,-4,0,.) then twks83=r4wks834;   if r4wks924 not in (-5,-4,0,.) then twks92=r4wks924;

       if r4wks844 not in (-5,-4,0,.) then twks84=r4wks844;   if r4wks934 not in (-5,-4,0,.) then twks93=r4wks934;

       if r4wks854 not in (-5,-4,0,.) then twks85=r4wks854;   if r4wks944 not in (-5,-4,0,.) then twks94=r4wks944;

       if r4wks864 not in (-5,-4,0,.) then twks86=r4wks864;   if r4wks954 not in (-5,-4,0,.) then twks95=r4wks954;

       if r4wks874 not in (-5,-4,0,.) then twks87=r4wks874;   if r4wks964 not in (-5,-4,0,.) then twks96=r4wks964;

           if r4wks884 not in (-5,-4,0,.) then twks88=r4wks884;   if r4wks974 not in (-5,-4,0,.) then twks97=r4wks974;

                                  if r4wks984 not in (-5,-4,0,.) then twks98=r4wks984;

                                  if r4wks994 not in (-5,-4,0,.) then twks99=r4wks994;

                                  if r4wks004 not in (-5,-4,0,.) then twks00=r4wks004;

        end;

     end;

 

     do over match4;

        if match4=4 and r7wks01=>0 and r4wks014=>0 then do;

           twks01=r4wks014+r7wks01;

        end;

        if match4=4 and (-4<r7wks01<0 or -4<r4wks014<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match4;

        if match4=3 then do;

           if r3wks804 not in (-5,-4,0,.) then twks80=r3wks804;   if r3wks894 not in (-5,-4,0,.) then twks89=r3wks894;

       if r3wks814 not in (-5,-4,0,.) then twks81=r3wks814;   if r3wks904 not in (-5,-4,0,.) then twks90=r3wks904;

       if r3wks824 not in (-5,-4,0,.) then twks82=r3wks824;   if r3wks914 not in (-5,-4,0,.) then twks91=r3wks914;

       if r3wks834 not in (-5,-4,0,.) then twks83=r3wks834;   if r3wks924 not in (-5,-4,0,.) then twks92=r3wks924;

       if r3wks844 not in (-5,-4,0,.) then twks84=r3wks844;   if r3wks934 not in (-5,-4,0,.) then twks93=r3wks934;

       if r3wks854 not in (-5,-4,0,.) then twks85=r3wks854;   if r3wks944 not in (-5,-4,0,.) then twks94=r3wks944;

       if r3wks864 not in (-5,-4,0,.) then twks86=r3wks864;   if r3wks954 not in (-5,-4,0,.) then twks95=r3wks954;

       if r3wks874 not in (-5,-4,0,.) then twks87=r3wks874;   if r3wks964 not in (-5,-4,0,.) then twks96=r3wks964;

           if r3wks884 not in (-5,-4,0,.) then twks88=r3wks884;   if r3wks974 not in (-5,-4,0,.) then twks97=r3wks974;

                                  if r3wks984 not in (-5,-4,0,.) then twks98=r3wks984;

                                  if r3wks994 not in (-5,-4,0,.) then twks99=r3wks994;

        end;

     end;

 

     do over match4;

        if match4=3 and r7wks00=>0 and r3wks004=>0 then do;

           twks00=r3wks004+r7wks00;

        end;

        if match4=3 and (-4<r7wks00<0 or -4<r3wks004<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match4;

        if match4=2 then do;

           if r2wks804 not in (-5,-4,0,.) then twks80=r2wks804;   if r2wks894 not in (-5,-4,0,.) then twks89=r2wks894;

       if r2wks814 not in (-5,-4,0,.) then twks81=r2wks814;   if r2wks904 not in (-5,-4,0,.) then twks90=r2wks904;

       if r2wks824 not in (-5,-4,0,.) then twks82=r2wks824;   if r2wks914 not in (-5,-4,0,.) then twks91=r2wks914;

       if r2wks834 not in (-5,-4,0,.) then twks83=r2wks834;   if r2wks924 not in (-5,-4,0,.) then twks92=r2wks924;

       if r2wks844 not in (-5,-4,0,.) then twks84=r2wks844;   if r2wks934 not in (-5,-4,0,.) then twks93=r2wks934;

       if r2wks854 not in (-5,-4,0,.) then twks85=r2wks854;   if r2wks944 not in (-5,-4,0,.) then twks94=r2wks944;

       if r2wks864 not in (-5,-4,0,.) then twks86=r2wks864;   if r2wks954 not in (-5,-4,0,.) then twks95=r2wks954;

       if r2wks874 not in (-5,-4,0,.) then twks87=r2wks874;   if r2wks964 not in (-5,-4,0,.) then twks96=r2wks964;

           if r2wks884 not in (-5,-4,0,.) then twks88=r2wks884;   if r2wks974 not in (-5,-4,0,.) then twks97=r2wks974;

        end;

     end;

 

     do over match4;

        if match4=2 and r7wks98=>0 and r2wks984=>0 then do;

           twks98=r2wks984+r7wks98;

        end;

        if match4=2 and (-4<r7wks98<0 or -4<r2wks984<0) then do;

           twks98=-3;

        end;

     end;

 

     do over match5;

        if match5=6 then do;

           if r6wks805 not in (-5,-4,0,.) then twks80=r6wks805;   if r6wks895 not in (-5,-4,0,.) then twks89=r6wks895;

       if r6wks815 not in (-5,-4,0,.) then twks81=r6wks815;   if r6wks905 not in (-5,-4,0,.) then twks90=r6wks905;

       if r6wks825 not in (-5,-4,0,.) then twks82=r6wks825;   if r6wks915 not in (-5,-4,0,.) then twks91=r6wks915;

       if r6wks835 not in (-5,-4,0,.) then twks83=r6wks835;   if r6wks925 not in (-5,-4,0,.) then twks92=r6wks925;

       if r6wks845 not in (-5,-4,0,.) then twks84=r6wks845;   if r6wks935 not in (-5,-4,0,.) then twks93=r6wks935;

       if r6wks855 not in (-5,-4,0,.) then twks85=r6wks855;   if r6wks945 not in (-5,-4,0,.) then twks94=r6wks945;

       if r6wks865 not in (-5,-4,0,.) then twks86=r6wks865;   if r6wks955 not in (-5,-4,0,.) then twks95=r6wks955;

       if r6wks875 not in (-5,-4,0,.) then twks87=r6wks875;   if r6wks965 not in (-5,-4,0,.) then twks96=r6wks965;

           if r6wks885 not in (-5,-4,0,.) then twks88=r6wks885;   if r6wks975 not in (-5,-4,0,.) then twks97=r6wks975;

                                      if r6wks985 not in (-5,-4,0,.) then twks98=r6wks985 ;

                                      if r6wks995 not in (-5,-4,0,.) then twks99=r6wks995 ;

                                      if r6wks005 not in (-5,-4,0,.) then twks00=r6wks005 ;

                                      if r6wks015 not in (-5,-4,0,.) then twks01=r6wks015 ;

                                      if r6wks025 not in (-5,-4,0,.) then twks02=r6wks025 ;

        end;

     end;

 

     do over match5;

        if match5=6 and r7wks03=>0 and r6wks035=>0 then do;

           twks03=r6wks035+r7wks03;

        end;

        if match5=6 and (-4<r7wks03<0 or -4<r6wks035<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match5;

        if match5=5 then do;

           if r5wks805 not in (-5,-4,0,.) then twks80=r5wks805;   if r5wks895 not in (-5,-4,0,.) then twks89=r5wks895;

       if r5wks815 not in (-5,-4,0,.) then twks81=r5wks815;   if r5wks905 not in (-5,-4,0,.) then twks90=r5wks905;

       if r5wks825 not in (-5,-4,0,.) then twks82=r5wks825;   if r5wks915 not in (-5,-4,0,.) then twks91=r5wks915;

       if r5wks835 not in (-5,-4,0,.) then twks83=r5wks835;   if r5wks925 not in (-5,-4,0,.) then twks92=r5wks925;

       if r5wks845 not in (-5,-4,0,.) then twks84=r5wks845;   if r5wks935 not in (-5,-4,0,.) then twks93=r5wks935;

       if r5wks855 not in (-5,-4,0,.) then twks85=r5wks855;   if r5wks945 not in (-5,-4,0,.) then twks94=r5wks945;

       if r5wks865 not in (-5,-4,0,.) then twks86=r5wks865;   if r5wks955 not in (-5,-4,0,.) then twks95=r5wks955;

       if r5wks875 not in (-5,-4,0,.) then twks87=r5wks875;   if r5wks965 not in (-5,-4,0,.) then twks96=r5wks965;

           if r5wks885 not in (-5,-4,0,.) then twks88=r5wks885;   if r5wks975 not in (-5,-4,0,.) then twks97=r5wks975;

                                      if r5wks985 not in (-5,-4,0,.) then twks98=r5wks985 ;

                                      if r5wks995 not in (-5,-4,0,.) then twks99=r5wks995 ;

                                      if r5wks005 not in (-5,-4,0,.) then twks00=r5wks005 ;

                                      if r5wks015 not in (-5,-4,0,.) then twks01=r5wks015 ;

        end;

     end;

 

     do over match5;

        if match5=5 and r7wks02=>0 and r5wks025=>0 then do;

           twks02=r5wks025+r7wks02;

        end;

        if match5=5 and (-4<r7wks02<0 or -4<r5wks025<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match5;

        if match5=4 then do;

           if r4wks805 not in (-5,-4,0,.) then twks80=r4wks805;   if r4wks895 not in (-5,-4,0,.) then twks89=r4wks895;

       if r4wks815 not in (-5,-4,0,.) then twks81=r4wks815;   if r4wks905 not in (-5,-4,0,.) then twks90=r4wks905;

       if r4wks825 not in (-5,-4,0,.) then twks82=r4wks825;   if r4wks915 not in (-5,-4,0,.) then twks91=r4wks915;

       if r4wks835 not in (-5,-4,0,.) then twks83=r4wks835;   if r4wks925 not in (-5,-4,0,.) then twks92=r4wks925;

       if r4wks845 not in (-5,-4,0,.) then twks84=r4wks845;   if r4wks935 not in (-5,-4,0,.) then twks93=r4wks935;

       if r4wks855 not in (-5,-4,0,.) then twks85=r4wks855;   if r4wks945 not in (-5,-4,0,.) then twks94=r4wks945;

       if r4wks865 not in (-5,-4,0,.) then twks86=r4wks865;   if r4wks955 not in (-5,-4,0,.) then twks95=r4wks955;

       if r4wks875 not in (-5,-4,0,.) then twks87=r4wks875;   if r4wks965 not in (-5,-4,0,.) then twks96=r4wks965;

           if r4wks885 not in (-5,-4,0,.) then twks88=r4wks885;   if r4wks975 not in (-5,-4,0,.) then twks97=r4wks975;

                                      if r4wks985 not in (-5,-4,0,.) then twks98=r4wks985 ;

                                      if r4wks995 not in (-5,-4,0,.) then twks99=r4wks995 ;

        end;

     end;

 

     do over match5;

        if match5=4 and r7wks00=>0 and r4wks005=>0 then do;

           twks00=r4wks005+r7wks00;

        end;

        if match5=4 and (-4<r7wks00<0 or -4<r4wks005<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match6;

        if match6=6 then do;

           if r6wks806 not in (-5,-4,0,.) then twks80=r6wks806;   if r6wks896 not in (-5,-4,0,.) then twks89=r6wks896;

       if r6wks816 not in (-5,-4,0,.) then twks81=r6wks816;   if r6wks906 not in (-5,-4,0,.) then twks90=r6wks906;

       if r6wks826 not in (-5,-4,0,.) then twks82=r6wks826;   if r6wks916 not in (-5,-4,0,.) then twks91=r6wks916;

       if r6wks836 not in (-5,-4,0,.) then twks83=r6wks836;   if r6wks926 not in (-5,-4,0,.) then twks92=r6wks926;

       if r6wks846 not in (-5,-4,0,.) then twks84=r6wks846;   if r6wks936 not in (-5,-4,0,.) then twks93=r6wks936;

       if r6wks856 not in (-5,-4,0,.) then twks85=r6wks856;   if r6wks946 not in (-5,-4,0,.) then twks94=r6wks946;

       if r6wks866 not in (-5,-4,0,.) then twks86=r6wks866;   if r6wks956 not in (-5,-4,0,.) then twks95=r6wks956;

       if r6wks876 not in (-5,-4,0,.) then twks87=r6wks876;   if r6wks966 not in (-5,-4,0,.) then twks96=r6wks966;

           if r6wks886 not in (-5,-4,0,.) then twks88=r6wks886;   if r6wks976 not in (-5,-4,0,.) then twks97=r6wks976;

                                      if r6wks986 not in (-5,-4,0,.) then twks98=r6wks986 ;

                                      if r6wks996 not in (-5,-4,0,.) then twks99=r6wks996 ;

                                      if r6wks006 not in (-5,-4,0,.) then twks00=r6wks006 ;

                                      if r6wks016 not in (-5,-4,0,.) then twks01=r6wks016 ;

                                      if r6wks026 not in (-5,-4,0,.) then twks02=r6wks026 ;

        end;

     end;

 

     do over match6;

        if match6=6 and r7wks03=>0 and r6wks036=>0 then do;

           twks03=r6wks036+r7wks03;

        end;

        if match6=6 and (-4<r7wks03<0 or -4<r6wks036<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match6;

        if match6=4 then do;

           if r4wks806 not in (-5,-4,0,.) then twks80=r4wks806;   if r4wks896 not in (-5,-4,0,.) then twks89=r4wks896;

       if r4wks816 not in (-5,-4,0,.) then twks81=r4wks816;   if r4wks906 not in (-5,-4,0,.) then twks90=r4wks906;

       if r4wks826 not in (-5,-4,0,.) then twks82=r4wks826;   if r4wks916 not in (-5,-4,0,.) then twks91=r4wks916;

       if r4wks836 not in (-5,-4,0,.) then twks83=r4wks836;   if r4wks926 not in (-5,-4,0,.) then twks92=r4wks926;

       if r4wks846 not in (-5,-4,0,.) then twks84=r4wks846;   if r4wks936 not in (-5,-4,0,.) then twks93=r4wks936;

       if r4wks856 not in (-5,-4,0,.) then twks85=r4wks856;   if r4wks946 not in (-5,-4,0,.) then twks94=r4wks946;

       if r4wks866 not in (-5,-4,0,.) then twks86=r4wks866;   if r4wks956 not in (-5,-4,0,.) then twks95=r4wks956;

       if r4wks876 not in (-5,-4,0,.) then twks87=r4wks876;   if r4wks966 not in (-5,-4,0,.) then twks96=r4wks966;

           if r4wks886 not in (-5,-4,0,.) then twks88=r4wks886;   if r4wks976 not in (-5,-4,0,.) then twks97=r4wks976;

                                      if r4wks986 not in (-5,-4,0,.) then twks98=r4wks986 ;

                                      if r4wks996 not in (-5,-4,0,.) then twks99=r4wks996 ;

        end;

     end;

 

     do over match6;

        if match6=4 and r7wks00=>0 and r4wks006=>0 then do;

           twks00=r4wks006+r7wks00;

        end;

        if match6=4 and (-4<r7wks00<0 or -4<r4wks006<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match7;

        if match7=6 then do;

           if r6wks807 not in (-5,-4,0,.) then twks80=r6wks807;   if r6wks897 not in (-5,-4,0,.) then twks89=r6wks897;

       if r6wks817 not in (-5,-4,0,.) then twks81=r6wks817;   if r6wks907 not in (-5,-4,0,.) then twks90=r6wks907;

       if r6wks827 not in (-5,-4,0,.) then twks82=r6wks827;   if r6wks917 not in (-5,-4,0,.) then twks91=r6wks917;

       if r6wks837 not in (-5,-4,0,.) then twks83=r6wks837;   if r6wks927 not in (-5,-4,0,.) then twks92=r6wks927;

       if r6wks847 not in (-5,-4,0,.) then twks84=r6wks847;   if r6wks937 not in (-5,-4,0,.) then twks93=r6wks937;

       if r6wks857 not in (-5,-4,0,.) then twks85=r6wks857;   if r6wks947 not in (-5,-4,0,.) then twks94=r6wks947;

       if r6wks867 not in (-5,-4,0,.) then twks86=r6wks867;   if r6wks957 not in (-5,-4,0,.) then twks95=r6wks957;

       if r6wks877 not in (-5,-4,0,.) then twks87=r6wks877;   if r6wks967 not in (-5,-4,0,.) then twks96=r6wks967;

           if r6wks887 not in (-5,-4,0,.) then twks88=r6wks887;   if r6wks977 not in (-5,-4,0,.) then twks97=r6wks977;

                                      if r6wks987 not in (-5,-4,0,.) then twks98=r6wks987 ;

                                      if r6wks997 not in (-5,-4,0,.) then twks99=r6wks997 ;

                                      if r6wks007 not in (-5,-4,0,.) then twks00=r6wks007 ;

                                      if r6wks017 not in (-5,-4,0,.) then twks01=r6wks017 ;

                                      if r6wks027 not in (-5,-4,0,.) then twks02=r6wks027 ;

        end;

     end;

 

     do over match7;

        if match7=6 and r7wks03=>0 and r6wks037=>0 then do;

           twks03=r6wks037+r7wks03;

        end;

        if match7=6 and (-4<r7wks03<0 or -4<r6wks037<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match8;

        if match8=6 then do;

           if r6wks808 not in (-5,-4,0,.) then twks80=r6wks808;   if r6wks898 not in (-5,-4,0,.) then twks89=r6wks898;

       if r6wks818 not in (-5,-4,0,.) then twks81=r6wks818;   if r6wks908 not in (-5,-4,0,.) then twks90=r6wks908;

       if r6wks828 not in (-5,-4,0,.) then twks82=r6wks828;   if r6wks918 not in (-5,-4,0,.) then twks91=r6wks918;

       if r6wks838 not in (-5,-4,0,.) then twks83=r6wks838;   if r6wks928 not in (-5,-4,0,.) then twks92=r6wks928;

       if r6wks848 not in (-5,-4,0,.) then twks84=r6wks848;   if r6wks938 not in (-5,-4,0,.) then twks93=r6wks938;

       if r6wks858 not in (-5,-4,0,.) then twks85=r6wks858;   if r6wks948 not in (-5,-4,0,.) then twks94=r6wks948;

       if r6wks868 not in (-5,-4,0,.) then twks86=r6wks868;   if r6wks958 not in (-5,-4,0,.) then twks95=r6wks958;

       if r6wks878 not in (-5,-4,0,.) then twks87=r6wks878;   if r6wks968 not in (-5,-4,0,.) then twks96=r6wks968;

           if r6wks888 not in (-5,-4,0,.) then twks88=r6wks888;   if r6wks978 not in (-5,-4,0,.) then twks97=r6wks978;

                                      if r6wks988 not in (-5,-4,0,.) then twks98=r6wks988 ;

                                      if r6wks998 not in (-5,-4,0,.) then twks99=r6wks998 ;

                                      if r6wks008 not in (-5,-4,0,.) then twks00=r6wks008 ;

                                      if r6wks018 not in (-5,-4,0,.) then twks01=r6wks018 ;

                                      if r6wks028 not in (-5,-4,0,.) then twks02=r6wks028 ;

        end;

     end;

 

     do over match8;

        if match8=6 and r7wks03=>0 and r6wks038=>0 then do;

           twks03=r6wks038+r7wks03;

        end;

        if match8=6 and (-4<r7wks03<0 or -4<r6wks038<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match9;

        if match9=6 then do;

           if r6wks809 not in (-5,-4,0,.) then twks80=r6wks809;   if r6wks899 not in (-5,-4,0,.) then twks89=r6wks899;

       if r6wks819 not in (-5,-4,0,.) then twks81=r6wks819;   if r6wks909 not in (-5,-4,0,.) then twks90=r6wks909;

       if r6wks829 not in (-5,-4,0,.) then twks82=r6wks829;   if r6wks919 not in (-5,-4,0,.) then twks91=r6wks919;

       if r6wks839 not in (-5,-4,0,.) then twks83=r6wks839;   if r6wks929 not in (-5,-4,0,.) then twks92=r6wks929;

       if r6wks849 not in (-5,-4,0,.) then twks84=r6wks849;   if r6wks939 not in (-5,-4,0,.) then twks93=r6wks939;

       if r6wks859 not in (-5,-4,0,.) then twks85=r6wks859;   if r6wks949 not in (-5,-4,0,.) then twks94=r6wks949;

       if r6wks869 not in (-5,-4,0,.) then twks86=r6wks869;   if r6wks959 not in (-5,-4,0,.) then twks95=r6wks959;

       if r6wks879 not in (-5,-4,0,.) then twks87=r6wks879;   if r6wks969 not in (-5,-4,0,.) then twks96=r6wks969;

           if r6wks889 not in (-5,-4,0,.) then twks88=r6wks889;   if r6wks979 not in (-5,-4,0,.) then twks97=r6wks979;

                                      if r6wks989 not in (-5,-4,0,.) then twks98=r6wks989 ;

                                      if r6wks999 not in (-5,-4,0,.) then twks99=r6wks999 ;

                                      if r6wks009 not in (-5,-4,0,.) then twks00=r6wks009 ;

                                      if r6wks019 not in (-5,-4,0,.) then twks01=r6wks019 ;

                                      if r6wks029 not in (-5,-4,0,.) then twks02=r6wks029 ;

        end;

     end;

 

     do over match9;

        if match9=6 and r7wks03=>0 and r6wks039=>0 then do;

           twks03=r6wks039+r7wks03;

        end;

        if match9=6 and (-4<r7wks03<0 or -4<r6wks039<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match10;

        if match10=6 then do;

         if r6wks8010 not in (-5,-4,0,.) then twks80=r6wks8010; if r6wks8910 not in (-5,-4,0,.) then twks89=r6wks8910;

         if r6wks8110 not in (-5,-4,0,.) then twks81=r6wks8110; if r6wks9010 not in (-5,-4,0,.) then twks90=r6wks9010;

         if r6wks8210 not in (-5,-4,0,.) then twks82=r6wks8210; if r6wks9110 not in (-5,-4,0,.) then twks91=r6wks9110;

         if r6wks8310 not in (-5,-4,0,.) then twks83=r6wks8310; if r6wks9210 not in (-5,-4,0,.) then twks92=r6wks9210;

         if r6wks8410 not in (-5,-4,0,.) then twks84=r6wks8410; if r6wks9310 not in (-5,-4,0,.) then twks93=r6wks9310;

         if r6wks8510 not in (-5,-4,0,.) then twks85=r6wks8510; if r6wks9410 not in (-5,-4,0,.) then twks94=r6wks9410;

         if r6wks8610 not in (-5,-4,0,.) then twks86=r6wks8610; if r6wks9510 not in (-5,-4,0,.) then twks95=r6wks9510;

         if r6wks8710 not in (-5,-4,0,.) then twks87=r6wks8710; if r6wks9610 not in (-5,-4,0,.) then twks96=r6wks9610;

         if r6wks8810 not in (-5,-4,0,.) then twks88=r6wks8810; if r6wks9710 not in (-5,-4,0,.) then twks97=r6wks9710;

                                        if r6wks9810 not in (-5,-4,0,.) then twks98=r6wks9810;

                                        if r6wks9910 not in (-5,-4,0,.) then twks99=r6wks9910;

                                        if r6wks0010 not in (-5,-4,0,.) then twks00=r6wks0010;

                                        if r6wks0110 not in (-5,-4,0,.) then twks01=r6wks0110;

                                        if r6wks0210 not in (-5,-4,0,.) then twks02=r6wks0210;

        end;

     end;

 

     do over match10;

        if match10=6 and r7wks03=>0 and r6wks0310=>0 then do;

           twks03=r6wks0310+r7wks03;

        end;

        if match10=6 and (-4<r7wks03<0 or -4<r6wks0310<0) then do;

           twks03=-3;

        end;

     end;

 

     do over match11;

        if match11=6 then do;

         if r6wks8011 not in (-5,-4,0,.) then twks80=r6wks8011; if r6wks8911 not in (-5,-4,0,.) then twks89=r6wks8911;

         if r6wks8111 not in (-5,-4,0,.) then twks81=r6wks8111; if r6wks9011 not in (-5,-4,0,.) then twks90=r6wks9011;

         if r6wks8211 not in (-5,-4,0,.) then twks82=r6wks8211; if r6wks9111 not in (-5,-4,0,.) then twks91=r6wks9111;

         if r6wks8311 not in (-5,-4,0,.) then twks83=r6wks8311; if r6wks9211 not in (-5,-4,0,.) then twks92=r6wks9211;

         if r6wks8411 not in (-5,-4,0,.) then twks84=r6wks8411; if r6wks9311 not in (-5,-4,0,.) then twks93=r6wks9311;

         if r6wks8511 not in (-5,-4,0,.) then twks85=r6wks8511; if r6wks9411 not in (-5,-4,0,.) then twks94=r6wks9411;

         if r6wks8611 not in (-5,-4,0,.) then twks86=r6wks8611; if r6wks9511 not in (-5,-4,0,.) then twks95=r6wks9511;

         if r6wks8711 not in (-5,-4,0,.) then twks87=r6wks8711; if r6wks9611 not in (-5,-4,0,.) then twks96=r6wks9611;

         if r6wks8811 not in (-5,-4,0,.) then twks88=r6wks8811; if r6wks9711 not in (-5,-4,0,.) then twks97=r6wks9711;

                                        if r6wks9811 not in (-5,-4,0,.) then twks98=r6wks9811;

                                        if r6wks9911 not in (-5,-4,0,.) then twks99=r6wks9911;

                                        if r6wks0011 not in (-5,-4,0,.) then twks00=r6wks0011;

                                        if r6wks0111 not in (-5,-4,0,.) then twks01=r6wks0111;

                                        if r6wks0211 not in (-5,-4,0,.) then twks02=r6wks0211;

        end;

     end;

 

     do over match11;

        if match11=6 and r7wks03=>0 and r6wks0311=>0 then do;

           twks03=r6wks0311+r7wks03;

        end;

        if match11=6 and (-4<r7wks03<0 or -4<r6wks0311<0) then do;

           twks03=-3;

        end;

     end;

 

  end;

 

 

  /* For respondents last interviewed in Round 6, 2002 */

  if r6int_y=2002 then do;

     do over match1;

        if match1=6 then do;

           if r6wks801 not in (-5,-4,0,.) then twks80=r6wks801;   if r6wks891 not in (-5,-4,0,.) then twks89=r6wks891;

       if r6wks811 not in (-5,-4,0,.) then twks81=r6wks811;   if r6wks901 not in (-5,-4,0,.) then twks90=r6wks901;

       if r6wks821 not in (-5,-4,0,.) then twks82=r6wks821;   if r6wks911 not in (-5,-4,0,.) then twks91=r6wks911;

       if r6wks831 not in (-5,-4,0,.) then twks83=r6wks831;   if r6wks921 not in (-5,-4,0,.) then twks92=r6wks921;

       if r6wks841 not in (-5,-4,0,.) then twks84=r6wks841;   if r6wks931 not in (-5,-4,0,.) then twks93=r6wks931;

       if r6wks851 not in (-5,-4,0,.) then twks85=r6wks851;   if r6wks941 not in (-5,-4,0,.) then twks94=r6wks941;

       if r6wks861 not in (-5,-4,0,.) then twks86=r6wks861;   if r6wks951 not in (-5,-4,0,.) then twks95=r6wks951;

       if r6wks871 not in (-5,-4,0,.) then twks87=r6wks871;   if r6wks961 not in (-5,-4,0,.) then twks96=r6wks961;

           if r6wks881 not in (-5,-4,0,.) then twks88=r6wks881;   if r6wks971 not in (-5,-4,0,.) then twks97=r6wks971;

                                      if r6wks981 not in (-5,-4,0,.) then twks98=r6wks981 ;

                                      if r6wks991 not in (-5,-4,0,.) then twks99=r6wks991 ;

                                      if r6wks001 not in (-5,-4,0,.) then twks00=r6wks001 ;

                                      if r6wks011 not in (-5,-4,0,.) then twks01=r6wks011 ;

 

        end;

     end;

 

     do over match1;

        if match1=6 and r7wks02=>0 and r6wks021=>0 then do;

           twks02=r6wks021+r7wks02;

        end;

        if match1=6 and (-4<r7wks02<0 or -4<r6wks021<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match1;

        if match1=5 then do;

           if r5wks801 not in (-5,-4,0,.) then twks80=r5wks801;   if r5wks891 not in (-5,-4,0,.) then twks89=r5wks891;

       if r5wks811 not in (-5,-4,0,.) then twks81=r5wks811;   if r5wks901 not in (-5,-4,0,.) then twks90=r5wks901;

       if r5wks821 not in (-5,-4,0,.) then twks82=r5wks821;   if r5wks911 not in (-5,-4,0,.) then twks91=r5wks911;

       if r5wks831 not in (-5,-4,0,.) then twks83=r5wks831;   if r5wks921 not in (-5,-4,0,.) then twks92=r5wks921;

       if r5wks841 not in (-5,-4,0,.) then twks84=r5wks841;   if r5wks931 not in (-5,-4,0,.) then twks93=r5wks931;

       if r5wks851 not in (-5,-4,0,.) then twks85=r5wks851;   if r5wks941 not in (-5,-4,0,.) then twks94=r5wks941;

       if r5wks861 not in (-5,-4,0,.) then twks86=r5wks861;   if r5wks951 not in (-5,-4,0,.) then twks95=r5wks951;

       if r5wks871 not in (-5,-4,0,.) then twks87=r5wks871;   if r5wks961 not in (-5,-4,0,.) then twks96=r5wks961;

           if r5wks881 not in (-5,-4,0,.) then twks88=r5wks881;   if r5wks971 not in (-5,-4,0,.) then twks97=r5wks971;

                                      if r5wks981 not in (-5,-4,0,.) then twks98=r5wks981 ;

                                      if r5wks991 not in (-5,-4,0,.) then twks99=r5wks991 ;

                                      if r5wks001 not in (-5,-4,0,.) then twks00=r5wks001 ;

                                      if r5wks011 not in (-5,-4,0,.) then twks01=r5wks011 ;

 

        end;

     end;

 

     do over match1;

        if match1=5 and r7wks02=>0 and r5wks021=>0 then do;

           twks02=r5wks021+r7wks02;

        end;

        if match1=5 and (-4<r7wks02<0 or -4<r5wks021<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match1;

        if match1=4 then do;

           if r4wks801 not in (-5,-4,0,.) then twks80=r4wks801;   if r4wks891 not in (-5,-4,0,.) then twks89=r4wks891;

       if r4wks811 not in (-5,-4,0,.) then twks81=r4wks811;   if r4wks901 not in (-5,-4,0,.) then twks90=r4wks901;

       if r4wks821 not in (-5,-4,0,.) then twks82=r4wks821;   if r4wks911 not in (-5,-4,0,.) then twks91=r4wks911;

       if r4wks831 not in (-5,-4,0,.) then twks83=r4wks831;   if r4wks921 not in (-5,-4,0,.) then twks92=r4wks921;

       if r4wks841 not in (-5,-4,0,.) then twks84=r4wks841;   if r4wks931 not in (-5,-4,0,.) then twks93=r4wks931;

       if r4wks851 not in (-5,-4,0,.) then twks85=r4wks851;   if r4wks941 not in (-5,-4,0,.) then twks94=r4wks941;

       if r4wks861 not in (-5,-4,0,.) then twks86=r4wks861;   if r4wks951 not in (-5,-4,0,.) then twks95=r4wks951;

       if r4wks871 not in (-5,-4,0,.) then twks87=r4wks871;   if r4wks961 not in (-5,-4,0,.) then twks96=r4wks961;

           if r4wks881 not in (-5,-4,0,.) then twks88=r4wks881;   if r4wks971 not in (-5,-4,0,.) then twks97=r4wks971;

                                      if r4wks981 not in (-5,-4,0,.) then twks98=r4wks981 ;

                                      if r4wks991 not in (-5,-4,0,.) then twks99=r4wks991 ;

                                      if r4wks001 not in (-5,-4,0,.) then twks00=r4wks001 ;

        end;

     end;

 

     do over match1;

        if match1=4 and r7wks01=>0 and r4wks011=>0 then do;

           twks01=r4wks011+r7wks01;

        end;

        if match1=4 and (-4<r7wks01<0 or -4<r4wks011<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match1;

        if match1=3 then do;

           if r3wks801 not in (-5,-4,0,.) then twks80=r3wks801;   if r3wks891 not in (-5,-4,0,.) then twks89=r3wks891;

       if r3wks811 not in (-5,-4,0,.) then twks81=r3wks811;   if r3wks901 not in (-5,-4,0,.) then twks90=r3wks901;

       if r3wks821 not in (-5,-4,0,.) then twks82=r3wks821;   if r3wks911 not in (-5,-4,0,.) then twks91=r3wks911;

       if r3wks831 not in (-5,-4,0,.) then twks83=r3wks831;   if r3wks921 not in (-5,-4,0,.) then twks92=r3wks921;

       if r3wks841 not in (-5,-4,0,.) then twks84=r3wks841;   if r3wks931 not in (-5,-4,0,.) then twks93=r3wks931;

       if r3wks851 not in (-5,-4,0,.) then twks85=r3wks851;   if r3wks941 not in (-5,-4,0,.) then twks94=r3wks941;

       if r3wks861 not in (-5,-4,0,.) then twks86=r3wks861;   if r3wks951 not in (-5,-4,0,.) then twks95=r3wks951;

       if r3wks871 not in (-5,-4,0,.) then twks87=r3wks871;   if r3wks961 not in (-5,-4,0,.) then twks96=r3wks961;

           if r3wks881 not in (-5,-4,0,.) then twks88=r3wks881;   if r3wks971 not in (-5,-4,0,.) then twks97=r3wks971;

                                      if r3wks981 not in (-5,-4,0,.) then twks98=r3wks981 ;

                                      if r3wks991 not in (-5,-4,0,.) then twks99=r3wks991 ;

        end;

     end;

 

     do over match1;

        if match1=3 and r7wks00=>0 and r3wks001=>0 then do;

           twks00=r3wks001+r7wks00;

        end;

        if match1=3 and (-4<r7wks00<0 or -4<r3wks001<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match1;

        if match1=2 then do;

           if r2wks801 not in (-5,-4,0,.) then twks80=r2wks801;   if r2wks891 not in (-5,-4,0,.) then twks89=r2wks891;

           if r2wks811 not in (-5,-4,0,.) then twks81=r2wks811;   if r2wks901 not in (-5,-4,0,.) then twks90=r2wks901;

       if r2wks821 not in (-5,-4,0,.) then twks82=r2wks821;   if r2wks911 not in (-5,-4,0,.) then twks91=r2wks911;

       if r2wks831 not in (-5,-4,0,.) then twks83=r2wks831;   if r2wks921 not in (-5,-4,0,.) then twks92=r2wks921;

       if r2wks841 not in (-5,-4,0,.) then twks84=r2wks841;   if r2wks931 not in (-5,-4,0,.) then twks93=r2wks931;

       if r2wks851 not in (-5,-4,0,.) then twks85=r2wks851;   if r2wks941 not in (-5,-4,0,.) then twks94=r2wks941;

       if r2wks861 not in (-5,-4,0,.) then twks86=r2wks861;   if r2wks951 not in (-5,-4,0,.) then twks95=r2wks951;

       if r2wks871 not in (-5,-4,0,.) then twks87=r2wks871;   if r2wks961 not in (-5,-4,0,.) then twks96=r2wks961;

           if r2wks881 not in (-5,-4,0,.) then twks88=r2wks881;   if r2wks971 not in (-5,-4,0,.) then twks97=r2wks971;

        end;

     end;

 

     do over match1;

        if match1=2 and r7wks98=>0 and r2wks981=>0 then do;

           twks98=r2wks981+r7wks98;

        end;

        if match1=2 and (-4<r7wks98<0 or -4<r2wks981<0) then do;

           twks98=-3;

        end;

     end;

 

 

     do over match2;

        if match2=6 then do;

           if r6wks802 not in (-5,-4,0,.) then twks80=r6wks802;   if r6wks892 not in (-5,-4,0,.) then twks89=r6wks892;

           if r6wks812 not in (-5,-4,0,.) then twks81=r6wks812;   if r6wks902 not in (-5,-4,0,.) then twks90=r6wks902;

       if r6wks822 not in (-5,-4,0,.) then twks82=r6wks822;   if r6wks912 not in (-5,-4,0,.) then twks91=r6wks912;

       if r6wks832 not in (-5,-4,0,.) then twks83=r6wks832;   if r6wks922 not in (-5,-4,0,.) then twks92=r6wks922;

       if r6wks842 not in (-5,-4,0,.) then twks84=r6wks842;   if r6wks932 not in (-5,-4,0,.) then twks93=r6wks932;

       if r6wks852 not in (-5,-4,0,.) then twks85=r6wks852;   if r6wks942 not in (-5,-4,0,.) then twks94=r6wks942;

       if r6wks862 not in (-5,-4,0,.) then twks86=r6wks862;   if r6wks952 not in (-5,-4,0,.) then twks95=r6wks952;

       if r6wks872 not in (-5,-4,0,.) then twks87=r6wks872;   if r6wks962 not in (-5,-4,0,.) then twks96=r6wks962;

           if r6wks882 not in (-5,-4,0,.) then twks88=r6wks882;   if r6wks972 not in (-5,-4,0,.) then twks97=r6wks972;

                                      if r6wks982 not in (-5,-4,0,.) then twks98=r6wks982 ;

                                      if r6wks992 not in (-5,-4,0,.) then twks99=r6wks992 ;

                                      if r6wks002 not in (-5,-4,0,.) then twks00=r6wks002 ;

                                      if r6wks012 not in (-5,-4,0,.) then twks01=r6wks012 ;

        end;

     end;

 

     do over match2;

        if match2=6 and r7wks02=>0 and r6wks022=>0 then do;

           twks02=r6wks022+r7wks02;

        end;

        if match2=6 and (-4<r7wks02<0 or -4<r6wks022<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match2;

        if match2=5 then do;

           if r5wks802 not in (-5,-4,0,.) then twks80=r5wks802;   if r5wks892 not in (-5,-4,0,.) then twks89=r5wks892;

           if r5wks812 not in (-5,-4,0,.) then twks81=r5wks812;   if r5wks902 not in (-5,-4,0,.) then twks90=r5wks902;

       if r5wks822 not in (-5,-4,0,.) then twks82=r5wks822;   if r5wks912 not in (-5,-4,0,.) then twks91=r5wks912;

       if r5wks832 not in (-5,-4,0,.) then twks83=r5wks832;   if r5wks922 not in (-5,-4,0,.) then twks92=r5wks922;

       if r5wks842 not in (-5,-4,0,.) then twks84=r5wks842;   if r5wks932 not in (-5,-4,0,.) then twks93=r5wks932;

       if r5wks852 not in (-5,-4,0,.) then twks85=r5wks852;   if r5wks942 not in (-5,-4,0,.) then twks94=r5wks942;

       if r5wks862 not in (-5,-4,0,.) then twks86=r5wks862;   if r5wks952 not in (-5,-4,0,.) then twks95=r5wks952;

       if r5wks872 not in (-5,-4,0,.) then twks87=r5wks872;   if r5wks962 not in (-5,-4,0,.) then twks96=r5wks962;

           if r5wks882 not in (-5,-4,0,.) then twks88=r5wks882;   if r5wks972 not in (-5,-4,0,.) then twks97=r5wks972;

                                      if r5wks982 not in (-5,-4,0,.) then twks98=r5wks982 ;

                                      if r5wks992 not in (-5,-4,0,.) then twks99=r5wks992 ;

                                      if r5wks002 not in (-5,-4,0,.) then twks00=r5wks002 ;

                                      if r5wks012 not in (-5,-4,0,.) then twks01=r5wks012 ;

 

        end;

     end;

 

     do over match2;

        if match2=5 and r7wks02=>0 and r5wks022=>0 then do;

           twks02=r5wks022+r7wks02;

        end;

        if match2=5 and (-4<r7wks02<0 or -4<r5wks022<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match2;

        if match2=4 then do;

           if r4wks802 not in (-5,-4,0,.) then twks80=r4wks802;   if r4wks892 not in (-5,-4,0,.) then twks89=r4wks892;

           if r4wks812 not in (-5,-4,0,.) then twks81=r4wks812;   if r4wks902 not in (-5,-4,0,.) then twks90=r4wks902;

       if r4wks822 not in (-5,-4,0,.) then twks82=r4wks822;   if r4wks912 not in (-5,-4,0,.) then twks91=r4wks912;

       if r4wks832 not in (-5,-4,0,.) then twks83=r4wks832;   if r4wks922 not in (-5,-4,0,.) then twks92=r4wks922;

       if r4wks842 not in (-5,-4,0,.) then twks84=r4wks842;   if r4wks932 not in (-5,-4,0,.) then twks93=r4wks932;

       if r4wks852 not in (-5,-4,0,.) then twks85=r4wks852;   if r4wks942 not in (-5,-4,0,.) then twks94=r4wks942;

       if r4wks862 not in (-5,-4,0,.) then twks86=r4wks862;   if r4wks952 not in (-5,-4,0,.) then twks95=r4wks952;

       if r4wks872 not in (-5,-4,0,.) then twks87=r4wks872;   if r4wks962 not in (-5,-4,0,.) then twks96=r4wks962;

           if r4wks882 not in (-5,-4,0,.) then twks88=r4wks882;   if r4wks972 not in (-5,-4,0,.) then twks97=r4wks972;

                                      if r4wks982 not in (-5,-4,0,.) then twks98=r4wks982 ;

                                      if r4wks992 not in (-5,-4,0,.) then twks99=r4wks992 ;

        end;

     end;

 

     do over match2;

        if match2=4 and r7wks00=>0 and r4wks002=>0 then do;

           twks00=r4wks002+r7wks00;

        end;

        if match2=4 and (-4<r7wks00<0 or -4<r4wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982 ;

                                      if r3wks992 not in (-5,-4,0,.) then twks99=r3wks992 ;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks00=>0 and r3wks002=>0 then do;

           twks00=r3wks002+r7wks00;

        end;

        if match2=3 and (-4<r7wks00<0 or -4<r3wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=2 then do;

           if r2wks802 not in (-5,-4,0,.) then twks80=r2wks802;   if r2wks892 not in (-5,-4,0,.) then twks89=r2wks892;

       if r2wks812 not in (-5,-4,0,.) then twks81=r2wks812;   if r2wks902 not in (-5,-4,0,.) then twks90=r2wks902;

       if r2wks822 not in (-5,-4,0,.) then twks82=r2wks822;   if r2wks912 not in (-5,-4,0,.) then twks91=r2wks912;

       if r2wks832 not in (-5,-4,0,.) then twks83=r2wks832;   if r2wks922 not in (-5,-4,0,.) then twks92=r2wks922;

       if r2wks842 not in (-5,-4,0,.) then twks84=r2wks842;   if r2wks932 not in (-5,-4,0,.) then twks93=r2wks932;

       if r2wks852 not in (-5,-4,0,.) then twks85=r2wks852;   if r2wks942 not in (-5,-4,0,.) then twks94=r2wks942;

       if r2wks862 not in (-5,-4,0,.) then twks86=r2wks862;   if r2wks952 not in (-5,-4,0,.) then twks95=r2wks952;

       if r2wks872 not in (-5,-4,0,.) then twks87=r2wks872;   if r2wks962 not in (-5,-4,0,.) then twks96=r2wks962;

           if r2wks882 not in (-5,-4,0,.) then twks88=r2wks882;   if r2wks972 not in (-5,-4,0,.) then twks97=r2wks972;

        end;

     end;

 

     do over match2;

        if match2=2 and r7wks98=>0 and r2wks982=>0 then do;

           twks98=r2wks982+r7wks98;

        end;

        if match2=2 and (-4<r7wks98<0 or -4<r2wks982<0) then do;

           twks98=-3;

        end;

     end;

 

     do over match3;

        if match3=6 then do;

           if r6wks803 not in (-5,-4,0,.) then twks80=r6wks803;   if r6wks893 not in (-5,-4,0,.) then twks89=r6wks893;

       if r6wks813 not in (-5,-4,0,.) then twks81=r6wks813;   if r6wks903 not in (-5,-4,0,.) then twks90=r6wks903;

       if r6wks823 not in (-5,-4,0,.) then twks82=r6wks823;   if r6wks913 not in (-5,-4,0,.) then twks91=r6wks913;

       if r6wks833 not in (-5,-4,0,.) then twks83=r6wks833;   if r6wks923 not in (-5,-4,0,.) then twks92=r6wks923;

       if r6wks843 not in (-5,-4,0,.) then twks84=r6wks843;   if r6wks933 not in (-5,-4,0,.) then twks93=r6wks933;

       if r6wks853 not in (-5,-4,0,.) then twks85=r6wks853;   if r6wks943 not in (-5,-4,0,.) then twks94=r6wks943;

       if r6wks863 not in (-5,-4,0,.) then twks86=r6wks863;   if r6wks953 not in (-5,-4,0,.) then twks95=r6wks953;

       if r6wks873 not in (-5,-4,0,.) then twks87=r6wks873;   if r6wks963 not in (-5,-4,0,.) then twks96=r6wks963;

           if r6wks883 not in (-5,-4,0,.) then twks88=r6wks883;   if r6wks973 not in (-5,-4,0,.) then twks97=r6wks973;

                                      if r6wks983 not in (-5,-4,0,.) then twks98=r6wks983 ;

                                      if r6wks993 not in (-5,-4,0,.) then twks99=r6wks993 ;

                                      if r6wks003 not in (-5,-4,0,.) then twks00=r6wks003 ;

                                      if r6wks013 not in (-5,-4,0,.) then twks01=r6wks013 ;

        end;

     end;

 

     do over match3;

        if match3=6 and r7wks02=>0 and r6wks023=>0 then do;

           twks02=r6wks023+r7wks02;

        end;

        if match3=6 and (-4<r7wks02<0 or -4<r6wks023<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match3;

        if match3=5 then do;

           if r5wks803 not in (-5,-4,0,.) then twks80=r5wks803;   if r5wks893 not in (-5,-4,0,.) then twks89=r5wks893;

       if r5wks813 not in (-5,-4,0,.) then twks81=r5wks813;   if r5wks903 not in (-5,-4,0,.) then twks90=r5wks903;

       if r5wks823 not in (-5,-4,0,.) then twks82=r5wks823;   if r5wks913 not in (-5,-4,0,.) then twks91=r5wks913;

       if r5wks833 not in (-5,-4,0,.) then twks83=r5wks833;   if r5wks923 not in (-5,-4,0,.) then twks92=r5wks923;

       if r5wks843 not in (-5,-4,0,.) then twks84=r5wks843;   if r5wks933 not in (-5,-4,0,.) then twks93=r5wks933;

       if r5wks853 not in (-5,-4,0,.) then twks85=r5wks853;   if r5wks943 not in (-5,-4,0,.) then twks94=r5wks943;

       if r5wks863 not in (-5,-4,0,.) then twks86=r5wks863;   if r5wks953 not in (-5,-4,0,.) then twks95=r5wks953;

       if r5wks873 not in (-5,-4,0,.) then twks87=r5wks873;   if r5wks963 not in (-5,-4,0,.) then twks96=r5wks963;

           if r5wks883 not in (-5,-4,0,.) then twks88=r5wks883;   if r5wks973 not in (-5,-4,0,.) then twks97=r5wks973;

                                      if r5wks983 not in (-5,-4,0,.) then twks98=r5wks983 ;

                                      if r5wks993 not in (-5,-4,0,.) then twks99=r5wks993 ;

                                      if r5wks003 not in (-5,-4,0,.) then twks00=r5wks003 ;

                                      if r5wks013 not in (-5,-4,0,.) then twks01=r5wks013 ;

 

        end;

     end;

 

     do over match3;

        if match3=5 and r7wks02=>0 and r5wks023=>0 then do;

           twks02=r5wks023+r7wks02;

        end;

        if match3=5 and (-4<r7wks02<0 or -4<r5wks023<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match3;

        if match3=4 then do;

           if r4wks803 not in (-5,-4,0,.) then twks80=r4wks803;   if r4wks893 not in (-5,-4,0,.) then twks89=r4wks893;

       if r4wks813 not in (-5,-4,0,.) then twks81=r4wks813;   if r4wks903 not in (-5,-4,0,.) then twks90=r4wks903;

       if r4wks823 not in (-5,-4,0,.) then twks82=r4wks823;   if r4wks913 not in (-5,-4,0,.) then twks91=r4wks913;

       if r4wks833 not in (-5,-4,0,.) then twks83=r4wks833;   if r4wks923 not in (-5,-4,0,.) then twks92=r4wks923;

       if r4wks843 not in (-5,-4,0,.) then twks84=r4wks843;   if r4wks933 not in (-5,-4,0,.) then twks93=r4wks933;

       if r4wks853 not in (-5,-4,0,.) then twks85=r4wks853;   if r4wks943 not in (-5,-4,0,.) then twks94=r4wks943;

       if r4wks863 not in (-5,-4,0,.) then twks86=r4wks863;   if r4wks953 not in (-5,-4,0,.) then twks95=r4wks953;

       if r4wks873 not in (-5,-4,0,.) then twks87=r4wks873;   if r4wks963 not in (-5,-4,0,.) then twks96=r4wks963;

           if r4wks883 not in (-5,-4,0,.) then twks88=r4wks883;   if r4wks973 not in (-5,-4,0,.) then twks97=r4wks973;

                                      if r4wks983 not in (-5,-4,0,.) then twks98=r4wks983 ;

                                      if r4wks993 not in (-5,-4,0,.) then twks99=r4wks993 ;

                                      if r4wks003 not in (-5,-4,0,.) then twks00=r4wks003 ;

        end;

     end;

 

     do over match3;

        if match3=4 and r7wks01=>0 and r4wks013=>0 then do;

           twks01=r4wks013+r7wks01;

        end;

        if match3=4 and (-4<r7wks01<0 or -4<r4wks013<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match3;

        if match3=3 then do;

           if r3wks803 not in (-5,-4,0,.) then twks80=r3wks803;   if r3wks893 not in (-5,-4,0,.) then twks89=r3wks893;

       if r3wks813 not in (-5,-4,0,.) then twks81=r3wks813;   if r3wks903 not in (-5,-4,0,.) then twks90=r3wks903;

       if r3wks823 not in (-5,-4,0,.) then twks82=r3wks823;   if r3wks913 not in (-5,-4,0,.) then twks91=r3wks913;

       if r3wks833 not in (-5,-4,0,.) then twks83=r3wks833;   if r3wks923 not in (-5,-4,0,.) then twks92=r3wks923;

       if r3wks843 not in (-5,-4,0,.) then twks84=r3wks843;   if r3wks933 not in (-5,-4,0,.) then twks93=r3wks933;

       if r3wks853 not in (-5,-4,0,.) then twks85=r3wks853;   if r3wks943 not in (-5,-4,0,.) then twks94=r3wks943;

       if r3wks863 not in (-5,-4,0,.) then twks86=r3wks863;   if r3wks953 not in (-5,-4,0,.) then twks95=r3wks953;

       if r3wks873 not in (-5,-4,0,.) then twks87=r3wks873;   if r3wks963 not in (-5,-4,0,.) then twks96=r3wks963;

           if r3wks883 not in (-5,-4,0,.) then twks88=r3wks883;   if r3wks973 not in (-5,-4,0,.) then twks97=r3wks973;

                                      if r3wks983 not in (-5,-4,0,.) then twks98=r3wks983 ;

                                      if r3wks993 not in (-5,-4,0,.) then twks99=r3wks993 ;

        end;

     end;

 

     do over match3;

        if match3=3 and r7wks00=>0 and r3wks003=>0 then do;

           twks00=r3wks003+r7wks00;

        end;

        if match3=3 and (-4<r7wks00<0 or -4<r3wks003<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match4;

        if match4=6 then do;

           if r6wks804 not in (-5,-4,0,.) then twks80=r6wks804;   if r6wks894 not in (-5,-4,0,.) then twks89=r6wks894;

       if r6wks814 not in (-5,-4,0,.) then twks81=r6wks814;   if r6wks904 not in (-5,-4,0,.) then twks90=r6wks904;

       if r6wks824 not in (-5,-4,0,.) then twks82=r6wks824;   if r6wks914 not in (-5,-4,0,.) then twks91=r6wks914;

       if r6wks834 not in (-5,-4,0,.) then twks83=r6wks834;   if r6wks924 not in (-5,-4,0,.) then twks92=r6wks924;

       if r6wks844 not in (-5,-4,0,.) then twks84=r6wks844;   if r6wks934 not in (-5,-4,0,.) then twks93=r6wks934;

       if r6wks854 not in (-5,-4,0,.) then twks85=r6wks854;   if r6wks944 not in (-5,-4,0,.) then twks94=r6wks944;

       if r6wks864 not in (-5,-4,0,.) then twks86=r6wks864;   if r6wks954 not in (-5,-4,0,.) then twks95=r6wks954;

       if r6wks874 not in (-5,-4,0,.) then twks87=r6wks874;   if r6wks964 not in (-5,-4,0,.) then twks96=r6wks964;

           if r6wks884 not in (-5,-4,0,.) then twks88=r6wks884;   if r6wks974 not in (-5,-4,0,.) then twks97=r6wks974;

                                  if r6wks984 not in (-5,-4,0,.) then twks98=r6wks984;

                                  if r6wks994 not in (-5,-4,0,.) then twks99=r6wks994;

                                  if r6wks004 not in (-5,-4,0,.) then twks00=r6wks004;

                                  if r6wks014 not in (-5,-4,0,.) then twks01=r6wks014;

        end;

     end;

 

     do over match4;

        if match4=6 and r7wks02=>0 and r6wks024=>0 then do;

           twks02=r6wks024+r7wks02;

        end;

        if match4=6 and (-4<r7wks02<0 or -4<r6wks024<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match4;

        if match4=5 then do;

           if r5wks804 not in (-5,-4,0,.) then twks80=r5wks804;   if r5wks894 not in (-5,-4,0,.) then twks89=r5wks894;

       if r5wks814 not in (-5,-4,0,.) then twks81=r5wks814;   if r5wks904 not in (-5,-4,0,.) then twks90=r5wks904;

       if r5wks824 not in (-5,-4,0,.) then twks82=r5wks824;   if r5wks914 not in (-5,-4,0,.) then twks91=r5wks914;

       if r5wks834 not in (-5,-4,0,.) then twks83=r5wks834;   if r5wks924 not in (-5,-4,0,.) then twks92=r5wks924;

       if r5wks844 not in (-5,-4,0,.) then twks84=r5wks844;   if r5wks934 not in (-5,-4,0,.) then twks93=r5wks934;

       if r5wks854 not in (-5,-4,0,.) then twks85=r5wks854;   if r5wks944 not in (-5,-4,0,.) then twks94=r5wks944;

       if r5wks864 not in (-5,-4,0,.) then twks86=r5wks864;   if r5wks954 not in (-5,-4,0,.) then twks95=r5wks954;

       if r5wks874 not in (-5,-4,0,.) then twks87=r5wks874;   if r5wks964 not in (-5,-4,0,.) then twks96=r5wks964;

           if r5wks884 not in (-5,-4,0,.) then twks88=r5wks884;   if r5wks974 not in (-5,-4,0,.) then twks97=r5wks974;

                                  if r5wks984 not in (-5,-4,0,.) then twks98=r5wks984;

                                  if r5wks994 not in (-5,-4,0,.) then twks99=r5wks994;

                                  if r5wks004 not in (-5,-4,0,.) then twks00=r5wks004;

                                  if r5wks014 not in (-5,-4,0,.) then twks01=r5wks014;

 

        end;

     end;

 

     do over match4;

        if match4=5 and r7wks02=>0 and r5wks024=>0 then do;

           twks02=r5wks024+r7wks02;

        end;

        if match4=5 and (-4<r7wks02<0 or -4<r5wks024<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match4;

        if match4=4 then do;

           if r4wks804 not in (-5,-4,0,.) then twks80=r4wks804;   if r4wks894 not in (-5,-4,0,.) then twks89=r4wks894;

       if r4wks814 not in (-5,-4,0,.) then twks81=r4wks814;   if r4wks904 not in (-5,-4,0,.) then twks90=r4wks904;

       if r4wks824 not in (-5,-4,0,.) then twks82=r4wks824;   if r4wks914 not in (-5,-4,0,.) then twks91=r4wks914;

       if r4wks834 not in (-5,-4,0,.) then twks83=r4wks834;   if r4wks924 not in (-5,-4,0,.) then twks92=r4wks924;

       if r4wks844 not in (-5,-4,0,.) then twks84=r4wks844;   if r4wks934 not in (-5,-4,0,.) then twks93=r4wks934;

       if r4wks854 not in (-5,-4,0,.) then twks85=r4wks854;   if r4wks944 not in (-5,-4,0,.) then twks94=r4wks944;

       if r4wks864 not in (-5,-4,0,.) then twks86=r4wks864;   if r4wks954 not in (-5,-4,0,.) then twks95=r4wks954;

       if r4wks874 not in (-5,-4,0,.) then twks87=r4wks874;   if r4wks964 not in (-5,-4,0,.) then twks96=r4wks964;

           if r4wks884 not in (-5,-4,0,.) then twks88=r4wks884;   if r4wks974 not in (-5,-4,0,.) then twks97=r4wks974;

                                  if r4wks984 not in (-5,-4,0,.) then twks98=r4wks984;

                                  if r4wks994 not in (-5,-4,0,.) then twks99=r4wks994;

                                  if r4wks004 not in (-5,-4,0,.) then twks00=r4wks004;

        end;

     end;

 

     do over match4;

        if match4=4 and r7wks01=>0 and r4wks014=>0 then do;

           twks01=r4wks014+r7wks01;

        end;

        if match4=4 and (-4<r7wks01<0 or -4<r4wks014<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match4;

        if match4=3 then do;

           if r3wks804 not in (-5,-4,0,.) then twks80=r3wks804;   if r3wks894 not in (-5,-4,0,.) then twks89=r3wks894;

       if r3wks814 not in (-5,-4,0,.) then twks81=r3wks814;   if r3wks904 not in (-5,-4,0,.) then twks90=r3wks904;

       if r3wks824 not in (-5,-4,0,.) then twks82=r3wks824;   if r3wks914 not in (-5,-4,0,.) then twks91=r3wks914;

       if r3wks834 not in (-5,-4,0,.) then twks83=r3wks834;   if r3wks924 not in (-5,-4,0,.) then twks92=r3wks924;

       if r3wks844 not in (-5,-4,0,.) then twks84=r3wks844;   if r3wks934 not in (-5,-4,0,.) then twks93=r3wks934;

       if r3wks854 not in (-5,-4,0,.) then twks85=r3wks854;   if r3wks944 not in (-5,-4,0,.) then twks94=r3wks944;

       if r3wks864 not in (-5,-4,0,.) then twks86=r3wks864;   if r3wks954 not in (-5,-4,0,.) then twks95=r3wks954;

       if r3wks874 not in (-5,-4,0,.) then twks87=r3wks874;   if r3wks964 not in (-5,-4,0,.) then twks96=r3wks964;

           if r3wks884 not in (-5,-4,0,.) then twks88=r3wks884;   if r3wks974 not in (-5,-4,0,.) then twks97=r3wks974;

                                  if r3wks984 not in (-5,-4,0,.) then twks98=r3wks984;

                                  if r3wks994 not in (-5,-4,0,.) then twks99=r3wks994;

        end;

     end;

 

     do over match4;

        if match4=3 and r7wks00=>0 and r3wks004=>0 then do;

           twks00=r3wks004+r7wks00;

        end;

        if match4=3 and (-4<r7wks00<0 or -4<r3wks004<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match5;

        if match5=6 then do;

           if r6wks805 not in (-5,-4,0,.) then twks80=r6wks805;   if r6wks895 not in (-5,-4,0,.) then twks89=r6wks895;

       if r6wks815 not in (-5,-4,0,.) then twks81=r6wks815;   if r6wks905 not in (-5,-4,0,.) then twks90=r6wks905;

       if r6wks825 not in (-5,-4,0,.) then twks82=r6wks825;   if r6wks915 not in (-5,-4,0,.) then twks91=r6wks915;

       if r6wks835 not in (-5,-4,0,.) then twks83=r6wks835;   if r6wks925 not in (-5,-4,0,.) then twks92=r6wks925;

       if r6wks845 not in (-5,-4,0,.) then twks84=r6wks845;   if r6wks935 not in (-5,-4,0,.) then twks93=r6wks935;

       if r6wks855 not in (-5,-4,0,.) then twks85=r6wks855;   if r6wks945 not in (-5,-4,0,.) then twks94=r6wks945;

       if r6wks865 not in (-5,-4,0,.) then twks86=r6wks865;   if r6wks955 not in (-5,-4,0,.) then twks95=r6wks955;

       if r6wks875 not in (-5,-4,0,.) then twks87=r6wks875;   if r6wks965 not in (-5,-4,0,.) then twks96=r6wks965;

           if r6wks885 not in (-5,-4,0,.) then twks88=r6wks885;   if r6wks975 not in (-5,-4,0,.) then twks97=r6wks975;

                                      if r6wks985 not in (-5,-4,0,.) then twks98=r6wks985 ;

                                      if r6wks995 not in (-5,-4,0,.) then twks99=r6wks995 ;

                                      if r6wks005 not in (-5,-4,0,.) then twks00=r6wks005 ;

                                      if r6wks015 not in (-5,-4,0,.) then twks01=r6wks015 ;

        end;

     end;

 

     do over match5;

        if match5=6 and r7wks02=>0 and r6wks025=>0 then do;

           twks02=r6wks025+r7wks02;

        end;

        if match5=6 and (-4<r7wks02<0 or -4<r6wks025<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match5;

        if match5=5 then do;

           if r5wks805 not in (-5,-4,0,.) then twks80=r5wks805;   if r5wks895 not in (-5,-4,0,.) then twks89=r5wks895;

       if r5wks815 not in (-5,-4,0,.) then twks81=r5wks815;   if r5wks905 not in (-5,-4,0,.) then twks90=r5wks905;

       if r5wks825 not in (-5,-4,0,.) then twks82=r5wks825;   if r5wks915 not in (-5,-4,0,.) then twks91=r5wks915;

       if r5wks835 not in (-5,-4,0,.) then twks83=r5wks835;   if r5wks925 not in (-5,-4,0,.) then twks92=r5wks925;

       if r5wks845 not in (-5,-4,0,.) then twks84=r5wks845;   if r5wks935 not in (-5,-4,0,.) then twks93=r5wks935;

       if r5wks855 not in (-5,-4,0,.) then twks85=r5wks855;   if r5wks945 not in (-5,-4,0,.) then twks94=r5wks945;

       if r5wks865 not in (-5,-4,0,.) then twks86=r5wks865;   if r5wks955 not in (-5,-4,0,.) then twks95=r5wks955;

       if r5wks875 not in (-5,-4,0,.) then twks87=r5wks875;   if r5wks965 not in (-5,-4,0,.) then twks96=r5wks965;

           if r5wks885 not in (-5,-4,0,.) then twks88=r5wks885;   if r5wks975 not in (-5,-4,0,.) then twks97=r5wks975;

                                      if r5wks985 not in (-5,-4,0,.) then twks98=r5wks985 ;

                                      if r5wks995 not in (-5,-4,0,.) then twks99=r5wks995 ;

                                      if r5wks005 not in (-5,-4,0,.) then twks00=r5wks005 ;

                                      if r5wks015 not in (-5,-4,0,.) then twks01=r5wks015 ;

        end;

     end;

 

     do over match5;

        if match5=5 and r7wks02=>0 and r5wks025=>0 then do;

           twks02=r5wks025+r7wks02;

        end;

        if match5=5 and (-4<r7wks02<0 or -4<r5wks025<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match5;

        if match5=4 then do;

           if r4wks805 not in (-5,-4,0,.) then twks80=r4wks805;   if r4wks895 not in (-5,-4,0,.) then twks89=r4wks895;

       if r4wks815 not in (-5,-4,0,.) then twks81=r4wks815;   if r4wks905 not in (-5,-4,0,.) then twks90=r4wks905;

       if r4wks825 not in (-5,-4,0,.) then twks82=r4wks825;   if r4wks915 not in (-5,-4,0,.) then twks91=r4wks915;

       if r4wks835 not in (-5,-4,0,.) then twks83=r4wks835;   if r4wks925 not in (-5,-4,0,.) then twks92=r4wks925;

       if r4wks845 not in (-5,-4,0,.) then twks84=r4wks845;   if r4wks935 not in (-5,-4,0,.) then twks93=r4wks935;

       if r4wks855 not in (-5,-4,0,.) then twks85=r4wks855;   if r4wks945 not in (-5,-4,0,.) then twks94=r4wks945;

       if r4wks865 not in (-5,-4,0,.) then twks86=r4wks865;   if r4wks955 not in (-5,-4,0,.) then twks95=r4wks955;

       if r4wks875 not in (-5,-4,0,.) then twks87=r4wks875;   if r4wks965 not in (-5,-4,0,.) then twks96=r4wks965;

           if r4wks885 not in (-5,-4,0,.) then twks88=r4wks885;   if r4wks975 not in (-5,-4,0,.) then twks97=r4wks975;

                                      if r4wks985 not in (-5,-4,0,.) then twks98=r4wks985 ;

                                      if r4wks995 not in (-5,-4,0,.) then twks99=r4wks995 ;

        end;

     end;

 

     do over match5;

        if match5=4 and r7wks00=>0 and r4wks005=>0 then do;

           twks00=r4wks005+r7wks00;

        end;

        if match5=4 and (-4<r7wks00<0 or -4<r4wks005<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match6;

        if match6=6 then do;

           if r6wks806 not in (-5,-4,0,.) then twks80=r6wks806;   if r6wks896 not in (-5,-4,0,.) then twks89=r6wks896;

       if r6wks816 not in (-5,-4,0,.) then twks81=r6wks816;   if r6wks906 not in (-5,-4,0,.) then twks90=r6wks906;

       if r6wks826 not in (-5,-4,0,.) then twks82=r6wks826;   if r6wks916 not in (-5,-4,0,.) then twks91=r6wks916;

       if r6wks836 not in (-5,-4,0,.) then twks83=r6wks836;   if r6wks926 not in (-5,-4,0,.) then twks92=r6wks926;

       if r6wks846 not in (-5,-4,0,.) then twks84=r6wks846;   if r6wks936 not in (-5,-4,0,.) then twks93=r6wks936;

       if r6wks856 not in (-5,-4,0,.) then twks85=r6wks856;   if r6wks946 not in (-5,-4,0,.) then twks94=r6wks946;

       if r6wks866 not in (-5,-4,0,.) then twks86=r6wks866;   if r6wks956 not in (-5,-4,0,.) then twks95=r6wks956;

       if r6wks876 not in (-5,-4,0,.) then twks87=r6wks876;   if r6wks966 not in (-5,-4,0,.) then twks96=r6wks966;

           if r6wks886 not in (-5,-4,0,.) then twks88=r6wks886;   if r6wks976 not in (-5,-4,0,.) then twks97=r6wks976;

                                      if r6wks986 not in (-5,-4,0,.) then twks98=r6wks986;

                                      if r6wks996 not in (-5,-4,0,.) then twks99=r6wks996;

                                      if r6wks006 not in (-5,-4,0,.) then twks00=r6wks006;

                                      if r6wks016 not in (-5,-4,0,.) then twks01=r6wks016;

        end;

     end;

 

     do over match6;

        if match6=6 and r7wks02=>0 and r6wks026=>0 then do;

           twks02=r6wks026+r7wks02;

        end;

        if match6=6 and (-4<r7wks02<0 or -4<r6wks026<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match6;

        if match6=4 then do;

           if r4wks806 not in (-5,-4,0,.) then twks80=r4wks806;   if r4wks896 not in (-5,-4,0,.) then twks89=r4wks896;

       if r4wks816 not in (-5,-4,0,.) then twks81=r4wks816;   if r4wks906 not in (-5,-4,0,.) then twks90=r4wks906;

       if r4wks826 not in (-5,-4,0,.) then twks82=r4wks826;   if r4wks916 not in (-5,-4,0,.) then twks91=r4wks916;

       if r4wks836 not in (-5,-4,0,.) then twks83=r4wks836;   if r4wks926 not in (-5,-4,0,.) then twks92=r4wks926;

       if r4wks846 not in (-5,-4,0,.) then twks84=r4wks846;   if r4wks936 not in (-5,-4,0,.) then twks93=r4wks936;

       if r4wks856 not in (-5,-4,0,.) then twks85=r4wks856;   if r4wks946 not in (-5,-4,0,.) then twks94=r4wks946;

       if r4wks866 not in (-5,-4,0,.) then twks86=r4wks866;   if r4wks956 not in (-5,-4,0,.) then twks95=r4wks956;

       if r4wks876 not in (-5,-4,0,.) then twks87=r4wks876;   if r4wks966 not in (-5,-4,0,.) then twks96=r4wks966;

           if r4wks886 not in (-5,-4,0,.) then twks88=r4wks886;   if r4wks976 not in (-5,-4,0,.) then twks97=r4wks976;

                                      if r4wks986 not in (-5,-4,0,.) then twks98=r4wks986;

                                      if r4wks996 not in (-5,-4,0,.) then twks99=r4wks996;

        end;

     end;

 

     do over match6;

        if match6=4 and r7wks00=>0 and r4wks006=>0 then do;

           twks00=r4wks006+r7wks00;

        end;

        if match6=4 and (-4<r7wks00<0 or -4<r4wks006<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match7;

        if match7=6 then do;

           if r6wks807 not in (-5,-4,0,.) then twks80=r6wks807;   if r6wks897 not in (-5,-4,0,.) then twks89=r6wks897;

       if r6wks817 not in (-5,-4,0,.) then twks81=r6wks817;   if r6wks907 not in (-5,-4,0,.) then twks90=r6wks907;

       if r6wks827 not in (-5,-4,0,.) then twks82=r6wks827;   if r6wks917 not in (-5,-4,0,.) then twks91=r6wks917;

       if r6wks837 not in (-5,-4,0,.) then twks83=r6wks837;   if r6wks927 not in (-5,-4,0,.) then twks92=r6wks927;

       if r6wks847 not in (-5,-4,0,.) then twks84=r6wks847;   if r6wks937 not in (-5,-4,0,.) then twks93=r6wks937;

       if r6wks857 not in (-5,-4,0,.) then twks85=r6wks857;   if r6wks947 not in (-5,-4,0,.) then twks94=r6wks947;

       if r6wks867 not in (-5,-4,0,.) then twks86=r6wks867;   if r6wks957 not in (-5,-4,0,.) then twks95=r6wks957;

       if r6wks877 not in (-5,-4,0,.) then twks87=r6wks877;   if r6wks967 not in (-5,-4,0,.) then twks96=r6wks967;

           if r6wks887 not in (-5,-4,0,.) then twks88=r6wks887;   if r6wks977 not in (-5,-4,0,.) then twks97=r6wks977;

                                      if r6wks987 not in (-5,-4,0,.) then twks98=r6wks987;

                                      if r6wks997 not in (-5,-4,0,.) then twks99=r6wks997;

                                      if r6wks007 not in (-5,-4,0,.) then twks00=r6wks007;

                                      if r6wks017 not in (-5,-4,0,.) then twks01=r6wks017;

        end;

     end;

 

     do over match7;

        if match7=6 and r7wks02=>0 and r6wks027=>0 then do;

           twks02=r6wks027+r7wks02;

        end;

        if match7=6 and (-4<r7wks02<0 or -4<r6wks027<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match8;

        if match8=6 then do;

           if r6wks808 not in (-5,-4,0,.) then twks80=r6wks808;   if r6wks898 not in (-5,-4,0,.) then twks89=r6wks898;

       if r6wks818 not in (-5,-4,0,.) then twks81=r6wks818;   if r6wks908 not in (-5,-4,0,.) then twks90=r6wks908;

       if r6wks828 not in (-5,-4,0,.) then twks82=r6wks828;   if r6wks918 not in (-5,-4,0,.) then twks91=r6wks918;

       if r6wks838 not in (-5,-4,0,.) then twks83=r6wks838;   if r6wks928 not in (-5,-4,0,.) then twks92=r6wks928;

       if r6wks848 not in (-5,-4,0,.) then twks84=r6wks848;   if r6wks938 not in (-5,-4,0,.) then twks93=r6wks938;

       if r6wks858 not in (-5,-4,0,.) then twks85=r6wks858;   if r6wks948 not in (-5,-4,0,.) then twks94=r6wks948;

       if r6wks868 not in (-5,-4,0,.) then twks86=r6wks868;   if r6wks958 not in (-5,-4,0,.) then twks95=r6wks958;

       if r6wks878 not in (-5,-4,0,.) then twks87=r6wks878;   if r6wks968 not in (-5,-4,0,.) then twks96=r6wks968;

           if r6wks888 not in (-5,-4,0,.) then twks88=r6wks888;   if r6wks978 not in (-5,-4,0,.) then twks97=r6wks978;

                                      if r6wks988 not in (-5,-4,0,.) then twks98=r6wks988;

                                      if r6wks998 not in (-5,-4,0,.) then twks99=r6wks998;

                                      if r6wks008 not in (-5,-4,0,.) then twks00=r6wks008;

                                      if r6wks018 not in (-5,-4,0,.) then twks01=r6wks018;

        end;

     end;

 

     do over match8;

        if match8=6 and r7wks02=>0 and r6wks028=>0 then do;

           twks02=r6wks028+r7wks02;

        end;

        if match8=6 and (-4<r7wks02<0 or -4<r6wks028<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match9;

        if match9=6 then do;

           if r6wks809 not in (-5,-4,0,.) then twks80=r6wks809;   if r6wks899 not in (-5,-4,0,.) then twks89=r6wks899;

       if r6wks819 not in (-5,-4,0,.) then twks81=r6wks819;   if r6wks909 not in (-5,-4,0,.) then twks90=r6wks909;

       if r6wks829 not in (-5,-4,0,.) then twks82=r6wks829;   if r6wks919 not in (-5,-4,0,.) then twks91=r6wks919;

       if r6wks839 not in (-5,-4,0,.) then twks83=r6wks839;   if r6wks929 not in (-5,-4,0,.) then twks92=r6wks929;

       if r6wks849 not in (-5,-4,0,.) then twks84=r6wks849;   if r6wks939 not in (-5,-4,0,.) then twks93=r6wks939;

       if r6wks859 not in (-5,-4,0,.) then twks85=r6wks859;   if r6wks949 not in (-5,-4,0,.) then twks94=r6wks949;

       if r6wks869 not in (-5,-4,0,.) then twks86=r6wks869;   if r6wks959 not in (-5,-4,0,.) then twks95=r6wks959;

       if r6wks879 not in (-5,-4,0,.) then twks87=r6wks879;   if r6wks969 not in (-5,-4,0,.) then twks96=r6wks969;

           if r6wks889 not in (-5,-4,0,.) then twks88=r6wks889;   if r6wks979 not in (-5,-4,0,.) then twks97=r6wks979;

                                      if r6wks989 not in (-5,-4,0,.) then twks98=r6wks989;

                                      if r6wks999 not in (-5,-4,0,.) then twks99=r6wks999;

                                      if r6wks009 not in (-5,-4,0,.) then twks00=r6wks009;

                                      if r6wks019 not in (-5,-4,0,.) then twks01=r6wks019;

        end;

     end;

 

     do over match9;

        if match9=6 and r7wks02=>0 and r6wks029=>0 then do;

           twks02=r6wks029+r7wks02;

        end;

        if match9=6 and (-4<r7wks02<0 or -4<r6wks029<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match10;

        if match10=6 then do;

         if r6wks8010 not in (-5,-4,0,.) then twks80=r6wks8010; if r6wks8910 not in (-5,-4,0,.) then twks89=r6wks8910;

         if r6wks8110 not in (-5,-4,0,.) then twks81=r6wks8110; if r6wks9010 not in (-5,-4,0,.) then twks90=r6wks9010;

         if r6wks8210 not in (-5,-4,0,.) then twks82=r6wks8210; if r6wks9110 not in (-5,-4,0,.) then twks91=r6wks9110;

         if r6wks8310 not in (-5,-4,0,.) then twks83=r6wks8310; if r6wks9210 not in (-5,-4,0,.) then twks92=r6wks9210;

         if r6wks8410 not in (-5,-4,0,.) then twks84=r6wks8410; if r6wks9310 not in (-5,-4,0,.) then twks93=r6wks9310;

         if r6wks8510 not in (-5,-4,0,.) then twks85=r6wks8510; if r6wks9410 not in (-5,-4,0,.) then twks94=r6wks9410;

         if r6wks8610 not in (-5,-4,0,.) then twks86=r6wks8610; if r6wks9510 not in (-5,-4,0,.) then twks95=r6wks9510;

         if r6wks8710 not in (-5,-4,0,.) then twks87=r6wks8710; if r6wks9610 not in (-5,-4,0,.) then twks96=r6wks9610;

         if r6wks8810 not in (-5,-4,0,.) then twks88=r6wks8810; if r6wks9710 not in (-5,-4,0,.) then twks97=r6wks9710;

                                        if r6wks9810 not in (-5,-4,0,.) then twks98=r6wks9810;

                                        if r6wks9910 not in (-5,-4,0,.) then twks99=r6wks9910;

                                        if r6wks0010 not in (-5,-4,0,.) then twks00=r6wks0010;

                                        if r6wks0110 not in (-5,-4,0,.) then twks01=r6wks0110;

 

        end;

     end;

 

     do over match10;

        if match10=6 and r7wks02=>0 and r6wks0210=>0 then do;

           twks02=r6wks0210+r7wks02;

        end;

        if match10=6 and (-4<r7wks02<0 or -4<r6wks0210<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match11;

        if match11=6 then do;

         if r6wks8011 not in (-5,-4,0,.) then twks80=r6wks8011; if r6wks8911 not in (-5,-4,0,.) then twks89=r6wks8911;

         if r6wks8111 not in (-5,-4,0,.) then twks81=r6wks8111; if r6wks9011 not in (-5,-4,0,.) then twks90=r6wks9011;

         if r6wks8211 not in (-5,-4,0,.) then twks82=r6wks8211; if r6wks9111 not in (-5,-4,0,.) then twks91=r6wks9111;

         if r6wks8311 not in (-5,-4,0,.) then twks83=r6wks8311; if r6wks9211 not in (-5,-4,0,.) then twks92=r6wks9211;

         if r6wks8411 not in (-5,-4,0,.) then twks84=r6wks8411; if r6wks9311 not in (-5,-4,0,.) then twks93=r6wks9311;

         if r6wks8511 not in (-5,-4,0,.) then twks85=r6wks8511; if r6wks9411 not in (-5,-4,0,.) then twks94=r6wks9411;

         if r6wks8611 not in (-5,-4,0,.) then twks86=r6wks8611; if r6wks9511 not in (-5,-4,0,.) then twks95=r6wks9511;

         if r6wks8711 not in (-5,-4,0,.) then twks87=r6wks8711; if r6wks9611 not in (-5,-4,0,.) then twks96=r6wks9611;

         if r6wks8811 not in (-5,-4,0,.) then twks88=r6wks8811; if r6wks9711 not in (-5,-4,0,.) then twks97=r6wks9711;

                                        if r6wks9811 not in (-5,-4,0,.) then twks98=r6wks9811;

                                        if r6wks9911 not in (-5,-4,0,.) then twks99=r6wks9911;

                                        if r6wks0011 not in (-5,-4,0,.) then twks00=r6wks0011;

                                        if r6wks0111 not in (-5,-4,0,.) then twks01=r6wks0111;

 

        end;

     end;

 

     do over match11;

        if match11=6 and r7wks02=>0 and r6wks0211=>0 then do;

           twks02=r6wks0211+r7wks02;

        end;

        if match11=6 and (-4<r7wks02<0 or -4<r6wks0211<0) then do;

           twks02=-3;

        end;

     end;

 

 

  end;

 

 

  /* For respondents last interviewed in Round 5, 2002 */

  if r5int_y=2002 and r6int=-4 then do;

     do over match1;

        if match1=5 then do;

           if r5wks801 not in (-5,-4,0,.) then twks80=r5wks801;   if r5wks891 not in (-5,-4,0,.) then twks89=r5wks891;

       if r5wks811 not in (-5,-4,0,.) then twks81=r5wks811;   if r5wks901 not in (-5,-4,0,.) then twks90=r5wks901;

       if r5wks821 not in (-5,-4,0,.) then twks82=r5wks821;   if r5wks911 not in (-5,-4,0,.) then twks91=r5wks911;

       if r5wks831 not in (-5,-4,0,.) then twks83=r5wks831;   if r5wks921 not in (-5,-4,0,.) then twks92=r5wks921;

       if r5wks841 not in (-5,-4,0,.) then twks84=r5wks841;   if r5wks931 not in (-5,-4,0,.) then twks93=r5wks931;

       if r5wks851 not in (-5,-4,0,.) then twks85=r5wks851;   if r5wks941 not in (-5,-4,0,.) then twks94=r5wks941;

       if r5wks861 not in (-5,-4,0,.) then twks86=r5wks861;   if r5wks951 not in (-5,-4,0,.) then twks95=r5wks951;

       if r5wks871 not in (-5,-4,0,.) then twks87=r5wks871;   if r5wks961 not in (-5,-4,0,.) then twks96=r5wks961;

           if r5wks881 not in (-5,-4,0,.) then twks88=r5wks881;   if r5wks971 not in (-5,-4,0,.) then twks97=r5wks971;

                                      if r5wks981 not in (-5,-4,0,.) then twks98=r5wks981;

                                      if r5wks991 not in (-5,-4,0,.) then twks99=r5wks991;

                                      if r5wks001 not in (-5,-4,0,.) then twks00=r5wks001;

                                      if r5wks011 not in (-5,-4,0,.) then twks01=r5wks011;

 

        end;

     end;

 

     do over match1;

        if match1=5 and r7wks02=>0 and r5wks021=>0 then do;

           twks02=r5wks021+r7wks02;

        end;

        if match1=5 and (-4<r7wks02<0 or -4<r5wks021<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match1;

        if match1=4 then do;

           if r4wks801 not in (-5,-4,0,.) then twks80=r4wks801;   if r4wks891 not in (-5,-4,0,.) then twks89=r4wks891;

       if r4wks811 not in (-5,-4,0,.) then twks81=r4wks811;   if r4wks901 not in (-5,-4,0,.) then twks90=r4wks901;

       if r4wks821 not in (-5,-4,0,.) then twks82=r4wks821;   if r4wks911 not in (-5,-4,0,.) then twks91=r4wks911;

       if r4wks831 not in (-5,-4,0,.) then twks83=r4wks831;   if r4wks921 not in (-5,-4,0,.) then twks92=r4wks921;

       if r4wks841 not in (-5,-4,0,.) then twks84=r4wks841;   if r4wks931 not in (-5,-4,0,.) then twks93=r4wks931;

       if r4wks851 not in (-5,-4,0,.) then twks85=r4wks851;   if r4wks941 not in (-5,-4,0,.) then twks94=r4wks941;

       if r4wks861 not in (-5,-4,0,.) then twks86=r4wks861;   if r4wks951 not in (-5,-4,0,.) then twks95=r4wks951;

       if r4wks871 not in (-5,-4,0,.) then twks87=r4wks871;   if r4wks961 not in (-5,-4,0,.) then twks96=r4wks961;

           if r4wks881 not in (-5,-4,0,.) then twks88=r4wks881;   if r4wks971 not in (-5,-4,0,.) then twks97=r4wks971;

                                      if r4wks981 not in (-5,-4,0,.) then twks98=r4wks981;

                                      if r4wks991 not in (-5,-4,0,.) then twks99=r4wks991;

                                      if r4wks001 not in (-5,-4,0,.) then twks00=r4wks001;

        end;

     end;

 

     do over match1;

        if match1=4 and r7wks01=>0 and r4wks011=>0 then do;

           twks01=r4wks011+r7wks01;

        end;

        if match1=4 and (-4<r7wks01<0 or -4<r4wks011<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match2;

        if match2=5 then do;

           if r5wks802 not in (-5,-4,0,.) then twks80=r5wks802;   if r5wks892 not in (-5,-4,0,.) then twks89=r5wks892;

           if r5wks812 not in (-5,-4,0,.) then twks81=r5wks812;   if r5wks902 not in (-5,-4,0,.) then twks90=r5wks902;

       if r5wks822 not in (-5,-4,0,.) then twks82=r5wks822;   if r5wks912 not in (-5,-4,0,.) then twks91=r5wks912;

       if r5wks832 not in (-5,-4,0,.) then twks83=r5wks832;   if r5wks922 not in (-5,-4,0,.) then twks92=r5wks922;

       if r5wks842 not in (-5,-4,0,.) then twks84=r5wks842;   if r5wks932 not in (-5,-4,0,.) then twks93=r5wks932;

       if r5wks852 not in (-5,-4,0,.) then twks85=r5wks852;   if r5wks942 not in (-5,-4,0,.) then twks94=r5wks942;

       if r5wks862 not in (-5,-4,0,.) then twks86=r5wks862;   if r5wks952 not in (-5,-4,0,.) then twks95=r5wks952;

       if r5wks872 not in (-5,-4,0,.) then twks87=r5wks872;   if r5wks962 not in (-5,-4,0,.) then twks96=r5wks962;

           if r5wks882 not in (-5,-4,0,.) then twks88=r5wks882;   if r5wks972 not in (-5,-4,0,.) then twks97=r5wks972;

                                      if r5wks982 not in (-5,-4,0,.) then twks98=r5wks982;

                                      if r5wks992 not in (-5,-4,0,.) then twks99=r5wks992;

                                      if r5wks002 not in (-5,-4,0,.) then twks00=r5wks002;

                                      if r5wks012 not in (-5,-4,0,.) then twks01=r5wks012;

 

        end;

     end;

 

     do over match2;

        if match2=5 and r7wks02=>0 and r5wks022=>0 then do;

           twks02=r5wks022+r7wks02;

        end;

        if match2=5 and (-4<r7wks02<0 or -4<r5wks022<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match2;

        if match2=4 then do;

           if r4wks802 not in (-5,-4,0,.) then twks80=r4wks802;   if r4wks892 not in (-5,-4,0,.) then twks89=r4wks892;

           if r4wks812 not in (-5,-4,0,.) then twks81=r4wks812;   if r4wks902 not in (-5,-4,0,.) then twks90=r4wks902;

       if r4wks822 not in (-5,-4,0,.) then twks82=r4wks822;   if r4wks912 not in (-5,-4,0,.) then twks91=r4wks912;

       if r4wks832 not in (-5,-4,0,.) then twks83=r4wks832;   if r4wks922 not in (-5,-4,0,.) then twks92=r4wks922;

       if r4wks842 not in (-5,-4,0,.) then twks84=r4wks842;   if r4wks932 not in (-5,-4,0,.) then twks93=r4wks932;

       if r4wks852 not in (-5,-4,0,.) then twks85=r4wks852;   if r4wks942 not in (-5,-4,0,.) then twks94=r4wks942;

       if r4wks862 not in (-5,-4,0,.) then twks86=r4wks862;   if r4wks952 not in (-5,-4,0,.) then twks95=r4wks952;

       if r4wks872 not in (-5,-4,0,.) then twks87=r4wks872;   if r4wks962 not in (-5,-4,0,.) then twks96=r4wks962;

           if r4wks882 not in (-5,-4,0,.) then twks88=r4wks882;   if r4wks972 not in (-5,-4,0,.) then twks97=r4wks972;

                                      if r4wks982 not in (-5,-4,0,.) then twks98=r4wks982;

                                      if r4wks992 not in (-5,-4,0,.) then twks99=r4wks992;

                                      if r4wks002 not in (-5,-4,0,.) then twks00=r4wks002;

        end;

     end;

 

     do over match2;

        if match2=4 and r7wks01=>0 and r4wks012=>0 then do;

           twks01=r4wks012+r7wks01;

        end;

        if match2=4 and (-4<r7wks01<0 or -4<r4wks012<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match2;

        if match2=2 then do;

           if r2wks802 not in (-5,-4,0,.) then twks80=r2wks802;   if r2wks892 not in (-5,-4,0,.) then twks89=r2wks892;

       if r2wks812 not in (-5,-4,0,.) then twks81=r2wks812;   if r2wks902 not in (-5,-4,0,.) then twks90=r2wks902;

       if r2wks822 not in (-5,-4,0,.) then twks82=r2wks822;   if r2wks912 not in (-5,-4,0,.) then twks91=r2wks912;

       if r2wks832 not in (-5,-4,0,.) then twks83=r2wks832;   if r2wks922 not in (-5,-4,0,.) then twks92=r2wks922;

       if r2wks842 not in (-5,-4,0,.) then twks84=r2wks842;   if r2wks932 not in (-5,-4,0,.) then twks93=r2wks932;

       if r2wks852 not in (-5,-4,0,.) then twks85=r2wks852;   if r2wks942 not in (-5,-4,0,.) then twks94=r2wks942;

       if r2wks862 not in (-5,-4,0,.) then twks86=r2wks862;   if r2wks952 not in (-5,-4,0,.) then twks95=r2wks952;

       if r2wks872 not in (-5,-4,0,.) then twks87=r2wks872;   if r2wks962 not in (-5,-4,0,.) then twks96=r2wks962;

           if r2wks882 not in (-5,-4,0,.) then twks88=r2wks882;   if r2wks972 not in (-5,-4,0,.) then twks97=r2wks972;

        end;

     end;

 

     do over match2;

        if match2=2 and r7wks98=>0 and r2wks982=>0 then do;

           twks98=r2wks982+r7wks98;

        end;

        if match2=2 and (-4<r7wks98<0 or -4<r2wks982<0) then do;

           twks98=-3;

        end;

     end;

 

 

     do over match3;

        if match3=5 then do;

           if r5wks803 not in (-5,-4,0,.) then twks80=r5wks803;   if r5wks893 not in (-5,-4,0,.) then twks89=r5wks893;

       if r5wks813 not in (-5,-4,0,.) then twks81=r5wks813;   if r5wks903 not in (-5,-4,0,.) then twks90=r5wks903;

       if r5wks823 not in (-5,-4,0,.) then twks82=r5wks823;   if r5wks913 not in (-5,-4,0,.) then twks91=r5wks913;

       if r5wks833 not in (-5,-4,0,.) then twks83=r5wks833;   if r5wks923 not in (-5,-4,0,.) then twks92=r5wks923;

       if r5wks843 not in (-5,-4,0,.) then twks84=r5wks843;   if r5wks933 not in (-5,-4,0,.) then twks93=r5wks933;

       if r5wks853 not in (-5,-4,0,.) then twks85=r5wks853;   if r5wks943 not in (-5,-4,0,.) then twks94=r5wks943;

       if r5wks863 not in (-5,-4,0,.) then twks86=r5wks863;   if r5wks953 not in (-5,-4,0,.) then twks95=r5wks953;

       if r5wks873 not in (-5,-4,0,.) then twks87=r5wks873;   if r5wks963 not in (-5,-4,0,.) then twks96=r5wks963;

           if r5wks883 not in (-5,-4,0,.) then twks88=r5wks883;   if r5wks973 not in (-5,-4,0,.) then twks97=r5wks973;

                                      if r5wks983 not in (-5,-4,0,.) then twks98=r5wks983;

                                      if r5wks993 not in (-5,-4,0,.) then twks99=r5wks993;

                                      if r5wks003 not in (-5,-4,0,.) then twks00=r5wks003;

                                      if r5wks013 not in (-5,-4,0,.) then twks01=r5wks013;

 

        end;

     end;

 

     do over match3;

        if match3=5 and r7wks02=>0 and r5wks023=>0 then do;

           twks02=r5wks023+r7wks02;

        end;

        if match3=5 and (-4<r7wks02<0 or -4<r5wks023<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match4;

        if match4=5 then do;

           if r5wks804 not in (-5,-4,0,.) then twks80=r5wks804;   if r5wks894 not in (-5,-4,0,.) then twks89=r5wks894;

       if r5wks814 not in (-5,-4,0,.) then twks81=r5wks814;   if r5wks904 not in (-5,-4,0,.) then twks90=r5wks904;

       if r5wks824 not in (-5,-4,0,.) then twks82=r5wks824;   if r5wks914 not in (-5,-4,0,.) then twks91=r5wks914;

       if r5wks834 not in (-5,-4,0,.) then twks83=r5wks834;   if r5wks924 not in (-5,-4,0,.) then twks92=r5wks924;

       if r5wks844 not in (-5,-4,0,.) then twks84=r5wks844;   if r5wks934 not in (-5,-4,0,.) then twks93=r5wks934;

       if r5wks854 not in (-5,-4,0,.) then twks85=r5wks854;   if r5wks944 not in (-5,-4,0,.) then twks94=r5wks944;

       if r5wks864 not in (-5,-4,0,.) then twks86=r5wks864;   if r5wks954 not in (-5,-4,0,.) then twks95=r5wks954;

       if r5wks874 not in (-5,-4,0,.) then twks87=r5wks874;   if r5wks964 not in (-5,-4,0,.) then twks96=r5wks964;

           if r5wks884 not in (-5,-4,0,.) then twks88=r5wks884;   if r5wks974 not in (-5,-4,0,.) then twks97=r5wks974;

                                  if r5wks984 not in (-5,-4,0,.) then twks98=r5wks984;

                                  if r5wks994 not in (-5,-4,0,.) then twks99=r5wks994;

                                  if r5wks004 not in (-5,-4,0,.) then twks00=r5wks004;

                                  if r5wks014 not in (-5,-4,0,.) then twks01=r5wks014;

 

        end;

     end;

 

     do over match4;

        if match4=5 and r7wks02=>0 and r5wks024=>0 then do;

           twks02=r5wks024+r7wks02;

        end;

        if match4=5 and (-4<r7wks02<0 or -4<r5wks024<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match5;

        if match5=5 then do;

           if r5wks805 not in (-5,-4,0,.) then twks80=r5wks805;   if r5wks895 not in (-5,-4,0,.) then twks89=r5wks895;

       if r5wks815 not in (-5,-4,0,.) then twks81=r5wks815;   if r5wks905 not in (-5,-4,0,.) then twks90=r5wks905;

       if r5wks825 not in (-5,-4,0,.) then twks82=r5wks825;   if r5wks915 not in (-5,-4,0,.) then twks91=r5wks915;

       if r5wks835 not in (-5,-4,0,.) then twks83=r5wks835;   if r5wks925 not in (-5,-4,0,.) then twks92=r5wks925;

       if r5wks845 not in (-5,-4,0,.) then twks84=r5wks845;   if r5wks935 not in (-5,-4,0,.) then twks93=r5wks935;

       if r5wks855 not in (-5,-4,0,.) then twks85=r5wks855;   if r5wks945 not in (-5,-4,0,.) then twks94=r5wks945;

       if r5wks865 not in (-5,-4,0,.) then twks86=r5wks865;   if r5wks955 not in (-5,-4,0,.) then twks95=r5wks955;

       if r5wks875 not in (-5,-4,0,.) then twks87=r5wks875;   if r5wks965 not in (-5,-4,0,.) then twks96=r5wks965;

           if r5wks885 not in (-5,-4,0,.) then twks88=r5wks885;   if r5wks975 not in (-5,-4,0,.) then twks97=r5wks975;

                                      if r5wks985 not in (-5,-4,0,.) then twks98=r5wks985;

                                      if r5wks995 not in (-5,-4,0,.) then twks99=r5wks995;

                                      if r5wks005 not in (-5,-4,0,.) then twks00=r5wks005;

                                      if r5wks015 not in (-5,-4,0,.) then twks01=r5wks015;

        end;

     end;

 

     do over match5;

        if match5=5 and r7wks02=>0 and r5wks025=>0 then do;

           twks02=r5wks025+r7wks02;

        end;

        if match5=5 and (-4<r7wks02<0 or -4<r5wks025<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match6;

        if match6=5 then do;

           if r5wks806 not in (-5,-4,0,.) then twks80=r5wks806;   if r5wks896 not in (-5,-4,0,.) then twks89=r5wks896;

       if r5wks816 not in (-5,-4,0,.) then twks81=r5wks816;   if r5wks906 not in (-5,-4,0,.) then twks90=r5wks906;

       if r5wks826 not in (-5,-4,0,.) then twks82=r5wks826;   if r5wks916 not in (-5,-4,0,.) then twks91=r5wks916;

       if r5wks836 not in (-5,-4,0,.) then twks83=r5wks836;   if r5wks926 not in (-5,-4,0,.) then twks92=r5wks926;

       if r5wks846 not in (-5,-4,0,.) then twks84=r5wks846;   if r5wks936 not in (-5,-4,0,.) then twks93=r5wks936;

       if r5wks856 not in (-5,-4,0,.) then twks85=r5wks856;   if r5wks946 not in (-5,-4,0,.) then twks94=r5wks946;

       if r5wks866 not in (-5,-4,0,.) then twks86=r5wks866;   if r5wks956 not in (-5,-4,0,.) then twks95=r5wks956;

       if r5wks876 not in (-5,-4,0,.) then twks87=r5wks876;   if r5wks966 not in (-5,-4,0,.) then twks96=r5wks966;

           if r5wks886 not in (-5,-4,0,.) then twks88=r5wks886;   if r5wks976 not in (-5,-4,0,.) then twks97=r5wks976;

                                      if r5wks986 not in (-5,-4,0,.) then twks98=r5wks986;

                                      if r5wks996 not in (-5,-4,0,.) then twks99=r5wks996;

                                      if r5wks006 not in (-5,-4,0,.) then twks00=r5wks006;

                                      if r5wks016 not in (-5,-4,0,.) then twks01=r5wks016;

        end;

     end;

 

     do over match6;

        if match6=5 and r7wks02=>0 and r5wks026=>0 then do;

           twks02=r5wks026+r7wks02;

        end;

        if match6=5 and (-4<r7wks02<0 or -4<r5wks026<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match7;

        if match7=5 then do;

           if r5wks807 not in (-5,-4,0,.) then twks80=r5wks807;   if r5wks897 not in (-5,-4,0,.) then twks89=r5wks897;

       if r5wks817 not in (-5,-4,0,.) then twks81=r5wks817;   if r5wks907 not in (-5,-4,0,.) then twks90=r5wks907;

       if r5wks827 not in (-5,-4,0,.) then twks82=r5wks827;   if r5wks917 not in (-5,-4,0,.) then twks91=r5wks917;

       if r5wks837 not in (-5,-4,0,.) then twks83=r5wks837;   if r5wks927 not in (-5,-4,0,.) then twks92=r5wks927;

       if r5wks847 not in (-5,-4,0,.) then twks84=r5wks847;   if r5wks937 not in (-5,-4,0,.) then twks93=r5wks937;

       if r5wks857 not in (-5,-4,0,.) then twks85=r5wks857;   if r5wks947 not in (-5,-4,0,.) then twks94=r5wks947;

       if r5wks867 not in (-5,-4,0,.) then twks86=r5wks867;   if r5wks957 not in (-5,-4,0,.) then twks95=r5wks957;

       if r5wks877 not in (-5,-4,0,.) then twks87=r5wks877;   if r5wks967 not in (-5,-4,0,.) then twks96=r5wks967;

           if r5wks887 not in (-5,-4,0,.) then twks88=r5wks887;   if r5wks977 not in (-5,-4,0,.) then twks97=r5wks977;

                                      if r5wks987 not in (-5,-4,0,.) then twks98=r5wks987;

                                      if r5wks997 not in (-5,-4,0,.) then twks99=r5wks997;

                                      if r5wks007 not in (-5,-4,0,.) then twks00=r5wks007;

                                      if r5wks017 not in (-5,-4,0,.) then twks01=r5wks017;

        end;

     end;

 

     do over match7;

        if match7=5 and r7wks02=>0 and r5wks027=>0 then do;

           twks02=r5wks027+r7wks02;

        end;

        if match7=5 and (-4<r7wks02<0 or -4<r5wks027<0) then do;

           twks02=-3;

        end;

     end;

 

     do over match8;

        if match8=5 then do;

           if r5wks808 not in (-5,-4,0,.) then twks80=r5wks808;   if r5wks898 not in (-5,-4,0,.) then twks89=r5wks898;

       if r5wks818 not in (-5,-4,0,.) then twks81=r5wks818;   if r5wks908 not in (-5,-4,0,.) then twks90=r5wks908;

       if r5wks828 not in (-5,-4,0,.) then twks82=r5wks828;   if r5wks918 not in (-5,-4,0,.) then twks91=r5wks918;

       if r5wks838 not in (-5,-4,0,.) then twks83=r5wks838;   if r5wks928 not in (-5,-4,0,.) then twks92=r5wks928;

       if r5wks848 not in (-5,-4,0,.) then twks84=r5wks848;   if r5wks938 not in (-5,-4,0,.) then twks93=r5wks938;

       if r5wks858 not in (-5,-4,0,.) then twks85=r5wks858;   if r5wks948 not in (-5,-4,0,.) then twks94=r5wks948;

       if r5wks868 not in (-5,-4,0,.) then twks86=r5wks868;   if r5wks958 not in (-5,-4,0,.) then twks95=r5wks958;

       if r5wks878 not in (-5,-4,0,.) then twks87=r5wks878;   if r5wks968 not in (-5,-4,0,.) then twks96=r5wks968;

           if r5wks888 not in (-5,-4,0,.) then twks88=r5wks888;   if r5wks978 not in (-5,-4,0,.) then twks97=r5wks978;

                                      if r5wks988 not in (-5,-4,0,.) then twks98=r5wks988;

                                      if r5wks998 not in (-5,-4,0,.) then twks99=r5wks998;

                                      if r5wks008 not in (-5,-4,0,.) then twks00=r5wks008;

                                      if r5wks018 not in (-5,-4,0,.) then twks01=r5wks018;

 

        end;

     end;

 

     do over match8;

        if match8=5 and r7wks02=>0 and r5wks028=>0 then do;

           twks02=r5wks028+r7wks02;

        end;

        if match8=5 and (-4<r7wks02<0 or -4<r5wks028<0) then do;

           twks02=-3;

        end;

     end;

 

  end;

 

 

  /* For respondents last interviewed in Round 5, 2001 */

  if r5int_y=2001 and r6int=-4 then do;

     do over match1;

        if match1=5 then do;

           if r5wks801 not in (-5,-4,0,.) then twks80=r5wks801;   if r5wks891 not in (-5,-4,0,.) then twks89=r5wks891;

       if r5wks811 not in (-5,-4,0,.) then twks81=r5wks811;   if r5wks901 not in (-5,-4,0,.) then twks90=r5wks901;

       if r5wks821 not in (-5,-4,0,.) then twks82=r5wks821;   if r5wks911 not in (-5,-4,0,.) then twks91=r5wks911;

       if r5wks831 not in (-5,-4,0,.) then twks83=r5wks831;   if r5wks921 not in (-5,-4,0,.) then twks92=r5wks921;

       if r5wks841 not in (-5,-4,0,.) then twks84=r5wks841;   if r5wks931 not in (-5,-4,0,.) then twks93=r5wks931;

       if r5wks851 not in (-5,-4,0,.) then twks85=r5wks851;   if r5wks941 not in (-5,-4,0,.) then twks94=r5wks941;

       if r5wks861 not in (-5,-4,0,.) then twks86=r5wks861;   if r5wks951 not in (-5,-4,0,.) then twks95=r5wks951;

       if r5wks871 not in (-5,-4,0,.) then twks87=r5wks871;   if r5wks961 not in (-5,-4,0,.) then twks96=r5wks961;

           if r5wks881 not in (-5,-4,0,.) then twks88=r5wks881;   if r5wks971 not in (-5,-4,0,.) then twks97=r5wks971;

                                      if r5wks981 not in (-5,-4,0,.) then twks98=r5wks981;

                                      if r5wks991 not in (-5,-4,0,.) then twks99=r5wks991;

                                      if r5wks001 not in (-5,-4,0,.) then twks00=r5wks001;

        end;

     end;

 

     do over match1;

        if match1=5 and r7wks01=>0 and r5wks011=>0 then do;

           twks01=r5wks011+r7wks01;

        end;

        if match1=5 and (-4<r7wks01<0 or -4<r5wks011<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match1;

        if match1=2 then do;

           if r2wks801 not in (-5,-4,0,.) then twks80=r2wks801;   if r2wks891 not in (-5,-4,0,.) then twks89=r2wks891;

           if r2wks811 not in (-5,-4,0,.) then twks81=r2wks811;   if r2wks901 not in (-5,-4,0,.) then twks90=r2wks901;

       if r2wks821 not in (-5,-4,0,.) then twks82=r2wks821;   if r2wks911 not in (-5,-4,0,.) then twks91=r2wks911;

       if r2wks831 not in (-5,-4,0,.) then twks83=r2wks831;   if r2wks921 not in (-5,-4,0,.) then twks92=r2wks921;

       if r2wks841 not in (-5,-4,0,.) then twks84=r2wks841;   if r2wks931 not in (-5,-4,0,.) then twks93=r2wks931;

       if r2wks851 not in (-5,-4,0,.) then twks85=r2wks851;   if r2wks941 not in (-5,-4,0,.) then twks94=r2wks941;

       if r2wks861 not in (-5,-4,0,.) then twks86=r2wks861;   if r2wks951 not in (-5,-4,0,.) then twks95=r2wks951;

       if r2wks871 not in (-5,-4,0,.) then twks87=r2wks871;   if r2wks961 not in (-5,-4,0,.) then twks96=r2wks961;

           if r2wks881 not in (-5,-4,0,.) then twks88=r2wks881;   if r2wks971 not in (-5,-4,0,.) then twks97=r2wks971;

        end;

     end;

 

     do over match1;

        if match1=2 and r7wks98=>0 and r2wks981=>0 then do;

           twks98=r2wks981+r7wks98;

        end;

        if match1=2 and (-4<r7wks98<0 or -4<r2wks981<0) then do;

           twks98=-3;

        end;

     end;

 

     do over match2;

        if match2=5 then do;

           if r5wks802 not in (-5,-4,0,.) then twks80=r5wks802;   if r5wks892 not in (-5,-4,0,.) then twks89=r5wks892;

           if r5wks812 not in (-5,-4,0,.) then twks81=r5wks812;   if r5wks902 not in (-5,-4,0,.) then twks90=r5wks902;

       if r5wks822 not in (-5,-4,0,.) then twks82=r5wks822;   if r5wks912 not in (-5,-4,0,.) then twks91=r5wks912;

       if r5wks832 not in (-5,-4,0,.) then twks83=r5wks832;   if r5wks922 not in (-5,-4,0,.) then twks92=r5wks922;

       if r5wks842 not in (-5,-4,0,.) then twks84=r5wks842;   if r5wks932 not in (-5,-4,0,.) then twks93=r5wks932;

       if r5wks852 not in (-5,-4,0,.) then twks85=r5wks852;   if r5wks942 not in (-5,-4,0,.) then twks94=r5wks942;

       if r5wks862 not in (-5,-4,0,.) then twks86=r5wks862;   if r5wks952 not in (-5,-4,0,.) then twks95=r5wks952;

       if r5wks872 not in (-5,-4,0,.) then twks87=r5wks872;   if r5wks962 not in (-5,-4,0,.) then twks96=r5wks962;

           if r5wks882 not in (-5,-4,0,.) then twks88=r5wks882;   if r5wks972 not in (-5,-4,0,.) then twks97=r5wks972;

                                      if r5wks982 not in (-5,-4,0,.) then twks98=r5wks982;

                                      if r5wks992 not in (-5,-4,0,.) then twks99=r5wks992;

                                      if r5wks002 not in (-5,-4,0,.) then twks00=r5wks002;

        end;

     end;

 

     do over match2;

        if match2=5 and r7wks01=>0 and r5wks012=>0 then do;

           twks01=r5wks012+r7wks01;

        end;

        if match2=5 and (-4<r7wks01<0 or -4<r5wks012<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks99=>0 and r3wks992=>0 then do;

           twks99=r3wks992+r7wks99;

        end;

        if match2=3 and (-4<r7wks99<0 or -4<r3wks992<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match3;

        if match3=5 then do;

           if r5wks803 not in (-5,-4,0,.) then twks80=r5wks803;   if r5wks893 not in (-5,-4,0,.) then twks89=r5wks893;

       if r5wks813 not in (-5,-4,0,.) then twks81=r5wks813;   if r5wks903 not in (-5,-4,0,.) then twks90=r5wks903;

       if r5wks823 not in (-5,-4,0,.) then twks82=r5wks823;   if r5wks913 not in (-5,-4,0,.) then twks91=r5wks913;

       if r5wks833 not in (-5,-4,0,.) then twks83=r5wks833;   if r5wks923 not in (-5,-4,0,.) then twks92=r5wks923;

       if r5wks843 not in (-5,-4,0,.) then twks84=r5wks843;   if r5wks933 not in (-5,-4,0,.) then twks93=r5wks933;

       if r5wks853 not in (-5,-4,0,.) then twks85=r5wks853;   if r5wks943 not in (-5,-4,0,.) then twks94=r5wks943;

       if r5wks863 not in (-5,-4,0,.) then twks86=r5wks863;   if r5wks953 not in (-5,-4,0,.) then twks95=r5wks953;

       if r5wks873 not in (-5,-4,0,.) then twks87=r5wks873;   if r5wks963 not in (-5,-4,0,.) then twks96=r5wks963;

           if r5wks883 not in (-5,-4,0,.) then twks88=r5wks883;   if r5wks973 not in (-5,-4,0,.) then twks97=r5wks973;

                                      if r5wks983 not in (-5,-4,0,.) then twks98=r5wks983;

                                      if r5wks993 not in (-5,-4,0,.) then twks99=r5wks993;

                                      if r5wks003 not in (-5,-4,0,.) then twks00=r5wks003;

        end;

     end;

 

     do over match3;

        if match3=5 and r7wks01=>0 and r5wks013=>0 then do;

           twks01=r5wks013+r7wks01;

        end;

        if match3=5 and (-4<r7wks01<0 or -4<r5wks013<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match4;

        if match4=5 then do;

           if r5wks804 not in (-5,-4,0,.) then twks80=r5wks804;   if r5wks894 not in (-5,-4,0,.) then twks89=r5wks894;

       if r5wks814 not in (-5,-4,0,.) then twks81=r5wks814;   if r5wks904 not in (-5,-4,0,.) then twks90=r5wks904;

       if r5wks824 not in (-5,-4,0,.) then twks82=r5wks824;   if r5wks914 not in (-5,-4,0,.) then twks91=r5wks914;

       if r5wks834 not in (-5,-4,0,.) then twks83=r5wks834;   if r5wks924 not in (-5,-4,0,.) then twks92=r5wks924;

       if r5wks844 not in (-5,-4,0,.) then twks84=r5wks844;   if r5wks934 not in (-5,-4,0,.) then twks93=r5wks934;

       if r5wks854 not in (-5,-4,0,.) then twks85=r5wks854;   if r5wks944 not in (-5,-4,0,.) then twks94=r5wks944;

       if r5wks864 not in (-5,-4,0,.) then twks86=r5wks864;   if r5wks954 not in (-5,-4,0,.) then twks95=r5wks954;

       if r5wks874 not in (-5,-4,0,.) then twks87=r5wks874;   if r5wks964 not in (-5,-4,0,.) then twks96=r5wks964;

           if r5wks884 not in (-5,-4,0,.) then twks88=r5wks884;   if r5wks974 not in (-5,-4,0,.) then twks97=r5wks974;

                                  if r5wks984 not in (-5,-4,0,.) then twks98=r5wks984;

                                  if r5wks994 not in (-5,-4,0,.) then twks99=r5wks994;

                                  if r5wks004 not in (-5,-4,0,.) then twks00=r5wks004;

        end;

     end;

 

     do over match4;

        if match4=5 and r7wks01=>0 and r5wks014=>0 then do;

           twks01=r5wks014+r7wks01;

        end;

        if match4=5 and (-4<r7wks01<0 or -4<r5wks014<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match5;

        if match5=5 then do;

           if r5wks805 not in (-5,-4,0,.) then twks80=r5wks805;   if r5wks895 not in (-5,-4,0,.) then twks89=r5wks895;

       if r5wks815 not in (-5,-4,0,.) then twks81=r5wks815;   if r5wks905 not in (-5,-4,0,.) then twks90=r5wks905;

       if r5wks825 not in (-5,-4,0,.) then twks82=r5wks825;   if r5wks915 not in (-5,-4,0,.) then twks91=r5wks915;

       if r5wks835 not in (-5,-4,0,.) then twks83=r5wks835;   if r5wks925 not in (-5,-4,0,.) then twks92=r5wks925;

       if r5wks845 not in (-5,-4,0,.) then twks84=r5wks845;   if r5wks935 not in (-5,-4,0,.) then twks93=r5wks935;

       if r5wks855 not in (-5,-4,0,.) then twks85=r5wks855;   if r5wks945 not in (-5,-4,0,.) then twks94=r5wks945;

       if r5wks865 not in (-5,-4,0,.) then twks86=r5wks865;   if r5wks955 not in (-5,-4,0,.) then twks95=r5wks955;

       if r5wks875 not in (-5,-4,0,.) then twks87=r5wks875;   if r5wks965 not in (-5,-4,0,.) then twks96=r5wks965;

           if r5wks885 not in (-5,-4,0,.) then twks88=r5wks885;   if r5wks975 not in (-5,-4,0,.) then twks97=r5wks975;

                                      if r5wks985 not in (-5,-4,0,.) then twks98=r5wks985;

                                      if r5wks995 not in (-5,-4,0,.) then twks99=r5wks995;

                                      if r5wks005 not in (-5,-4,0,.) then twks00=r5wks005;

        end;

     end;

 

     do over match5;

        if match5=5 and r7wks01=>0 and r5wks015=>0 then do;

           twks01=r5wks015+r7wks01;

        end;

        if match5=5 and (-4<r7wks01<0 or -4<r5wks015<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match6;

        if match6=5 then do;

           if r5wks806 not in (-5,-4,0,.) then twks80=r5wks806;   if r5wks896 not in (-5,-4,0,.) then twks89=r5wks896;

       if r5wks816 not in (-5,-4,0,.) then twks81=r5wks816;   if r5wks906 not in (-5,-4,0,.) then twks90=r5wks906;

       if r5wks826 not in (-5,-4,0,.) then twks82=r5wks826;   if r5wks916 not in (-5,-4,0,.) then twks91=r5wks916;

       if r5wks836 not in (-5,-4,0,.) then twks83=r5wks836;   if r5wks926 not in (-5,-4,0,.) then twks92=r5wks926;

       if r5wks846 not in (-5,-4,0,.) then twks84=r5wks846;   if r5wks936 not in (-5,-4,0,.) then twks93=r5wks936;

       if r5wks856 not in (-5,-4,0,.) then twks85=r5wks856;   if r5wks946 not in (-5,-4,0,.) then twks94=r5wks946;

       if r5wks866 not in (-5,-4,0,.) then twks86=r5wks866;   if r5wks956 not in (-5,-4,0,.) then twks95=r5wks956;

       if r5wks876 not in (-5,-4,0,.) then twks87=r5wks876;   if r5wks966 not in (-5,-4,0,.) then twks96=r5wks966;

           if r5wks886 not in (-5,-4,0,.) then twks88=r5wks886;   if r5wks976 not in (-5,-4,0,.) then twks97=r5wks976;

                                      if r5wks986 not in (-5,-4,0,.) then twks98=r5wks986;

                                      if r5wks996 not in (-5,-4,0,.) then twks99=r5wks996;

                                      if r5wks006 not in (-5,-4,0,.) then twks00=r5wks006;

        end;

     end;

 

     do over match6;

        if match6=5 and r7wks01=>0 and r5wks016=>0 then do;

           twks01=r5wks016+r7wks01;

        end;

        if match6=5 and (-4<r7wks01<0 or -4<r5wks016<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match7;

        if match7=5 then do;

           if r5wks807 not in (-5,-4,0,.) then twks80=r5wks807;   if r5wks897 not in (-5,-4,0,.) then twks89=r5wks897;

       if r5wks817 not in (-5,-4,0,.) then twks81=r5wks817;   if r5wks907 not in (-5,-4,0,.) then twks90=r5wks907;

       if r5wks827 not in (-5,-4,0,.) then twks82=r5wks827;   if r5wks917 not in (-5,-4,0,.) then twks91=r5wks917;

       if r5wks837 not in (-5,-4,0,.) then twks83=r5wks837;   if r5wks927 not in (-5,-4,0,.) then twks92=r5wks927;

       if r5wks847 not in (-5,-4,0,.) then twks84=r5wks847;   if r5wks937 not in (-5,-4,0,.) then twks93=r5wks937;

       if r5wks857 not in (-5,-4,0,.) then twks85=r5wks857;   if r5wks947 not in (-5,-4,0,.) then twks94=r5wks947;

       if r5wks867 not in (-5,-4,0,.) then twks86=r5wks867;   if r5wks957 not in (-5,-4,0,.) then twks95=r5wks957;

       if r5wks877 not in (-5,-4,0,.) then twks87=r5wks877;   if r5wks967 not in (-5,-4,0,.) then twks96=r5wks967;

           if r5wks887 not in (-5,-4,0,.) then twks88=r5wks887;   if r5wks977 not in (-5,-4,0,.) then twks97=r5wks977;

                                      if r5wks987 not in (-5,-4,0,.) then twks98=r5wks987;

                                      if r5wks997 not in (-5,-4,0,.) then twks99=r5wks997;

                                      if r5wks007 not in (-5,-4,0,.) then twks00=r5wks007;

        end;

     end;

 

     do over match7;

        if match7=5 and r7wks01=>0 and r5wks017=>0 then do;

           twks01=r5wks017+r7wks01;

        end;

        if match7=5 and (-4<r7wks01<0 or -4<r5wks017<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match8;

        if match8=5 then do;

           if r5wks808 not in (-5,-4,0,.) then twks80=r5wks808;   if r5wks898 not in (-5,-4,0,.) then twks89=r5wks898;

       if r5wks818 not in (-5,-4,0,.) then twks81=r5wks818;   if r5wks908 not in (-5,-4,0,.) then twks90=r5wks908;

       if r5wks828 not in (-5,-4,0,.) then twks82=r5wks828;   if r5wks918 not in (-5,-4,0,.) then twks91=r5wks918;

       if r5wks838 not in (-5,-4,0,.) then twks83=r5wks838;   if r5wks928 not in (-5,-4,0,.) then twks92=r5wks928;

       if r5wks848 not in (-5,-4,0,.) then twks84=r5wks848;   if r5wks938 not in (-5,-4,0,.) then twks93=r5wks938;

       if r5wks858 not in (-5,-4,0,.) then twks85=r5wks858;   if r5wks948 not in (-5,-4,0,.) then twks94=r5wks948;

       if r5wks868 not in (-5,-4,0,.) then twks86=r5wks868;   if r5wks958 not in (-5,-4,0,.) then twks95=r5wks958;

       if r5wks878 not in (-5,-4,0,.) then twks87=r5wks878;   if r5wks968 not in (-5,-4,0,.) then twks96=r5wks968;

           if r5wks888 not in (-5,-4,0,.) then twks88=r5wks888;   if r5wks978 not in (-5,-4,0,.) then twks97=r5wks978;

                                      if r5wks988 not in (-5,-4,0,.) then twks98=r5wks988;

                                      if r5wks998 not in (-5,-4,0,.) then twks99=r5wks998;

                                      if r5wks008 not in (-5,-4,0,.) then twks00=r5wks008;

        end;

     end;

 

     do over match8;

        if match8=5 and r7wks01=>0 and r5wks018=>0 then do;

           twks01=r5wks018+r7wks01;

        end;

        if match8=5 and (-4<r7wks01<0 or -4<r5wks018<0) then do;

           twks01=-3;

        end;

     end;

 

  end;

 

 

  /* For respondents last interviewed in Round 4, 2001 */

  if r6int=-4 and r5int=-4 and r4int_y=2001 then do;

     do over match1;

        if match1=4 then do;

           if r4wks801 not in (-5,-4,0,.) then twks80=r4wks801;   if r4wks891 not in (-5,-4,0,.) then twks89=r4wks891;

       if r4wks811 not in (-5,-4,0,.) then twks81=r4wks811;   if r4wks901 not in (-5,-4,0,.) then twks90=r4wks901;

       if r4wks821 not in (-5,-4,0,.) then twks82=r4wks821;   if r4wks911 not in (-5,-4,0,.) then twks91=r4wks911;

       if r4wks831 not in (-5,-4,0,.) then twks83=r4wks831;   if r4wks921 not in (-5,-4,0,.) then twks92=r4wks921;

       if r4wks841 not in (-5,-4,0,.) then twks84=r4wks841;   if r4wks931 not in (-5,-4,0,.) then twks93=r4wks931;

       if r4wks851 not in (-5,-4,0,.) then twks85=r4wks851;   if r4wks941 not in (-5,-4,0,.) then twks94=r4wks941;

       if r4wks861 not in (-5,-4,0,.) then twks86=r4wks861;   if r4wks951 not in (-5,-4,0,.) then twks95=r4wks951;

       if r4wks871 not in (-5,-4,0,.) then twks87=r4wks871;   if r4wks961 not in (-5,-4,0,.) then twks96=r4wks961;

           if r4wks881 not in (-5,-4,0,.) then twks88=r4wks881;   if r4wks971 not in (-5,-4,0,.) then twks97=r4wks971;

                                      if r4wks981 not in (-5,-4,0,.) then twks98=r4wks981;

                                      if r4wks991 not in (-5,-4,0,.) then twks99=r4wks991;

                                      if r4wks001 not in (-5,-4,0,.) then twks00=r4wks001;

        end;

     end;

 

     do over match1;

        if match1=4 and r7wks01=>0 and r4wks011=>0 then do;

           twks01=r4wks011+r7wks01;

        end;

        if match1=4 and (-4<r7wks01<0 or -4<r4wks011<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match2;

        if match2=4 then do;

           if r4wks802 not in (-5,-4,0,.) then twks80=r4wks802;   if r4wks892 not in (-5,-4,0,.) then twks89=r4wks892;

           if r4wks812 not in (-5,-4,0,.) then twks81=r4wks812;   if r4wks902 not in (-5,-4,0,.) then twks90=r4wks902;

       if r4wks822 not in (-5,-4,0,.) then twks82=r4wks822;   if r4wks912 not in (-5,-4,0,.) then twks91=r4wks912;

       if r4wks832 not in (-5,-4,0,.) then twks83=r4wks832;   if r4wks922 not in (-5,-4,0,.) then twks92=r4wks922;

       if r4wks842 not in (-5,-4,0,.) then twks84=r4wks842;   if r4wks932 not in (-5,-4,0,.) then twks93=r4wks932;

       if r4wks852 not in (-5,-4,0,.) then twks85=r4wks852;   if r4wks942 not in (-5,-4,0,.) then twks94=r4wks942;

       if r4wks862 not in (-5,-4,0,.) then twks86=r4wks862;   if r4wks952 not in (-5,-4,0,.) then twks95=r4wks952;

       if r4wks872 not in (-5,-4,0,.) then twks87=r4wks872;   if r4wks962 not in (-5,-4,0,.) then twks96=r4wks962;

           if r4wks882 not in (-5,-4,0,.) then twks88=r4wks882;   if r4wks972 not in (-5,-4,0,.) then twks97=r4wks972;

                                      if r4wks982 not in (-5,-4,0,.) then twks98=r4wks982;

                                      if r4wks992 not in (-5,-4,0,.) then twks99=r4wks992;

                                      if r4wks002 not in (-5,-4,0,.) then twks00=r4wks002;

        end;

     end;

 

     do over match2;

        if match2=4 and r7wks01=>0 and r4wks012=>0 then do;

           twks01=r4wks012+r7wks01;

        end;

        if match2=4 and (-4<r7wks01<0 or -4<r4wks012<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks99=>0 and r3wks992=>0 then do;

           twks99=r3wks992+r7wks99;

        end;

        if match2=3 and (-4<r7wks99<0 or -4<r3wks992<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match3;

        if match3=4 then do;

           if r4wks803 not in (-5,-4,0,.) then twks80=r4wks803;   if r4wks893 not in (-5,-4,0,.) then twks89=r4wks893;

       if r4wks813 not in (-5,-4,0,.) then twks81=r4wks813;   if r4wks903 not in (-5,-4,0,.) then twks90=r4wks903;

       if r4wks823 not in (-5,-4,0,.) then twks82=r4wks823;   if r4wks913 not in (-5,-4,0,.) then twks91=r4wks913;

       if r4wks833 not in (-5,-4,0,.) then twks83=r4wks833;   if r4wks923 not in (-5,-4,0,.) then twks92=r4wks923;

       if r4wks843 not in (-5,-4,0,.) then twks84=r4wks843;   if r4wks933 not in (-5,-4,0,.) then twks93=r4wks933;

       if r4wks853 not in (-5,-4,0,.) then twks85=r4wks853;   if r4wks943 not in (-5,-4,0,.) then twks94=r4wks943;

       if r4wks863 not in (-5,-4,0,.) then twks86=r4wks863;   if r4wks953 not in (-5,-4,0,.) then twks95=r4wks953;

       if r4wks873 not in (-5,-4,0,.) then twks87=r4wks873;   if r4wks963 not in (-5,-4,0,.) then twks96=r4wks963;

           if r4wks883 not in (-5,-4,0,.) then twks88=r4wks883;   if r4wks973 not in (-5,-4,0,.) then twks97=r4wks973;

                                      if r4wks983 not in (-5,-4,0,.) then twks98=r4wks983;

                                      if r4wks993 not in (-5,-4,0,.) then twks99=r4wks993;

                                      if r4wks003 not in (-5,-4,0,.) then twks00=r4wks003;

        end;

     end;

 

     do over match3;

        if match3=4 and r7wks01=>0 and r4wks013=>0 then do;

           twks01=r4wks013+r7wks01;

        end;

        if match3=4 and (-4<r7wks01<0 or -4<r4wks013<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match4;

        if match4=4 then do;

           if r4wks804 not in (-5,-4,0,.) then twks80=r4wks804;   if r4wks894 not in (-5,-4,0,.) then twks89=r4wks894;

       if r4wks814 not in (-5,-4,0,.) then twks81=r4wks814;   if r4wks904 not in (-5,-4,0,.) then twks90=r4wks904;

       if r4wks824 not in (-5,-4,0,.) then twks82=r4wks824;   if r4wks914 not in (-5,-4,0,.) then twks91=r4wks914;

       if r4wks834 not in (-5,-4,0,.) then twks83=r4wks834;   if r4wks924 not in (-5,-4,0,.) then twks92=r4wks924;

       if r4wks844 not in (-5,-4,0,.) then twks84=r4wks844;   if r4wks934 not in (-5,-4,0,.) then twks93=r4wks934;

       if r4wks854 not in (-5,-4,0,.) then twks85=r4wks854;   if r4wks944 not in (-5,-4,0,.) then twks94=r4wks944;

       if r4wks864 not in (-5,-4,0,.) then twks86=r4wks864;   if r4wks954 not in (-5,-4,0,.) then twks95=r4wks954;

       if r4wks874 not in (-5,-4,0,.) then twks87=r4wks874;   if r4wks964 not in (-5,-4,0,.) then twks96=r4wks964;

           if r4wks884 not in (-5,-4,0,.) then twks88=r4wks884;   if r4wks974 not in (-5,-4,0,.) then twks97=r4wks974;

                                  if r4wks984 not in (-5,-4,0,.) then twks98=r4wks984;

                                  if r4wks994 not in (-5,-4,0,.) then twks99=r4wks994;

                                  if r4wks004 not in (-5,-4,0,.) then twks00=r4wks004;

        end;

     end;

 

     do over match4;

        if match4=4 and r7wks01=>0 and r4wks014=>0 then do;

           twks01=r4wks014+r7wks01;

        end;

        if match4=4 and (-4<r7wks01<0 or -4<r4wks014<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match5;

        if match5=4 then do;

           if r4wks805 not in (-5,-4,0,.) then twks80=r4wks805;   if r4wks895 not in (-5,-4,0,.) then twks89=r4wks895;

       if r4wks815 not in (-5,-4,0,.) then twks81=r4wks815;   if r4wks905 not in (-5,-4,0,.) then twks90=r4wks905;

       if r4wks825 not in (-5,-4,0,.) then twks82=r4wks825;   if r4wks915 not in (-5,-4,0,.) then twks91=r4wks915;

       if r4wks835 not in (-5,-4,0,.) then twks83=r4wks835;   if r4wks925 not in (-5,-4,0,.) then twks92=r4wks925;

       if r4wks845 not in (-5,-4,0,.) then twks84=r4wks845;   if r4wks935 not in (-5,-4,0,.) then twks93=r4wks935;

       if r4wks855 not in (-5,-4,0,.) then twks85=r4wks855;   if r4wks945 not in (-5,-4,0,.) then twks94=r4wks945;

       if r4wks865 not in (-5,-4,0,.) then twks86=r4wks865;   if r4wks955 not in (-5,-4,0,.) then twks95=r4wks955;

       if r4wks875 not in (-5,-4,0,.) then twks87=r4wks875;   if r4wks965 not in (-5,-4,0,.) then twks96=r4wks965;

           if r4wks885 not in (-5,-4,0,.) then twks88=r4wks885;   if r4wks975 not in (-5,-4,0,.) then twks97=r4wks975;

                                      if r4wks985 not in (-5,-4,0,.) then twks98=r4wks985;

                                      if r4wks995 not in (-5,-4,0,.) then twks99=r4wks995;

                                      if r4wks005 not in (-5,-4,0,.) then twks00=r4wks005;

        end;

     end;

 

     do over match5;

        if match5=4 and r7wks01=>0 and r4wks015=>0 then do;

           twks01=r4wks015+r7wks01;

        end;

        if match5=4 and (-4<r7wks01<0 or -4<r4wks015<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match6;

        if match6=4 then do;

           if r4wks806 not in (-5,-4,0,.) then twks80=r4wks806;   if r4wks896 not in (-5,-4,0,.) then twks89=r4wks896;

       if r4wks816 not in (-5,-4,0,.) then twks81=r4wks816;   if r4wks906 not in (-5,-4,0,.) then twks90=r4wks906;

       if r4wks826 not in (-5,-4,0,.) then twks82=r4wks826;   if r4wks916 not in (-5,-4,0,.) then twks91=r4wks916;

       if r4wks836 not in (-5,-4,0,.) then twks83=r4wks836;   if r4wks926 not in (-5,-4,0,.) then twks92=r4wks926;

       if r4wks846 not in (-5,-4,0,.) then twks84=r4wks846;   if r4wks936 not in (-5,-4,0,.) then twks93=r4wks936;

       if r4wks856 not in (-5,-4,0,.) then twks85=r4wks856;   if r4wks946 not in (-5,-4,0,.) then twks94=r4wks946;

       if r4wks866 not in (-5,-4,0,.) then twks86=r4wks866;   if r4wks956 not in (-5,-4,0,.) then twks95=r4wks956;

       if r4wks876 not in (-5,-4,0,.) then twks87=r4wks876;   if r4wks966 not in (-5,-4,0,.) then twks96=r4wks966;

           if r4wks886 not in (-5,-4,0,.) then twks88=r4wks886;   if r4wks976 not in (-5,-4,0,.) then twks97=r4wks976;

                                      if r4wks986 not in (-5,-4,0,.) then twks98=r4wks986;

                                      if r4wks996 not in (-5,-4,0,.) then twks99=r4wks996;

                                      if r4wks006 not in (-5,-4,0,.) then twks00=r4wks006;

        end;

     end;

 

     do over match6;

        if match6=4 and r7wks01=>0 and r4wks016=>0 then do;

           twks01=r4wks016+r7wks01;

        end;

        if match6=4 and (-4<r7wks01<0 or -4<r4wks016<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match7;

        if match7=4 then do;

           if r4wks807 not in (-5,-4,0,.) then twks80=r4wks807;   if r4wks897 not in (-5,-4,0,.) then twks89=r4wks897;

       if r4wks817 not in (-5,-4,0,.) then twks81=r4wks817;   if r4wks907 not in (-5,-4,0,.) then twks90=r4wks907;

       if r4wks827 not in (-5,-4,0,.) then twks82=r4wks827;   if r4wks917 not in (-5,-4,0,.) then twks91=r4wks917;

       if r4wks837 not in (-5,-4,0,.) then twks83=r4wks837;   if r4wks927 not in (-5,-4,0,.) then twks92=r4wks927;

       if r4wks847 not in (-5,-4,0,.) then twks84=r4wks847;   if r4wks937 not in (-5,-4,0,.) then twks93=r4wks937;

       if r4wks857 not in (-5,-4,0,.) then twks85=r4wks857;   if r4wks947 not in (-5,-4,0,.) then twks94=r4wks947;

       if r4wks867 not in (-5,-4,0,.) then twks86=r4wks867;   if r4wks957 not in (-5,-4,0,.) then twks95=r4wks957;

       if r4wks877 not in (-5,-4,0,.) then twks87=r4wks877;   if r4wks967 not in (-5,-4,0,.) then twks96=r4wks967;

           if r4wks887 not in (-5,-4,0,.) then twks88=r4wks887;   if r4wks977 not in (-5,-4,0,.) then twks97=r4wks977;

                                      if r4wks987 not in (-5,-4,0,.) then twks98=r4wks987;

                                      if r4wks997 not in (-5,-4,0,.) then twks99=r4wks997;

                                      if r4wks007 not in (-5,-4,0,.) then twks00=r4wks007;

        end;

     end;

 

     do over match7;

        if match7=4 and r7wks01=>0 and r4wks017=>0 then do;

           twks01=r4wks017+r7wks01;

        end;

        if match7=4 and (-4<r7wks01<0 or -4<r4wks017<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match8;

        if match8=4 then do;

           if r4wks808 not in (-5,-4,0,.) then twks80=r4wks808;   if r4wks898 not in (-5,-4,0,.) then twks89=r4wks898;

       if r4wks818 not in (-5,-4,0,.) then twks81=r4wks818;   if r4wks908 not in (-5,-4,0,.) then twks90=r4wks908;

       if r4wks828 not in (-5,-4,0,.) then twks82=r4wks828;   if r4wks918 not in (-5,-4,0,.) then twks91=r4wks918;

       if r4wks838 not in (-5,-4,0,.) then twks83=r4wks838;   if r4wks928 not in (-5,-4,0,.) then twks92=r4wks928;

       if r4wks848 not in (-5,-4,0,.) then twks84=r4wks848;   if r4wks938 not in (-5,-4,0,.) then twks93=r4wks938;

       if r4wks858 not in (-5,-4,0,.) then twks85=r4wks858;   if r4wks948 not in (-5,-4,0,.) then twks94=r4wks948;

       if r4wks868 not in (-5,-4,0,.) then twks86=r4wks868;   if r4wks958 not in (-5,-4,0,.) then twks95=r4wks958;

       if r4wks878 not in (-5,-4,0,.) then twks87=r4wks878;   if r4wks968 not in (-5,-4,0,.) then twks96=r4wks968;

           if r4wks888 not in (-5,-4,0,.) then twks88=r4wks888;   if r4wks978 not in (-5,-4,0,.) then twks97=r4wks978;

                                      if r4wks988 not in (-5,-4,0,.) then twks98=r4wks988;

                                      if r4wks998 not in (-5,-4,0,.) then twks99=r4wks998;

                                      if r4wks008 not in (-5,-4,0,.) then twks00=r4wks008;

        end;

     end;

 

     do over match8;

        if match8=4 and r7wks01=>0 and r4wks018=>0 then do;

           twks01=r4wks018+r7wks01;

        end;

        if match8=4 and (-4<r7wks01<0 or -4<r4wks018<0) then do;

           twks01=-3;

        end;

     end;

 

     do over match9;

        if match9=4 then do;

           if r4wks809 not in (-5,-4,0,.) then twks80=r4wks809;   if r4wks899 not in (-5,-4,0,.) then twks89=r4wks899;

       if r4wks819 not in (-5,-4,0,.) then twks81=r4wks819;   if r4wks909 not in (-5,-4,0,.) then twks90=r4wks909;

       if r4wks829 not in (-5,-4,0,.) then twks82=r4wks829;   if r4wks919 not in (-5,-4,0,.) then twks91=r4wks919;

       if r4wks839 not in (-5,-4,0,.) then twks83=r4wks839;   if r4wks929 not in (-5,-4,0,.) then twks92=r4wks929;

       if r4wks849 not in (-5,-4,0,.) then twks84=r4wks849;   if r4wks939 not in (-5,-4,0,.) then twks93=r4wks939;

       if r4wks859 not in (-5,-4,0,.) then twks85=r4wks859;   if r4wks949 not in (-5,-4,0,.) then twks94=r4wks949;

       if r4wks869 not in (-5,-4,0,.) then twks86=r4wks869;   if r4wks959 not in (-5,-4,0,.) then twks95=r4wks959;

       if r4wks879 not in (-5,-4,0,.) then twks87=r4wks879;   if r4wks969 not in (-5,-4,0,.) then twks96=r4wks969;

           if r4wks889 not in (-5,-4,0,.) then twks88=r4wks889;   if r4wks979 not in (-5,-4,0,.) then twks97=r4wks979;

                                      if r4wks989 not in (-5,-4,0,.) then twks98=r4wks989;

                                      if r4wks999 not in (-5,-4,0,.) then twks99=r4wks999;

                                      if r4wks009 not in (-5,-4,0,.) then twks00=r4wks009;

        end;

     end;

 

     do over match9;

        if match9=4 and r7wks01=>0 and r4wks019=>0 then do;

           twks01=r4wks019+r7wks01;

        end;

        if match9=4 and (-4<r7wks01<0 or -4<r4wks019<0) then do;

           twks01=-3;

        end;

     end;

  end;

 

  /* For respondents last interviewed in Round 4, 2000 */

  if r6int=-4 and r5int=-4 and r4int_y=2000 then do;

     do over match1;

        if match1=4 then do;

           if r4wks801 not in (-5,-4,0,.) then twks80=r4wks801;   if r4wks891 not in (-5,-4,0,.) then twks89=r4wks891;

       if r4wks811 not in (-5,-4,0,.) then twks81=r4wks811;   if r4wks901 not in (-5,-4,0,.) then twks90=r4wks901;

       if r4wks821 not in (-5,-4,0,.) then twks82=r4wks821;   if r4wks911 not in (-5,-4,0,.) then twks91=r4wks911;

       if r4wks831 not in (-5,-4,0,.) then twks83=r4wks831;   if r4wks921 not in (-5,-4,0,.) then twks92=r4wks921;

       if r4wks841 not in (-5,-4,0,.) then twks84=r4wks841;   if r4wks931 not in (-5,-4,0,.) then twks93=r4wks931;

       if r4wks851 not in (-5,-4,0,.) then twks85=r4wks851;   if r4wks941 not in (-5,-4,0,.) then twks94=r4wks941;

       if r4wks861 not in (-5,-4,0,.) then twks86=r4wks861;   if r4wks951 not in (-5,-4,0,.) then twks95=r4wks951;

       if r4wks871 not in (-5,-4,0,.) then twks87=r4wks871;   if r4wks961 not in (-5,-4,0,.) then twks96=r4wks961;

           if r4wks881 not in (-5,-4,0,.) then twks88=r4wks881;   if r4wks971 not in (-5,-4,0,.) then twks97=r4wks971;

                                      if r4wks981 not in (-5,-4,0,.) then twks98=r4wks981;

                                      if r4wks991 not in (-5,-4,0,.) then twks99=r4wks991;

        end;

     end;

 

     do over match1;

        if match1=4 and r7wks00=>0 and r4wks001=>0 then do;

           twks00=r4wks001+r7wks00;

        end;

        if match1=4 and (-4<r7wks00<0 or -4<r4wks001<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match1;

        if match1=3 then do;

           if r3wks801 not in (-5,-4,0,.) then twks80=r3wks801;   if r3wks891 not in (-5,-4,0,.) then twks89=r3wks891;

       if r3wks811 not in (-5,-4,0,.) then twks81=r3wks811;   if r3wks901 not in (-5,-4,0,.) then twks90=r3wks901;

       if r3wks821 not in (-5,-4,0,.) then twks82=r3wks821;   if r3wks911 not in (-5,-4,0,.) then twks91=r3wks911;

       if r3wks831 not in (-5,-4,0,.) then twks83=r3wks831;   if r3wks921 not in (-5,-4,0,.) then twks92=r3wks921;

       if r3wks841 not in (-5,-4,0,.) then twks84=r3wks841;   if r3wks931 not in (-5,-4,0,.) then twks93=r3wks931;

       if r3wks851 not in (-5,-4,0,.) then twks85=r3wks851;   if r3wks941 not in (-5,-4,0,.) then twks94=r3wks941;

       if r3wks861 not in (-5,-4,0,.) then twks86=r3wks861;   if r3wks951 not in (-5,-4,0,.) then twks95=r3wks951;

       if r3wks871 not in (-5,-4,0,.) then twks87=r3wks871;   if r3wks961 not in (-5,-4,0,.) then twks96=r3wks961;

           if r3wks881 not in (-5,-4,0,.) then twks88=r3wks881;   if r3wks971 not in (-5,-4,0,.) then twks97=r3wks971;

                                      if r3wks981 not in (-5,-4,0,.) then twks98=r3wks981;

                                      if r3wks991 not in (-5,-4,0,.) then twks99=r3wks991;

        end;

     end;

 

     do over match1;

        if match1=3 and r7wks00=>0 and r3wks001=>0 then do;

           twks00=r3wks001+r7wks00;

        end;

        if match1=3 and (-4<r7wks00<0 or -4<r3wks001<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=4 then do;

           if r4wks802 not in (-5,-4,0,.) then twks80=r4wks802;   if r4wks892 not in (-5,-4,0,.) then twks89=r4wks892;

           if r4wks812 not in (-5,-4,0,.) then twks81=r4wks812;   if r4wks902 not in (-5,-4,0,.) then twks90=r4wks902;

       if r4wks822 not in (-5,-4,0,.) then twks82=r4wks822;   if r4wks912 not in (-5,-4,0,.) then twks91=r4wks912;

       if r4wks832 not in (-5,-4,0,.) then twks83=r4wks832;   if r4wks922 not in (-5,-4,0,.) then twks92=r4wks922;

       if r4wks842 not in (-5,-4,0,.) then twks84=r4wks842;   if r4wks932 not in (-5,-4,0,.) then twks93=r4wks932;

       if r4wks852 not in (-5,-4,0,.) then twks85=r4wks852;   if r4wks942 not in (-5,-4,0,.) then twks94=r4wks942;

       if r4wks862 not in (-5,-4,0,.) then twks86=r4wks862;   if r4wks952 not in (-5,-4,0,.) then twks95=r4wks952;

       if r4wks872 not in (-5,-4,0,.) then twks87=r4wks872;   if r4wks962 not in (-5,-4,0,.) then twks96=r4wks962;

           if r4wks882 not in (-5,-4,0,.) then twks88=r4wks882;   if r4wks972 not in (-5,-4,0,.) then twks97=r4wks972;

                                      if r4wks982 not in (-5,-4,0,.) then twks98=r4wks982;

                                      if r4wks992 not in (-5,-4,0,.) then twks99=r4wks992;

        end;

     end;

 

     do over match2;

        if match2=4 and r7wks00=>0 and r4wks002=>0 then do;

           twks00=r4wks002+r7wks00;

        end;

        if match2=4 and (-4<r7wks00<0 or -4<r4wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match3;

        if match3=4 then do;

           if r4wks803 not in (-5,-4,0,.) then twks80=r4wks803;   if r4wks893 not in (-5,-4,0,.) then twks89=r4wks893;

       if r4wks813 not in (-5,-4,0,.) then twks81=r4wks813;   if r4wks903 not in (-5,-4,0,.) then twks90=r4wks903;

       if r4wks823 not in (-5,-4,0,.) then twks82=r4wks823;   if r4wks913 not in (-5,-4,0,.) then twks91=r4wks913;

       if r4wks833 not in (-5,-4,0,.) then twks83=r4wks833;   if r4wks923 not in (-5,-4,0,.) then twks92=r4wks923;

       if r4wks843 not in (-5,-4,0,.) then twks84=r4wks843;   if r4wks933 not in (-5,-4,0,.) then twks93=r4wks933;

       if r4wks853 not in (-5,-4,0,.) then twks85=r4wks853;   if r4wks943 not in (-5,-4,0,.) then twks94=r4wks943;

       if r4wks863 not in (-5,-4,0,.) then twks86=r4wks863;   if r4wks953 not in (-5,-4,0,.) then twks95=r4wks953;

       if r4wks873 not in (-5,-4,0,.) then twks87=r4wks873;   if r4wks963 not in (-5,-4,0,.) then twks96=r4wks963;

           if r4wks883 not in (-5,-4,0,.) then twks88=r4wks883;   if r4wks973 not in (-5,-4,0,.) then twks97=r4wks973;

                                      if r4wks983 not in (-5,-4,0,.) then twks98=r4wks983;

                                      if r4wks993 not in (-5,-4,0,.) then twks99=r4wks993;

        end;

     end;

 

     do over match3;

        if match3=4 and r7wks00=>0 and r4wks003=>0 then do;

           twks00=r4wks003+r7wks00;

        end;

        if match3=4 and (-4<r7wks00<0 or -4<r4wks003<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match4;

        if match4=4 then do;

           if r4wks804 not in (-5,-4,0,.) then twks80=r4wks804;   if r4wks894 not in (-5,-4,0,.) then twks89=r4wks894;

       if r4wks814 not in (-5,-4,0,.) then twks81=r4wks814;   if r4wks904 not in (-5,-4,0,.) then twks90=r4wks904;

       if r4wks824 not in (-5,-4,0,.) then twks82=r4wks824;   if r4wks914 not in (-5,-4,0,.) then twks91=r4wks914;

       if r4wks834 not in (-5,-4,0,.) then twks83=r4wks834;   if r4wks924 not in (-5,-4,0,.) then twks92=r4wks924;

       if r4wks844 not in (-5,-4,0,.) then twks84=r4wks844;   if r4wks934 not in (-5,-4,0,.) then twks93=r4wks934;

       if r4wks854 not in (-5,-4,0,.) then twks85=r4wks854;   if r4wks944 not in (-5,-4,0,.) then twks94=r4wks944;

       if r4wks864 not in (-5,-4,0,.) then twks86=r4wks864;   if r4wks954 not in (-5,-4,0,.) then twks95=r4wks954;

       if r4wks874 not in (-5,-4,0,.) then twks87=r4wks874;   if r4wks964 not in (-5,-4,0,.) then twks96=r4wks964;

           if r4wks884 not in (-5,-4,0,.) then twks88=r4wks884;   if r4wks974 not in (-5,-4,0,.) then twks97=r4wks974;

                                  if r4wks984 not in (-5,-4,0,.) then twks98=r4wks984;

                                  if r4wks994 not in (-5,-4,0,.) then twks99=r4wks994;

        end;

     end;

 

     do over match4;

        if match4=4 and r7wks00=>0 and r4wks004=>0 then do;

           twks00=r4wks004+r7wks00;

        end;

        if match4=4 and (-4<r7wks00<0 or -4<r4wks004<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match5;

        if match5=4 then do;

           if r4wks805 not in (-5,-4,0,.) then twks80=r4wks805;   if r4wks895 not in (-5,-4,0,.) then twks89=r4wks895;

       if r4wks815 not in (-5,-4,0,.) then twks81=r4wks815;   if r4wks905 not in (-5,-4,0,.) then twks90=r4wks905;

       if r4wks825 not in (-5,-4,0,.) then twks82=r4wks825;   if r4wks915 not in (-5,-4,0,.) then twks91=r4wks915;

       if r4wks835 not in (-5,-4,0,.) then twks83=r4wks835;   if r4wks925 not in (-5,-4,0,.) then twks92=r4wks925;

       if r4wks845 not in (-5,-4,0,.) then twks84=r4wks845;   if r4wks935 not in (-5,-4,0,.) then twks93=r4wks935;

       if r4wks855 not in (-5,-4,0,.) then twks85=r4wks855;   if r4wks945 not in (-5,-4,0,.) then twks94=r4wks945;

       if r4wks865 not in (-5,-4,0,.) then twks86=r4wks865;   if r4wks955 not in (-5,-4,0,.) then twks95=r4wks955;

       if r4wks875 not in (-5,-4,0,.) then twks87=r4wks875;   if r4wks965 not in (-5,-4,0,.) then twks96=r4wks965;

           if r4wks885 not in (-5,-4,0,.) then twks88=r4wks885;   if r4wks975 not in (-5,-4,0,.) then twks97=r4wks975;

                                      if r4wks985 not in (-5,-4,0,.) then twks98=r4wks985;

                                      if r4wks995 not in (-5,-4,0,.) then twks99=r4wks995;

        end;

     end;

 

     do over match5;

        if match5=4 and r7wks00=>0 and r4wks005=>0 then do;

           twks00=r4wks005+r7wks00;

        end;

        if match5=4 and (-4<r7wks00<0 or -4<r4wks005<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match6;

        if match6=4 then do;

           if r4wks806 not in (-5,-4,0,.) then twks80=r4wks806;   if r4wks896 not in (-5,-4,0,.) then twks89=r4wks896;

       if r4wks816 not in (-5,-4,0,.) then twks81=r4wks816;   if r4wks906 not in (-5,-4,0,.) then twks90=r4wks906;

       if r4wks826 not in (-5,-4,0,.) then twks82=r4wks826;   if r4wks916 not in (-5,-4,0,.) then twks91=r4wks916;

       if r4wks836 not in (-5,-4,0,.) then twks83=r4wks836;   if r4wks926 not in (-5,-4,0,.) then twks92=r4wks926;

       if r4wks846 not in (-5,-4,0,.) then twks84=r4wks846;   if r4wks936 not in (-5,-4,0,.) then twks93=r4wks936;

       if r4wks856 not in (-5,-4,0,.) then twks85=r4wks856;   if r4wks946 not in (-5,-4,0,.) then twks94=r4wks946;

       if r4wks866 not in (-5,-4,0,.) then twks86=r4wks866;   if r4wks956 not in (-5,-4,0,.) then twks95=r4wks956;

       if r4wks876 not in (-5,-4,0,.) then twks87=r4wks876;   if r4wks966 not in (-5,-4,0,.) then twks96=r4wks966;

           if r4wks886 not in (-5,-4,0,.) then twks88=r4wks886;   if r4wks976 not in (-5,-4,0,.) then twks97=r4wks976;

                                      if r4wks986 not in (-5,-4,0,.) then twks98=r4wks986;

                                      if r4wks996 not in (-5,-4,0,.) then twks99=r4wks996;

        end;

     end;

 

     do over match6;

        if match6=4 and r7wks00=>0 and r4wks006=>0 then do;

           twks00=r4wks006+r7wks00;

        end;

        if match6=4 and (-4<r7wks00<0 or -4<r4wks006<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match7;

        if match7=4 then do;

           if r4wks807 not in (-5,-4,0,.) then twks80=r4wks807;   if r4wks897 not in (-5,-4,0,.) then twks89=r4wks897;

       if r4wks817 not in (-5,-4,0,.) then twks81=r4wks817;   if r4wks907 not in (-5,-4,0,.) then twks90=r4wks907;

       if r4wks827 not in (-5,-4,0,.) then twks82=r4wks827;   if r4wks917 not in (-5,-4,0,.) then twks91=r4wks917;

       if r4wks837 not in (-5,-4,0,.) then twks83=r4wks837;   if r4wks927 not in (-5,-4,0,.) then twks92=r4wks927;

       if r4wks847 not in (-5,-4,0,.) then twks84=r4wks847;   if r4wks937 not in (-5,-4,0,.) then twks93=r4wks937;

       if r4wks857 not in (-5,-4,0,.) then twks85=r4wks857;   if r4wks947 not in (-5,-4,0,.) then twks94=r4wks947;

       if r4wks867 not in (-5,-4,0,.) then twks86=r4wks867;   if r4wks957 not in (-5,-4,0,.) then twks95=r4wks957;

       if r4wks877 not in (-5,-4,0,.) then twks87=r4wks877;   if r4wks967 not in (-5,-4,0,.) then twks96=r4wks967;

           if r4wks887 not in (-5,-4,0,.) then twks88=r4wks887;   if r4wks977 not in (-5,-4,0,.) then twks97=r4wks977;

                                      if r4wks987 not in (-5,-4,0,.) then twks98=r4wks987;

                                      if r4wks997 not in (-5,-4,0,.) then twks99=r4wks997;

        end;

     end;

 

     do over match7;

        if match7=4 and r7wks00=>0 and r4wks007=>0 then do;

           twks00=r4wks007+r7wks00;

        end;

        if match7=4 and (-4<r7wks00<0 or -4<r4wks007<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match8;

        if match8=4 then do;

           if r4wks808 not in (-5,-4,0,.) then twks80=r4wks808;   if r4wks898 not in (-5,-4,0,.) then twks89=r4wks898;

       if r4wks818 not in (-5,-4,0,.) then twks81=r4wks818;   if r4wks908 not in (-5,-4,0,.) then twks90=r4wks908;

       if r4wks828 not in (-5,-4,0,.) then twks82=r4wks828;   if r4wks918 not in (-5,-4,0,.) then twks91=r4wks918;

       if r4wks838 not in (-5,-4,0,.) then twks83=r4wks838;   if r4wks928 not in (-5,-4,0,.) then twks92=r4wks928;

       if r4wks848 not in (-5,-4,0,.) then twks84=r4wks848;   if r4wks938 not in (-5,-4,0,.) then twks93=r4wks938;

       if r4wks858 not in (-5,-4,0,.) then twks85=r4wks858;   if r4wks948 not in (-5,-4,0,.) then twks94=r4wks948;

       if r4wks868 not in (-5,-4,0,.) then twks86=r4wks868;   if r4wks958 not in (-5,-4,0,.) then twks95=r4wks958;

       if r4wks878 not in (-5,-4,0,.) then twks87=r4wks878;   if r4wks968 not in (-5,-4,0,.) then twks96=r4wks968;

           if r4wks888 not in (-5,-4,0,.) then twks88=r4wks888;   if r4wks978 not in (-5,-4,0,.) then twks97=r4wks978;

                                      if r4wks988 not in (-5,-4,0,.) then twks98=r4wks988;

                                      if r4wks998 not in (-5,-4,0,.) then twks99=r4wks998;

        end;

     end;

 

     do over match8;

        if match8=4 and r7wks00=>0 and r4wks008=>0 then do;

           twks00=r4wks008+r7wks00;

        end;

        if match8=4 and (-4<r7wks00<0 or -4<r4wks008<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match9;

        if match9=4 then do;

           if r4wks809 not in (-5,-4,0,.) then twks80=r4wks809;   if r4wks899 not in (-5,-4,0,.) then twks89=r4wks899;

       if r4wks819 not in (-5,-4,0,.) then twks81=r4wks819;   if r4wks909 not in (-5,-4,0,.) then twks90=r4wks909;

       if r4wks829 not in (-5,-4,0,.) then twks82=r4wks829;   if r4wks919 not in (-5,-4,0,.) then twks91=r4wks919;

       if r4wks839 not in (-5,-4,0,.) then twks83=r4wks839;   if r4wks929 not in (-5,-4,0,.) then twks92=r4wks929;

       if r4wks849 not in (-5,-4,0,.) then twks84=r4wks849;   if r4wks939 not in (-5,-4,0,.) then twks93=r4wks939;

       if r4wks859 not in (-5,-4,0,.) then twks85=r4wks859;   if r4wks949 not in (-5,-4,0,.) then twks94=r4wks949;

       if r4wks869 not in (-5,-4,0,.) then twks86=r4wks869;   if r4wks959 not in (-5,-4,0,.) then twks95=r4wks959;

       if r4wks879 not in (-5,-4,0,.) then twks87=r4wks879;   if r4wks969 not in (-5,-4,0,.) then twks96=r4wks969;

           if r4wks889 not in (-5,-4,0,.) then twks88=r4wks889;   if r4wks979 not in (-5,-4,0,.) then twks97=r4wks979;

                                      if r4wks989 not in (-5,-4,0,.) then twks98=r4wks989;

                                      if r4wks999 not in (-5,-4,0,.) then twks99=r4wks999;

        end;

     end;

 

     do over match9;

        if match9=4 and r7wks00=>0 and r4wks009=>0 then do;

           twks00=r4wks009+r7wks00;

        end;

        if match9=4 and (-4<r7wks00<0 or -4<r4wks009<0) then do;

           twks00=-3;

        end;

     end;

  end;

 

  /* For respondents last interviewed in Round 3, 2000 */

  if r3int_y=2000 and r4int=-4 and r5int=-4 and r6int=-4 then do;

     do over match1;

        if match1=3 then do;

           if r3wks801 not in (-5,-4,0,.) then twks80=r3wks801;   if r3wks891 not in (-5,-4,0,.) then twks89=r3wks891;

       if r3wks811 not in (-5,-4,0,.) then twks81=r3wks811;   if r3wks901 not in (-5,-4,0,.) then twks90=r3wks901;

       if r3wks821 not in (-5,-4,0,.) then twks82=r3wks821;   if r3wks911 not in (-5,-4,0,.) then twks91=r3wks911;

       if r3wks831 not in (-5,-4,0,.) then twks83=r3wks831;   if r3wks921 not in (-5,-4,0,.) then twks92=r3wks921;

       if r3wks841 not in (-5,-4,0,.) then twks84=r3wks841;   if r3wks931 not in (-5,-4,0,.) then twks93=r3wks931;

       if r3wks851 not in (-5,-4,0,.) then twks85=r3wks851;   if r3wks941 not in (-5,-4,0,.) then twks94=r3wks941;

       if r3wks861 not in (-5,-4,0,.) then twks86=r3wks861;   if r3wks951 not in (-5,-4,0,.) then twks95=r3wks951;

       if r3wks871 not in (-5,-4,0,.) then twks87=r3wks871;   if r3wks961 not in (-5,-4,0,.) then twks96=r3wks961;

           if r3wks881 not in (-5,-4,0,.) then twks88=r3wks881;   if r3wks971 not in (-5,-4,0,.) then twks97=r3wks971;

                                      if r3wks981 not in (-5,-4,0,.) then twks98=r3wks981;

                                      if r3wks991 not in (-5,-4,0,.) then twks99=r3wks991;

        end;

     end;

 

     do over match1;

        if match1=3 and r7wks00=>0 and r3wks001=>0 then do;

           twks00=r3wks001+r7wks00;

        end;

        if match1=3 and (-4<r7wks00<0 or -4<r3wks001<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982;

                                      if r3wks992 not in (-5,-4,0,.) then twks99=r3wks992;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks00=>0 and r3wks002=>0 then do;

           twks00=r3wks002+r7wks00;

        end;

        if match2=3 and (-4<r7wks00<0 or -4<r3wks002<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match3;

        if match3=3 then do;

           if r3wks803 not in (-5,-4,0,.) then twks80=r3wks803;   if r3wks893 not in (-5,-4,0,.) then twks89=r3wks893;

       if r3wks813 not in (-5,-4,0,.) then twks81=r3wks813;   if r3wks903 not in (-5,-4,0,.) then twks90=r3wks903;

       if r3wks823 not in (-5,-4,0,.) then twks82=r3wks823;   if r3wks913 not in (-5,-4,0,.) then twks91=r3wks913;

       if r3wks833 not in (-5,-4,0,.) then twks83=r3wks833;   if r3wks923 not in (-5,-4,0,.) then twks92=r3wks923;

       if r3wks843 not in (-5,-4,0,.) then twks84=r3wks843;   if r3wks933 not in (-5,-4,0,.) then twks93=r3wks933;

       if r3wks853 not in (-5,-4,0,.) then twks85=r3wks853;   if r3wks943 not in (-5,-4,0,.) then twks94=r3wks943;

       if r3wks863 not in (-5,-4,0,.) then twks86=r3wks863;   if r3wks953 not in (-5,-4,0,.) then twks95=r3wks953;

       if r3wks873 not in (-5,-4,0,.) then twks87=r3wks873;   if r3wks963 not in (-5,-4,0,.) then twks96=r3wks963;

           if r3wks883 not in (-5,-4,0,.) then twks88=r3wks883;   if r3wks973 not in (-5,-4,0,.) then twks97=r3wks973;

                                      if r3wks983 not in (-5,-4,0,.) then twks98=r3wks983;

                                      if r3wks993 not in (-5,-4,0,.) then twks99=r3wks993;

        end;

     end;

 

     do over match3;

        if match3=3 and r7wks00=>0 and r3wks003=>0 then do;

           twks00=r3wks003+r7wks00;

        end;

        if match3=3 and (-4<r7wks00<0 or -4<r3wks003<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match4;

        if match4=3 then do;

           if r3wks804 not in (-5,-4,0,.) then twks80=r3wks804;   if r3wks894 not in (-5,-4,0,.) then twks89=r3wks894;

       if r3wks814 not in (-5,-4,0,.) then twks81=r3wks814;   if r3wks904 not in (-5,-4,0,.) then twks90=r3wks904;

       if r3wks824 not in (-5,-4,0,.) then twks82=r3wks824;   if r3wks914 not in (-5,-4,0,.) then twks91=r3wks914;

       if r3wks834 not in (-5,-4,0,.) then twks83=r3wks834;   if r3wks924 not in (-5,-4,0,.) then twks92=r3wks924;

       if r3wks844 not in (-5,-4,0,.) then twks84=r3wks844;   if r3wks934 not in (-5,-4,0,.) then twks93=r3wks934;

       if r3wks854 not in (-5,-4,0,.) then twks85=r3wks854;   if r3wks944 not in (-5,-4,0,.) then twks94=r3wks944;

       if r3wks864 not in (-5,-4,0,.) then twks86=r3wks864;   if r3wks954 not in (-5,-4,0,.) then twks95=r3wks954;

       if r3wks874 not in (-5,-4,0,.) then twks87=r3wks874;   if r3wks964 not in (-5,-4,0,.) then twks96=r3wks964;

           if r3wks884 not in (-5,-4,0,.) then twks88=r3wks884;   if r3wks974 not in (-5,-4,0,.) then twks97=r3wks974;

                                  if r3wks984 not in (-5,-4,0,.) then twks98=r3wks984;

                                  if r3wks994 not in (-5,-4,0,.) then twks99=r3wks994;

        end;

     end;

 

     do over match4;

        if match4=3 and r7wks00=>0 and r3wks004=>0 then do;

           twks00=r3wks004+r7wks00;

        end;

        if match4=3 and (-4<r7wks00<0 or -4<r3wks004<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match5;

        if match5=3 then do;

           if r3wks805 not in (-5,-4,0,.) then twks80=r3wks805;   if r3wks895 not in (-5,-4,0,.) then twks89=r3wks895;

       if r3wks815 not in (-5,-4,0,.) then twks81=r3wks815;   if r3wks905 not in (-5,-4,0,.) then twks90=r3wks905;

       if r3wks825 not in (-5,-4,0,.) then twks82=r3wks825;   if r3wks915 not in (-5,-4,0,.) then twks91=r3wks915;

       if r3wks835 not in (-5,-4,0,.) then twks83=r3wks835;   if r3wks925 not in (-5,-4,0,.) then twks92=r3wks925;

       if r3wks845 not in (-5,-4,0,.) then twks84=r3wks845;   if r3wks935 not in (-5,-4,0,.) then twks93=r3wks935;

       if r3wks855 not in (-5,-4,0,.) then twks85=r3wks855;   if r3wks945 not in (-5,-4,0,.) then twks94=r3wks945;

       if r3wks865 not in (-5,-4,0,.) then twks86=r3wks865;   if r3wks955 not in (-5,-4,0,.) then twks95=r3wks955;

       if r3wks875 not in (-5,-4,0,.) then twks87=r3wks875;   if r3wks965 not in (-5,-4,0,.) then twks96=r3wks965;

           if r3wks885 not in (-5,-4,0,.) then twks88=r3wks885;   if r3wks975 not in (-5,-4,0,.) then twks97=r3wks975;

                                      if r3wks985 not in (-5,-4,0,.) then twks98=r3wks985;

                                      if r3wks995 not in (-5,-4,0,.) then twks99=r3wks995;

        end;

     end;

 

     do over match5;

        if match5=3 and r7wks00=>0 and r3wks005=>0 then do;

           twks00=r3wks005+r7wks00;

        end;

        if match5=3 and (-4<r7wks00<0 or -4<r3wks005<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match6;

        if match6=3 then do;

           if r3wks806 not in (-5,-4,0,.) then twks80=r3wks806;   if r3wks896 not in (-5,-4,0,.) then twks89=r3wks896;

       if r3wks816 not in (-5,-4,0,.) then twks81=r3wks816;   if r3wks906 not in (-5,-4,0,.) then twks90=r3wks906;

       if r3wks826 not in (-5,-4,0,.) then twks82=r3wks826;   if r3wks916 not in (-5,-4,0,.) then twks91=r3wks916;

       if r3wks836 not in (-5,-4,0,.) then twks83=r3wks836;   if r3wks926 not in (-5,-4,0,.) then twks92=r3wks926;

       if r3wks846 not in (-5,-4,0,.) then twks84=r3wks846;   if r3wks936 not in (-5,-4,0,.) then twks93=r3wks936;

       if r3wks856 not in (-5,-4,0,.) then twks85=r3wks856;   if r3wks946 not in (-5,-4,0,.) then twks94=r3wks946;

       if r3wks866 not in (-5,-4,0,.) then twks86=r3wks866;   if r3wks956 not in (-5,-4,0,.) then twks95=r3wks956;

       if r3wks876 not in (-5,-4,0,.) then twks87=r3wks876;   if r3wks966 not in (-5,-4,0,.) then twks96=r3wks966;

           if r3wks886 not in (-5,-4,0,.) then twks88=r3wks886;   if r3wks976 not in (-5,-4,0,.) then twks97=r3wks976;

                                      if r3wks986 not in (-5,-4,0,.) then twks98=r3wks986;

                                      if r3wks996 not in (-5,-4,0,.) then twks99=r3wks996;

        end;

     end;

 

     do over match6;

        if match6=3 and r7wks00=>0 and r3wks006=>0 then do;

           twks00=r3wks006+r7wks00;

        end;

        if match6=3 and (-4<r7wks00<0 or -4<r3wks006<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match7;

        if match7=3 then do;

           if r3wks807 not in (-5,-4,0,.) then twks80=r3wks807;   if r3wks897 not in (-5,-4,0,.) then twks89=r3wks897;

       if r3wks817 not in (-5,-4,0,.) then twks81=r3wks817;   if r3wks907 not in (-5,-4,0,.) then twks90=r3wks907;

       if r3wks827 not in (-5,-4,0,.) then twks82=r3wks827;   if r3wks917 not in (-5,-4,0,.) then twks91=r3wks917;

       if r3wks837 not in (-5,-4,0,.) then twks83=r3wks837;   if r3wks927 not in (-5,-4,0,.) then twks92=r3wks927;

       if r3wks847 not in (-5,-4,0,.) then twks84=r3wks847;   if r3wks937 not in (-5,-4,0,.) then twks93=r3wks937;

       if r3wks857 not in (-5,-4,0,.) then twks85=r3wks857;   if r3wks947 not in (-5,-4,0,.) then twks94=r3wks947;

       if r3wks867 not in (-5,-4,0,.) then twks86=r3wks867;   if r3wks957 not in (-5,-4,0,.) then twks95=r3wks957;

       if r3wks877 not in (-5,-4,0,.) then twks87=r3wks877;   if r3wks967 not in (-5,-4,0,.) then twks96=r3wks967;

           if r3wks887 not in (-5,-4,0,.) then twks88=r3wks887;   if r3wks977 not in (-5,-4,0,.) then twks97=r3wks977;

                                      if r3wks987 not in (-5,-4,0,.) then twks98=r3wks987;

                                      if r3wks997 not in (-5,-4,0,.) then twks99=r3wks997;

        end;

     end;

 

     do over match7;

        if match7=3 and r7wks00=>0 and r3wks007=>0 then do;

           twks00=r3wks007+r7wks00;

        end;

        if match7=3 and (-4<r7wks00<0 or -4<r3wks007<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match8;

        if match8=3 then do;

           if r3wks808 not in (-5,-4,0,.) then twks80=r3wks808;   if r3wks898 not in (-5,-4,0,.) then twks89=r3wks898;

       if r3wks818 not in (-5,-4,0,.) then twks81=r3wks818;   if r3wks908 not in (-5,-4,0,.) then twks90=r3wks908;

       if r3wks828 not in (-5,-4,0,.) then twks82=r3wks828;   if r3wks918 not in (-5,-4,0,.) then twks91=r3wks918;

       if r3wks838 not in (-5,-4,0,.) then twks83=r3wks838;   if r3wks928 not in (-5,-4,0,.) then twks92=r3wks928;

       if r3wks848 not in (-5,-4,0,.) then twks84=r3wks848;   if r3wks938 not in (-5,-4,0,.) then twks93=r3wks938;

       if r3wks858 not in (-5,-4,0,.) then twks85=r3wks858;   if r3wks948 not in (-5,-4,0,.) then twks94=r3wks948;

       if r3wks868 not in (-5,-4,0,.) then twks86=r3wks868;   if r3wks958 not in (-5,-4,0,.) then twks95=r3wks958;

       if r3wks878 not in (-5,-4,0,.) then twks87=r3wks878;   if r3wks968 not in (-5,-4,0,.) then twks96=r3wks968;

           if r3wks888 not in (-5,-4,0,.) then twks88=r3wks888;   if r3wks978 not in (-5,-4,0,.) then twks97=r3wks978;

                                      if r3wks988 not in (-5,-4,0,.) then twks98=r3wks988;

                                      if r3wks998 not in (-5,-4,0,.) then twks99=r3wks998;

        end;

     end;

 

     do over match8;

        if match8=3 and r7wks00=>0 and r3wks008=>0 then do;

           twks00=r3wks008+r7wks00;

        end;

        if match8=3 and (-4<r7wks00<0 or -4<r3wks008<0) then do;

           twks00=-3;

        end;

     end;

 

     do over match9;

        if match9=3 then do;

           if r3wks809 not in (-5,-4,0,.) then twks80=r3wks809;   if r3wks899 not in (-5,-4,0,.) then twks89=r3wks899;

       if r3wks819 not in (-5,-4,0,.) then twks81=r3wks819;   if r3wks909 not in (-5,-4,0,.) then twks90=r3wks909;

       if r3wks829 not in (-5,-4,0,.) then twks82=r3wks829;   if r3wks919 not in (-5,-4,0,.) then twks91=r3wks919;

       if r3wks839 not in (-5,-4,0,.) then twks83=r3wks839;   if r3wks929 not in (-5,-4,0,.) then twks92=r3wks929;

       if r3wks849 not in (-5,-4,0,.) then twks84=r3wks849;   if r3wks939 not in (-5,-4,0,.) then twks93=r3wks939;

       if r3wks859 not in (-5,-4,0,.) then twks85=r3wks859;   if r3wks949 not in (-5,-4,0,.) then twks94=r3wks949;

       if r3wks869 not in (-5,-4,0,.) then twks86=r3wks869;   if r3wks959 not in (-5,-4,0,.) then twks95=r3wks959;

       if r3wks879 not in (-5,-4,0,.) then twks87=r3wks879;   if r3wks969 not in (-5,-4,0,.) then twks96=r3wks969;

           if r3wks889 not in (-5,-4,0,.) then twks88=r3wks889;   if r3wks979 not in (-5,-4,0,.) then twks97=r3wks979;

                                      if r3wks989 not in (-5,-4,0,.) then twks98=r3wks989;

                                      if r3wks999 not in (-5,-4,0,.) then twks99=r3wks999;

        end;

     end;

 

     do over match9;

        if match9=3 and r7wks00=>0 and r3wks009=>0 then do;

           twks00=r3wks009+r7wks00;

        end;

        if match9=3 and (-4<r7wks00<0 or -4<r3wks009<0) then do;

           twks00=-3;

        end;

     end;

  end;

 

 

  /* For respondents last interviewed in Round 3, 1999 */

  if r3int_y=1999 and r4int=-4 and r5int=-4 and r6int=-4 then do;

     do over match1;

        if match1=3 then do;

           if r3wks801 not in (-5,-4,0,.) then twks80=r3wks801;   if r3wks891 not in (-5,-4,0,.) then twks89=r3wks891;

       if r3wks811 not in (-5,-4,0,.) then twks81=r3wks811;   if r3wks901 not in (-5,-4,0,.) then twks90=r3wks901;

       if r3wks821 not in (-5,-4,0,.) then twks82=r3wks821;   if r3wks911 not in (-5,-4,0,.) then twks91=r3wks911;

       if r3wks831 not in (-5,-4,0,.) then twks83=r3wks831;   if r3wks921 not in (-5,-4,0,.) then twks92=r3wks921;

       if r3wks841 not in (-5,-4,0,.) then twks84=r3wks841;   if r3wks931 not in (-5,-4,0,.) then twks93=r3wks931;

       if r3wks851 not in (-5,-4,0,.) then twks85=r3wks851;   if r3wks941 not in (-5,-4,0,.) then twks94=r3wks941;

       if r3wks861 not in (-5,-4,0,.) then twks86=r3wks861;   if r3wks951 not in (-5,-4,0,.) then twks95=r3wks951;

       if r3wks871 not in (-5,-4,0,.) then twks87=r3wks871;   if r3wks961 not in (-5,-4,0,.) then twks96=r3wks961;

           if r3wks881 not in (-5,-4,0,.) then twks88=r3wks881;   if r3wks971 not in (-5,-4,0,.) then twks97=r3wks971;

                                      if r3wks981 not in (-5,-4,0,.) then twks98=r3wks981;

        end;

     end;

 

     do over match1;

        if match1=3 and r7wks99=>0 and r3wks991=>0 then do;

           twks99=r3wks991+r7wks99;

        end;

        if match1=3 and (-4<r7wks99<0 or -4<r3wks991<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match2;

        if match2=3 then do;

           if r3wks802 not in (-5,-4,0,.) then twks80=r3wks802;   if r3wks892 not in (-5,-4,0,.) then twks89=r3wks892;

           if r3wks812 not in (-5,-4,0,.) then twks81=r3wks812;   if r3wks902 not in (-5,-4,0,.) then twks90=r3wks902;

       if r3wks822 not in (-5,-4,0,.) then twks82=r3wks822;   if r3wks912 not in (-5,-4,0,.) then twks91=r3wks912;

       if r3wks832 not in (-5,-4,0,.) then twks83=r3wks832;   if r3wks922 not in (-5,-4,0,.) then twks92=r3wks922;

       if r3wks842 not in (-5,-4,0,.) then twks84=r3wks842;   if r3wks932 not in (-5,-4,0,.) then twks93=r3wks932;

       if r3wks852 not in (-5,-4,0,.) then twks85=r3wks852;   if r3wks942 not in (-5,-4,0,.) then twks94=r3wks942;

       if r3wks862 not in (-5,-4,0,.) then twks86=r3wks862;   if r3wks952 not in (-5,-4,0,.) then twks95=r3wks952;

       if r3wks872 not in (-5,-4,0,.) then twks87=r3wks872;   if r3wks962 not in (-5,-4,0,.) then twks96=r3wks962;

           if r3wks882 not in (-5,-4,0,.) then twks88=r3wks882;   if r3wks972 not in (-5,-4,0,.) then twks97=r3wks972;

                                      if r3wks982 not in (-5,-4,0,.) then twks98=r3wks982;

        end;

     end;

 

     do over match2;

        if match2=3 and r7wks99=>0 and r3wks992=>0 then do;

           twks99=r3wks992+r7wks99;

        end;

        if match2=3 and (-4<r7wks99<0 or -4<r3wks992<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match2;

        if match2=2 then do;

           if r2wks802 not in (-5,-4,0,.) then twks80=r2wks802;   if r2wks892 not in (-5,-4,0,.) then twks89=r2wks892;

       if r2wks812 not in (-5,-4,0,.) then twks81=r2wks812;   if r2wks902 not in (-5,-4,0,.) then twks90=r2wks902;

       if r2wks822 not in (-5,-4,0,.) then twks82=r2wks822;   if r2wks912 not in (-5,-4,0,.) then twks91=r2wks912;

       if r2wks832 not in (-5,-4,0,.) then twks83=r2wks832;   if r2wks922 not in (-5,-4,0,.) then twks92=r2wks922;

       if r2wks842 not in (-5,-4,0,.) then twks84=r2wks842;   if r2wks932 not in (-5,-4,0,.) then twks93=r2wks932;

       if r2wks852 not in (-5,-4,0,.) then twks85=r2wks852;   if r2wks942 not in (-5,-4,0,.) then twks94=r2wks942;

       if r2wks862 not in (-5,-4,0,.) then twks86=r2wks862;   if r2wks952 not in (-5,-4,0,.) then twks95=r2wks952;

       if r2wks872 not in (-5,-4,0,.) then twks87=r2wks872;   if r2wks962 not in (-5,-4,0,.) then twks96=r2wks962;

           if r2wks882 not in (-5,-4,0,.) then twks88=r2wks882;   if r2wks972 not in (-5,-4,0,.) then twks97=r2wks972;

        end;

     end;

 

     do over match2;

        if match2=2 and r7wks98=>0 and r2wks982=>0 then do;

           twks98=r2wks982+r7wks98;

        end;

        if match2=2 and (-4<r7wks98<0 or -4<r2wks982<0) then do;

           twks98=-3;

        end;

     end;

 

 

     do over match3;

        if match3=3 then do;

           if r3wks803 not in (-5,-4,0,.) then twks80=r3wks803;   if r3wks893 not in (-5,-4,0,.) then twks89=r3wks893;

       if r3wks813 not in (-5,-4,0,.) then twks81=r3wks813;   if r3wks903 not in (-5,-4,0,.) then twks90=r3wks903;

       if r3wks823 not in (-5,-4,0,.) then twks82=r3wks823;   if r3wks913 not in (-5,-4,0,.) then twks91=r3wks913;

       if r3wks833 not in (-5,-4,0,.) then twks83=r3wks833;   if r3wks923 not in (-5,-4,0,.) then twks92=r3wks923;

       if r3wks843 not in (-5,-4,0,.) then twks84=r3wks843;   if r3wks933 not in (-5,-4,0,.) then twks93=r3wks933;

       if r3wks853 not in (-5,-4,0,.) then twks85=r3wks853;   if r3wks943 not in (-5,-4,0,.) then twks94=r3wks943;

       if r3wks863 not in (-5,-4,0,.) then twks86=r3wks863;   if r3wks953 not in (-5,-4,0,.) then twks95=r3wks953;

       if r3wks873 not in (-5,-4,0,.) then twks87=r3wks873;   if r3wks963 not in (-5,-4,0,.) then twks96=r3wks963;

           if r3wks883 not in (-5,-4,0,.) then twks88=r3wks883;   if r3wks973 not in (-5,-4,0,.) then twks97=r3wks973;

                                      if r3wks983 not in (-5,-4,0,.) then twks98=r3wks983;

        end;

     end;

 

     do over match3;

        if match3=3 and r7wks99=>0 and r3wks993=>0 then do;

           twks99=r3wks993+r7wks99;

        end;

        if match3=3 and (-4<r7wks99<0 or -4<r3wks993<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match4;

        if match4=3 then do;

           if r3wks804 not in (-5,-4,0,.) then twks80=r3wks804;   if r3wks894 not in (-5,-4,0,.) then twks89=r3wks894;

       if r3wks814 not in (-5,-4,0,.) then twks81=r3wks814;   if r3wks904 not in (-5,-4,0,.) then twks90=r3wks904;

       if r3wks824 not in (-5,-4,0,.) then twks82=r3wks824;   if r3wks914 not in (-5,-4,0,.) then twks91=r3wks914;

       if r3wks834 not in (-5,-4,0,.) then twks83=r3wks834;   if r3wks924 not in (-5,-4,0,.) then twks92=r3wks924;

       if r3wks844 not in (-5,-4,0,.) then twks84=r3wks844;   if r3wks934 not in (-5,-4,0,.) then twks93=r3wks934;

       if r3wks854 not in (-5,-4,0,.) then twks85=r3wks854;   if r3wks944 not in (-5,-4,0,.) then twks94=r3wks944;

       if r3wks864 not in (-5,-4,0,.) then twks86=r3wks864;   if r3wks954 not in (-5,-4,0,.) then twks95=r3wks954;

       if r3wks874 not in (-5,-4,0,.) then twks87=r3wks874;   if r3wks964 not in (-5,-4,0,.) then twks96=r3wks964;

           if r3wks884 not in (-5,-4,0,.) then twks88=r3wks884;   if r3wks974 not in (-5,-4,0,.) then twks97=r3wks974;

                                  if r3wks984 not in (-5,-4,0,.) then twks98=r3wks984;

        end;

     end;

 

     do over match4;

        if match4=3 and r7wks99=>0 and r3wks994=>0 then do;

           twks99=r3wks994+r7wks99;

        end;

        if match4=3 and (-4<r7wks99<0 or -4<r3wks994<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match5;

        if match5=3 then do;

           if r3wks805 not in (-5,-4,0,.) then twks80=r3wks805;   if r3wks895 not in (-5,-4,0,.) then twks89=r3wks895;

       if r3wks815 not in (-5,-4,0,.) then twks81=r3wks815;   if r3wks905 not in (-5,-4,0,.) then twks90=r3wks905;

       if r3wks825 not in (-5,-4,0,.) then twks82=r3wks825;   if r3wks915 not in (-5,-4,0,.) then twks91=r3wks915;

       if r3wks835 not in (-5,-4,0,.) then twks83=r3wks835;   if r3wks925 not in (-5,-4,0,.) then twks92=r3wks925;

       if r3wks845 not in (-5,-4,0,.) then twks84=r3wks845;   if r3wks935 not in (-5,-4,0,.) then twks93=r3wks935;

       if r3wks855 not in (-5,-4,0,.) then twks85=r3wks855;   if r3wks945 not in (-5,-4,0,.) then twks94=r3wks945;

       if r3wks865 not in (-5,-4,0,.) then twks86=r3wks865;   if r3wks955 not in (-5,-4,0,.) then twks95=r3wks955;

       if r3wks875 not in (-5,-4,0,.) then twks87=r3wks875;   if r3wks965 not in (-5,-4,0,.) then twks96=r3wks965;

           if r3wks885 not in (-5,-4,0,.) then twks88=r3wks885;   if r3wks975 not in (-5,-4,0,.) then twks97=r3wks975;

                                      if r3wks985 not in (-5,-4,0,.) then twks98=r3wks985;

        end;

     end;

 

     do over match5;

        if match5=3 and r7wks99=>0 and r3wks995=>0 then do;

           twks99=r3wks995+r7wks99;

        end;

        if match5=3 and (-4<r7wks99<0 or -4<r3wks995<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match6;

        if match6=3 then do;

           if r3wks806 not in (-5,-4,0,.) then twks80=r3wks806;   if r3wks896 not in (-5,-4,0,.) then twks89=r3wks896;

       if r3wks816 not in (-5,-4,0,.) then twks81=r3wks816;   if r3wks906 not in (-5,-4,0,.) then twks90=r3wks906;

       if r3wks826 not in (-5,-4,0,.) then twks82=r3wks826;   if r3wks916 not in (-5,-4,0,.) then twks91=r3wks916;

       if r3wks836 not in (-5,-4,0,.) then twks83=r3wks836;   if r3wks926 not in (-5,-4,0,.) then twks92=r3wks926;

       if r3wks846 not in (-5,-4,0,.) then twks84=r3wks846;   if r3wks936 not in (-5,-4,0,.) then twks93=r3wks936;

       if r3wks856 not in (-5,-4,0,.) then twks85=r3wks856;   if r3wks946 not in (-5,-4,0,.) then twks94=r3wks946;

       if r3wks866 not in (-5,-4,0,.) then twks86=r3wks866;   if r3wks956 not in (-5,-4,0,.) then twks95=r3wks956;

       if r3wks876 not in (-5,-4,0,.) then twks87=r3wks876;   if r3wks966 not in (-5,-4,0,.) then twks96=r3wks966;

           if r3wks886 not in (-5,-4,0,.) then twks88=r3wks886;   if r3wks976 not in (-5,-4,0,.) then twks97=r3wks976;

                                      if r3wks986 not in (-5,-4,0,.) then twks98=r3wks986;

        end;

     end;

 

     do over match6;

        if match6=3 and r7wks99=>0 and r3wks996=>0 then do;

           twks99=r3wks996+r7wks99;

        end;

         if match6=3 and (-4<r7wks99<0 or -4<r3wks996<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match7;

        if match7=3 then do;

           if r3wks807 not in (-5,-4,0,.) then twks80=r3wks807;   if r3wks897 not in (-5,-4,0,.) then twks89=r3wks897;

       if r3wks817 not in (-5,-4,0,.) then twks81=r3wks817;   if r3wks907 not in (-5,-4,0,.) then twks90=r3wks907;

       if r3wks827 not in (-5,-4,0,.) then twks82=r3wks827;   if r3wks917 not in (-5,-4,0,.) then twks91=r3wks917;

       if r3wks837 not in (-5,-4,0,.) then twks83=r3wks837;   if r3wks927 not in (-5,-4,0,.) then twks92=r3wks927;

       if r3wks847 not in (-5,-4,0,.) then twks84=r3wks847;   if r3wks937 not in (-5,-4,0,.) then twks93=r3wks937;

       if r3wks857 not in (-5,-4,0,.) then twks85=r3wks857;   if r3wks947 not in (-5,-4,0,.) then twks94=r3wks947;

       if r3wks867 not in (-5,-4,0,.) then twks86=r3wks867;   if r3wks957 not in (-5,-4,0,.) then twks95=r3wks957;

       if r3wks877 not in (-5,-4,0,.) then twks87=r3wks877;   if r3wks967 not in (-5,-4,0,.) then twks96=r3wks967;

           if r3wks887 not in (-5,-4,0,.) then twks88=r3wks887;   if r3wks977 not in (-5,-4,0,.) then twks97=r3wks977;

                                      if r3wks987 not in (-5,-4,0,.) then twks98=r3wks987;

        end;

     end;

 

     do over match7;

        if match7=3 and r7wks99=>0 and r3wks997=>0 then do;

           twks99=r3wks997+r7wks99;

        end;

        if match7=3 and (-4<r7wks99<0 or -4<r3wks997<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match8;

        if match8=3 then do;

           if r3wks808 not in (-5,-4,0,.) then twks80=r3wks808;   if r3wks898 not in (-5,-4,0,.) then twks89=r3wks898;

       if r3wks818 not in (-5,-4,0,.) then twks81=r3wks818;   if r3wks908 not in (-5,-4,0,.) then twks90=r3wks908;

       if r3wks828 not in (-5,-4,0,.) then twks82=r3wks828;   if r3wks918 not in (-5,-4,0,.) then twks91=r3wks918;

       if r3wks838 not in (-5,-4,0,.) then twks83=r3wks838;   if r3wks928 not in (-5,-4,0,.) then twks92=r3wks928;

       if r3wks848 not in (-5,-4,0,.) then twks84=r3wks848;   if r3wks938 not in (-5,-4,0,.) then twks93=r3wks938;

       if r3wks858 not in (-5,-4,0,.) then twks85=r3wks858;   if r3wks948 not in (-5,-4,0,.) then twks94=r3wks948;

       if r3wks868 not in (-5,-4,0,.) then twks86=r3wks868;   if r3wks958 not in (-5,-4,0,.) then twks95=r3wks958;

       if r3wks878 not in (-5,-4,0,.) then twks87=r3wks878;   if r3wks968 not in (-5,-4,0,.) then twks96=r3wks968;

           if r3wks888 not in (-5,-4,0,.) then twks88=r3wks888;   if r3wks978 not in (-5,-4,0,.) then twks97=r3wks978;

                                      if r3wks988 not in (-5,-4,0,.) then twks98=r3wks988;

        end;

     end;

 

     do over match8;

        if match8=3 and r7wks99=>0 and r3wks998=>0 then do;

           twks99=r3wks998+r7wks99;

        end;

        if match8=3 and (-4<r7wks99<0 or -4<r3wks998<0) then do;

           twks99=-3;

        end;

     end;

 

     do over match9;

        if match9=3 then do;

           if r3wks809 not in (-5,-4,0,.) then twks80=r3wks809;   if r3wks899 not in (-5,-4,0,.) then twks89=r3wks899;

       if r3wks819 not in (