You are here
Home › Cohorts › NLSY97 › Other Documentation › Codebook Supplement › Appendix 2: Employment Variable Creation ›Hours per Week at Each Job - Appendix 2
Hours per Week at Each Job - Appendix 2
Variable Created
- CV_HRS_PER_WEEK.xx (HOURS)--number of hours usually worked per week at each job
This program creates a variable for each job in each survey round reporting the usual number of hours worked per week. If a job lasts 13 weeks or less, the program uses hours reported as of the job's start date. For jobs lasting longer than 13 weeks, the variable provides hours usually worked as of the end date or the most recent report (for example, the interview date). The number of hours reported in this created variable is also the number used to calculate the created hourly rate of pay (CV_HRLY_PAY) and hourly compensation (HRLY_COMPENSATION) variables described elsewhere in this appendix.
Variables Used
/*Variable Names in the Program Variable Names on the Gator*/
PUBID PUBID
R1UID1 YEMP_UID.01_1997
R1UID2 YEMP_UID.02_1997
R1UID3 YEMP_UID.03_1997
R1UID4 YEMP_UID.04_1997
R1UID5 YEMP_UID.05_1997
R1UID6 YEMP_UID.06_1997
R1UID7 YEMP_UID.07_1997
R1HRS1 CV_HRS_PER_WEEK.01_1997
R1HRS2 CV_HRS_PER_WEEK.02_1997
R1HRS3 CV_HRS_PER_WEEK.03_1997
R1HRS4 CV_HRS_PER_WEEK.04_1997
R1HRS5 CV_HRS_PER_WEEK.05_1997
R1HRS6 CV_HRS_PER_WEEK.06_1997
R1HRS7 CV_HRS_PER_WEEK.07_1997
R2UID1 YEMP_UID.01_1998
R2UID2 YEMP_UID.02_1998
R2UID3 YEMP_UID.03_1998
R2UID4 YEMP_UID.04_1998
R2UID5 YEMP_UID.05_1998
R2UID6 YEMP_UID.06_1998
R2UID7 YEMP_UID.07_1998
R2UID8 YEMP_UID.08_1998
R2UID9 YEMP_UID.09_1998
R2HRS1 CV_HRS_PER_WEEK.01_1998
R2HRS2 CV_HRS_PER_WEEK.02_1998
R2HRS3 CV_HRS_PER_WEEK.03_1998
R2HRS4 CV_HRS_PER_WEEK.04_1998
R2HRS5 CV_HRS_PER_WEEK.05_1998
R2HRS6 CV_HRS_PER_WEEK.06_1998
R2HRS7 CV_HRS_PER_WEEK.07_1998
R2HRS8 CV_HRS_PER_WEEK.08_1998
R2HRS9 CV_HRS_PER_WEEK.09_1998
R3UID1 YEMP_UID.01_1999
R3UID2 YEMP_UID.02_1999
R3UID3 YEMP_UID.03_1999
R3UID4 YEMP_UID.04_1999
R3UID5 YEMP_UID.05_1999
R3UID6 YEMP_UID.06_1999
R3UID7 YEMP_UID.07_1999
R3UID8 YEMP_UID.08_1999
R3UID9 YEMP_UID.09_1999
R3HRS1 CV_HRS_PER_WEEK.01_1999
R3HRS2 CV_HRS_PER_WEEK.02_1999
R3HRS3 CV_HRS_PER_WEEK.03_1999
R3HRS4 CV_HRS_PER_WEEK.04_1999
R3HRS5 CV_HRS_PER_WEEK.05_1999
R3HRS6 CV_HRS_PER_WEEK.06_1999
R3HRS7 CV_HRS_PER_WEEK.07_1999
R3HRS8 CV_HRS_PER_WEEK.08_1999
R3HRS9 CV_HRS_PER_WEEK.09_1999
R4UID1 YEMP_UID.01_2000
R4UID2 YEMP_UID.02_2000
R4UID3 YEMP_UID.03_2000
R4UID4 YEMP_UID.04_2000
R4UID5 YEMP_UID.05_2000
R4UID6 YEMP_UID.06_2000
R4UID7 YEMP_UID.07_2000
R4UID8 YEMP_UID.08_2000
R4UID9 YEMP_UID.09_2000
R4HRS1 CV_HRS_PER_WEEK.01_2000
R4HRS2 CV_HRS_PER_WEEK.02_2000
R4HRS3 CV_HRS_PER_WEEK.03_2000
R4HRS4 CV_HRS_PER_WEEK.04_2000
R4HRS5 CV_HRS_PER_WEEK.05_2000
R4HRS6 CV_HRS_PER_WEEK.06_2000
R4HRS7 CV_HRS_PER_WEEK.07_2000
R4HRS8 CV_HRS_PER_WEEK.08_2000
R4HRS9 CV_HRS_PER_WEEK.09_2000
R5UID1 YEMP_UID.01_2001
R5UID2 YEMP_UID.02_2001
R5UID3 YEMP_UID.03_2001
R5UID4 YEMP_UID.04_2001
R5UID5 YEMP_UID.05_2001
R5UID6 YEMP_UID.06_2001
R5UID7 YEMP_UID.07_2001
R5UID8 YEMP_UID.08_2001
R5HRS1 CV_HRS_PER_WEEK.01_2001
R5HRS2 CV_HRS_PER_WEEK.02_2001
R5HRS3 CV_HRS_PER_WEEK.03_2001
R5HRS4 CV_HRS_PER_WEEK.04_2001
R5HRS5 CV_HRS_PER_WEEK.05_2001
R5HRS6 CV_HRS_PER_WEEK.06_2001
R5HRS7 CV_HRS_PER_WEEK.07_2001
R5HRS8 CV_HRS_PER_WEEK.08_2001
R6UID01 YEMP_UID.01_2002
R6UID02 YEMP_UID.02_2002
R6UID03 YEMP_UID.03_2002
R6UID04 YEMP_UID.04_2002
R6UID05 YEMP_UID.05_2002
R6UID06 YEMP_UID.06_2002
R6UID07 YEMP_UID.07_2002
R6UID08 YEMP_UID.08_2002
R6UID09 YEMP_UID.09_2002
R6UID10 YEMP_UID.10_2002
R6UID11 YEMP_UID.11_2002
R6HRS01 CV_HRS_PER_WEEK.01_2002
R6HRS02 CV_HRS_PER_WEEK.02_2002
R6HRS03 CV_HRS_PER_WEEK.03_2002
R6HRS04 CV_HRS_PER_WEEK.04_2002
R6HRS05 CV_HRS_PER_WEEK.05_2002
R6HRS06 CV_HRS_PER_WEEK.06_2002
R6HRS07 CV_HRS_PER_WEEK.07_2002
R6HRS08 CV_HRS_PER_WEEK.08_2002
R6HRS09 CV_HRS_PER_WEEK.09_2002
R6HRS10 CV_HRS_PER_WEEK.10_2002
R6HRS11 CV_HRS_PER_WEEK.11_2002
R7HRS01 CV_HRS_PER_WEEK.01_2003
R7HRS02 CV_HRS_PER_WEEK.02_2003
R7HRS03 CV_HRS_PER_WEEK.03_2003
R7HRS04 CV_HRS_PER_WEEK.04_2003
R7HRS05 CV_HRS_PER_WEEK.05_2003
R7HRS06 CV_HRS_PER_WEEK.06_2003
R7HRS07 CV_HRS_PER_WEEK.07_2003
R7HRS08 CV_HRS_PER_WEEK.08_2003
R7HRS09 CV_HRS_PER_WEEK.09_2003
R7HRS10 CV_HRS_PER_WEEK.10_2003
R7UID01 YEMP_UID.01_2003
R7UID02 YEMP_UID.02_2003
R7UID03 YEMP_UID.03_2003
R7UID04 YEMP_UID.04_2003
R7UID05 YEMP_UID.05_2003
R7UID06 YEMP_UID.06_2003
R7UID07 YEMP_UID.07_2003
R7UID08 YEMP_UID.08_2003
R7UID09 YEMP_UID.09_2003
R7UID10 YEMP_UID.10_2003
R8HRS1 CV_HRS_PER_WEEK.01_2004
R8HRS2 CV_HRS_PER_WEEK.02_2004
R8HRS3 CV_HRS_PER_WEEK.03_2004
R8HRS4 CV_HRS_PER_WEEK.04_2004
R8HRS5 CV_HRS_PER_WEEK.05_2004
R8HRS6 CV_HRS_PER_WEEK.06_2004
R8HRS7 CV_HRS_PER_WEEK.07_2004
R8UID1 YEMP_UID.01_2004
R8UID2 YEMP_UID.02_2004
R8UID3 YEMP_UID.03_2004
R8UID4 YEMP_UID.04_2004
R8UID5 YEMP_UID.05_2004
R8UID6 YEMP_UID.06_2004
R8UID7 YEMP_UID.07_2004
R9HRS1 CV_HRS_PER_WEEK.01_2005
R9HRS2 CV_HRS_PER_WEEK.02_2005
R9HRS3 CV_HRS_PER_WEEK.03_2005
R9HRS4 CV_HRS_PER_WEEK.04_2005
R9HRS5 CV_HRS_PER_WEEK.05_2005
R9HRS6 CV_HRS_PER_WEEK.06_2005
R9HRS7 CV_HRS_PER_WEEK.07_2005
R9HRS8 CV_HRS_PER_WEEK.08_2005
R9HRS9 CV_HRS_PER_WEEK.09_2005
R9UID1 YEMP_UID.01_2005
R9UID2 YEMP_UID.02_2005
R9UID3 YEMP_UID.03_2005
R9UID4 YEMP_UID.04_2005
R9UID5 YEMP_UID.05_2005
R9UID6 YEMP_UID.06_2005
R9UID7 YEMP_UID.07_2005
R9UID8 YEMP_UID.08_2005
R9UID9 YEMP_UID.09_2005
R10HRS1 CV_HRS_PER_WEEK.01_2006
R10HRS2 CV_HRS_PER_WEEK.02_2006
R10HRS3 CV_HRS_PER_WEEK.03_2006
R10HRS4 CV_HRS_PER_WEEK.04_2006
R10HRS5 CV_HRS_PER_WEEK.05_2006
R10HRS6 CV_HRS_PER_WEEK.06_2006
R10HRS7 CV_HRS_PER_WEEK.07_2006
R10HRS8 CV_HRS_PER_WEEK.08_2006
R10HRS9 CV_HRS_PER_WEEK.09_2006
R10UID1 YEMP_UID.01_2006
R10UID2 YEMP_UID.02_2006
R10UID3 YEMP_UID.03_2006
R10UID4 YEMP_UID.04_2006
R10UID5 YEMP_UID.05_2006
R10UID6 YEMP_UID.06_2006
R10UID7 YEMP_UID.07_2006
R10UID8 YEMP_UID.08_2006
R10UID9 YEMP_UID.09_2006
R11HRS1 CV_HRS_PER_WEEK.01_2007
R11HRS2 CV_HRS_PER_WEEK.02_2007
R11HRS3 CV_HRS_PER_WEEK.03_2007
R11HRS4 CV_HRS_PER_WEEK.04_2007
R11HRS5 CV_HRS_PER_WEEK.05_2007
R11HRS6 CV_HRS_PER_WEEK.06_2007
R11HRS7 CV_HRS_PER_WEEK.07_2007
R11HRS8 CV_HRS_PER_WEEK.08_2007
R11UID1 YEMP_UID.01_2007
R11UID2 YEMP_UID.02_2007
R11UID3 YEMP_UID.03_2007
R11UID4 YEMP_UID.04_2007
R11UID5 YEMP_UID.05_2007
R11UID6 YEMP_UID.06_2007
R11UID7 YEMP_UID.07_2007
R11UID8 YEMP_UID.08_2007
R12HRS1 CV_HRS_PER_WEEK.01_2008
R12HRS2 CV_HRS_PER_WEEK.02_2008
R12HRS3 CV_HRS_PER_WEEK.03_2008
R12HRS4 CV_HRS_PER_WEEK.04_2008
R12HRS5 CV_HRS_PER_WEEK.05_2008
R12HRS6 CV_HRS_PER_WEEK.06_2008
R12HRS7 CV_HRS_PER_WEEK.07_2008
R12HRS8 CV_HRS_PER_WEEK.08_2008
R12UID1 YEMP_UID.01_2008
R12UID2 YEMP_UID.02_2008
R12UID3 YEMP_UID.03_2008
R12UID4 YEMP_UID.04_2008
R12UID5 YEMP_UID.05_2008
R12UID6 YEMP_UID.06_2008
R12UID7 YEMP_UID.07_2008
R12UID8 YEMP_UID.08_2008
R13HRS1 CV_HRS_PER_WEEK.01_2009
R13HRS2 CV_HRS_PER_WEEK.02_2009
R13HRS3 CV_HRS_PER_WEEK.03_2009
R13HRS4 CV_HRS_PER_WEEK.04_2009
R13HRS5 CV_HRS_PER_WEEK.05_2009
R13HRS6 CV_HRS_PER_WEEK.06_2009
R13HRS7 CV_HRS_PER_WEEK.07_2009
R13HRS8 CV_HRS_PER_WEEK.08_2009
R13HRS9 CV_HRS_PER_WEEK.09_2009
R13UID1 YEMP_UID.01_2009
R13UID2 YEMP_UID.02_2009
R13UID3 YEMP_UID.03_2009
R13UID4 YEMP_UID.04_2009
R13UID5 YEMP_UID.05_2009
R13UID6 YEMP_UID.06_2009
R13UID7 YEMP_UID.07_2009
R13UID8 YEMP_UID.08_2009
R13UID9 YEMP_UID.09_2009
E239011 YEMP-23901.01_2010
E239012 YEMP-23901.02_2010
E239013 YEMP-23901.03_2010
E239014 YEMP-23901.04_2010
E239015 YEMP-23901.05_2010
E239016 YEMP-23901.06_2010
E239018 YEMP-23901.08_2010
E344021 YEMP-34402.01_2010
E344022 YEMP-34402.02_2010
E344023 YEMP-34402.03_2010
E344024 YEMP-34402.04_2010
E344025 YEMP-34402.05_2010
E344027 YEMP-34402.07_2010
E344281 YEMP-34428.01_2010
E344282 YEMP-34428.02_2010
E344283 YEMP-34428.03_2010
E377011 YEMP-37701.01_2010
E377012 YEMP-37701.02_2010
E377013 YEMP-37701.03_2010
E377014 YEMP-37701.04_2010
E377015 YEMP-37701.05_2010
E377016 YEMP-37701.06_2010
E377017 YEMP-37701.07_2010
E377018 YEMP-37701.08_2010
E37901B1 YEMP-37901B.01_2010
E37901B2 YEMP-37901B.02_2010
E37901B3 YEMP-37901B.03_2010
E37901B4 YEMP-37901B.04_2010
E37901B5 YEMP-37901B.05_2010
E37901B6 YEMP-37901B.06_2010
E37901B7 YEMP-37901B.07_2010
E37901B8 YEMP-37901B.08_2010
E38000B1 YEMP-38000B.01_2010
E38000B2 YEMP-38000B.02_2010
E38000B3 YEMP-38000B.03_2010
E38000B4 YEMP-38000B.04_2010
E38000B5 YEMP-38000B.05_2010
E38000B6 YEMP-38000B.06_2010
E38000B7 YEMP-38000B.07_2010
E38000F1 YEMP-38000F.01_2010
E38000F2 YEMP-38000F.02_2010
E38000F3 YEMP-38000F.03_2010
E38000F4 YEMP-38000F.04_2010
E380021 YEMP-38002.01_2010
E380022 YEMP-38002.02_2010
E380023 YEMP-38002.03_2010
E381011 YEMP-38101.01_2010
E381012 YEMP-38101.02_2010
E381013 YEMP-38101.03_2010
E381014 YEMP-38101.04_2010
E381015 YEMP-38101.05_2010
E381016 YEMP-38101.06_2010
E381018 YEMP-38101.08_2010
E381021 YEMP-38102.01_2010
E381022 YEMP-38102.02_2010
E381023 YEMP-38102.03_2010
E381024 YEMP-38102.04_2010
E381025 YEMP-38102.05_2010
E381026 YEMP-38102.06_2010
E381031 YEMP-38103.01_2010
E381032 YEMP-38103.02_2010
E381033 YEMP-38103.03_2010
E381034 YEMP-38103.04_2010
E582011 YEMP-58201.01_2010
E582012 YEMP-58201.02_2010
E582013 YEMP-58201.03_2010
E582014 YEMP-58201.04_2010
E582015 YEMP-58201.05_2010
E582016 YEMP-58201.06_2010
E582017 YEMP-58201.07_2010
E582019 YEMP-58201.09_2010
E599001 YEMP-59900.01_2010
E599002 YEMP-59900.02_2010
E599003 YEMP-59900.03_2010
E599004 YEMP-59900.04_2010
E599005 YEMP-59900.05_2010
E599006 YEMP-59900.06_2010
E599007 YEMP-59900.07_2010
E599009 YEMP-59900.09_2010
E880001 YEMP-88000.01_2010
E880002 YEMP-88000.02_2010
E880003 YEMP-88000.03_2010
E880004 YEMP-88000.04_2010
E880005 YEMP-88000.05_2010
E880006 YEMP-88000.06_2010
E880009 YEMP-88000.09_2010
E984021 YEMP-98402.01_2010
E984022 YEMP-98402.02_2010
E984023 YEMP-98402.03_2010
E984024 YEMP-98402.04_2010
E984025 YEMP-98402.05_2010
E984026 YEMP-98402.06_2010
E984027 YEMP-98402.07_2010
E984291 YEMP-98429.01_2010
E984292 YEMP-98429.02_2010
E984293 YEMP-98429.03_2010
E984294 YEMP-98429.04_2010
E984295 YEMP-98429.05_2010
E584011 YEMP-58401.01_2010
E584012 YEMP-58401.02_2010
E584013 YEMP-58401.03_2010
E584014 YEMP-58401.04_2010
E584015 YEMP-58401.05_2010
E584016 YEMP-58401.06_2010
E584017 YEMP-58401.07_2010
E584018 YEMP-58401.08_2010
E584019 YEMP-58401.09_2010
UID1 YEMP_UID.01_2010
UID2 YEMP_UID.02_2010
UID3 YEMP_UID.03_2010
UID4 YEMP_UID.04_2010
UID5 YEMP_UID.05_2010
UID6 YEMP_UID.06_2010
UID7 YEMP_UID.07_2010
UID8 YEMP_UID.08_2010
UID9 YEMP_UID.09_2010
MIL1 YEMP_MILFLAG.01_2010
MIL2 YEMP_MILFLAG.02_2010
MIL3 YEMP_MILFLAG.03_2010
MIL4 YEMP_MILFLAG.04_2010
MIL5 YEMP_MILFLAG.05_2010
MIL6 YEMP_MILFLAG.06_2010
MIL7 YEMP_MILFLAG.07_2010
MIL8 YEMP_MILFLAG.08_2010
MIL9 YEMP_MILFLAG.09_2010
SAS Code for Variable Creation
*********************************** define arrays ****************************************;
* job length;
array e37701 e377011-e377019;
array e37901b e37901b1-e37901b9;
array e58201 e582011-e582019;
array e58401 e584011-e584019;
array e59900 e599001-e599009;
* starting hours;
array e23901 e239011-e239019;
array e34402 e344021-e344029;
array e34428 e344281-e344289;
array e88000 e880001-e880009;
array e98402 e984021-e984029;
array e98429 e984291-e984299;
* ending hours;
array e38000b e38000b1-e38000b9;
array e38000f e38000f1-e38000f9;
array e38101 e381011-e381019;
array e38102 e381021-e381029;
array e38103 e381031-e381039;
array e38002 e380021-e380029;
* other variables;
array euid uid1-uid9;
array mil mil1-mil9;
* created variables;
array le13wk le13wk1-le13wk9;
array hoursb hoursb1-hoursb9;
array hours hours1-hours9;
/*hand edits*/
if pubid=4644 then e38000f1=2; /*comment about 8 hours per month*/
if pubid=1874 then e880001=2; /*comment per month 8 hours*/
if pubid=3407 then e984023=3; /*comment in a year I work about 200 hours*/
if pubid=4644 then e38000f1=2; /*comment get about 8 hours per month*/
if pubid=5637 then e344021=40; /*comment answer was given bi-weekly - weekly hours should be 40*/
if pubid=7875 then e984021=30; /*comment states that really works 30 hours*/
******************************* job lasts at least 13 weeks **************************;
do i=1 to 9;
le13wk[i]=-4;
end;
do i=1 to 9;
if mil[i] ne 1 and euid[i]>0 then do;
if E37701[i]=0 or E37901B[i]=0 then le13wk[i]=1;
else if E58201[i]=0 or E59900[i]=0 then le13wk[i]=1;
else if E58401[i]=1 then le13wk[i]=1;
else if E37901B[i]=1 or E59900[i]=1 then le13wk[i]=0;
else if E37901B[i] in (-1,-2,-3) or E59900[i] in (-1,-2,-3) then le13wk[i]=-3;
end;
if uid1=-5 then le13wk[i]=-5;
end;
******************** Generate Variables using current round info. ***********************;
do i=1 to 9;
hoursb[i]=-4;
hours[i]=-4;
end;
do i=1 to 9;
if e23901[i] not in (.,-4,-5) then hoursb[i]=e23901[i];
if e34402[i] not in (.,-4,-5) then hoursb[i]=e34402[i];
if e34428[i] not in (.,-4,-5) then hoursb[i]=e34428[i];
if e88000[i] not in (.,-4,-5) then hoursb[i]=e88000[i];
if e98402[i] not in (.,-4,-5) then hoursb[i]=e98402[i];
if e98429[i] not in (.,-4,-5) then hoursb[i]=e98429[i];
if e38000f[i] not in (.,-4,-5) then hoursb[i]=e38000f[i];
if e38002[i] in (.,-4,0) then hours[i]=hoursb[i];
else if e38002[i] lt 0 and e38002[i] ne -5 then hours[i]=-3;
else if e38002[i] gt 0 then do;
if hoursb[i] gt 0 then hours[i]=hoursb[i]-e38002[i];
else hours[i]=-3;
end;
if e38000b[i] lt 0 and e38000b[i] not in (-4,-5,.) then hours[i]=-3;
if e38102[i] in (1,3) and e38103[i] not in (.,-4,-5) then hours[i]=e38103[i];
if e38102[i] lt 0 and e38102[i] not in (-4,-5, .) then hours[i]=-3;
if hours[i] in (-1, -2, -3) then hours[i]=-3;
if euid[i]=-4 and le13wk[i]=-4 then hours[i]=-4;
if uid1=-5 then hours[i]=-5;
end;
data two;
set one;
array hours hours1-hours9;
array euid uid1-uid9;
array mil mil1-mil9;
array le13wk le13wk1-le13wk9;
* created variables from previous rounds;
array R1hrs R1hrs1-R1hrs7;
array R1uid R1uid1-R1uid7;
array R2hrs R2hrs1-R2hrs9;
array R2uid R2uid1-R2uid9;
array R3hrs R3hrs1-R3hrs9;
array R3uid R3uid1-R3uid9;
array R4hrs R4hrs1-R4hrs9;
array R4uid R4uid1-R4uid9;
array R5hrs R5hrs1-R5hrs8;
array R5uid R5uid1-R5uid8;
array R6hrs R6hrs01-R6hrs11;
array R6uid R6uid01-R6uid11;
array R7hrs R7hrs01-R7hrs10;
array R7uid R7uid01-R7uid10;
array R8hrs R8hrs1-R8hrs7;
array R8uid R8uid1-R8uid7;
array R9hrs R9hrs1-R9hrs9;
array R9uid R9uid1-R9uid9;
array R10hrs R10hrs1-R10hrs9;
array R10uid R10uid1-R10uid9;
array R11hrs R11hrs1-R11hrs8;
array R11uid R11uid1-R11uid8;
array R12hrs R12hrs1-R12hrs8;
array R12uid R12uid1-R12uid8;
array R13hrs R13hrs1-R13hrs9;
array R13uid R13uid1-R13uid9;
***** Use R1-R13 info. for those with euid not eq to -4 but hours eq to -4;
***** To be consistent with created hourly wage and comp and job length, the rules here
are the same as those for hourly wage and comp;
*1) If the job lasts 13 weeks or less, and the job is from previous rounds, we use
hours from the previous rounds;
*2) If the job lasts 13 weeks or less, and the job is a new job, we -3 hours;
*3) If the job lasts more than 13 weeks or the job length is -3, we -3 hours;
*The reason to -3 case 2) and case 3) is that they really should have answered hours info in the curr round;
flag1=0; flag11=0; flag12=0; flag13=0; flag14=0; flag15=0; flag16=0; flag17=0; flag18=0; flag19=0;
flag1_10=0; flag1_11=0; flag1_12=0; flag1_13=0; flag1_91=0; flag1_92=0; flag1_93=0;
do i=1 to 9;
if euid[i]>0 and mil[i] ne 1 and hours[i]=-4 then do;
flag1=1;
if le13wk[i]=1 & 9700<euid[i]<201000 then do;
do j=1 to 7;
if euid[i]=r1uid[j] then hours[i]=R1hrs[j];
end;
do j=1 to 9;
if euid[i]=r2uid[j] then hours[i]=R2hrs[j];
end;
do j=1 to 9;
if euid[i]=r3uid[j] then hours[i]=R3hrs[j];
end;
do j=1 to 9;
if euid[i]=r4uid[j] then hours[i]=R4hrs[j];
end;
do j=1 to 8;
if euid[i]=r5uid[j] then hours[i]=R5hrs[j];
end;
do j=1 to 11;
if euid[i]=r6uid[j] then hours[i]=R6hrs[j];
end;
do j=1 to 10;
if euid[i]=r7uid[j] then hours[i]=R7hrs[j];
end;
do j=1 to 7;
if euid[i]=r8uid[j] then hours[i]=R8hrs[j];
end;
do j=1 to 9;
if euid[i]=r9uid[j] then hours[i]=R9hrs[j];
end;
do j=1 to 9;
if euid[i]=r10uid[j] then hours[i]=R10hrs[j];
end;
do j=1 to 8;
if euid[i]=r11uid[j] then hours[i]=R11hrs[j];
end;
do j=1 to 8;
if euid[i]=r12uid[j] then hours[i]=R12hrs[j];
end;
do j=1 to 9;
if euid[i]=r13uid[j] then hours[i]=R13hrs[j];
end;
end;
if le13wk[i]=1 then do;
if 9700 lt euid[i] lt 9800 then flag11=1;
else if 9800 lt euid[i] lt 9900 then flag12=1;
else if 199900 lt euid[i] lt 200000 then flag13=1;
else if 200000 lt euid[i] lt 200100 then flag14=1;
else if 200100 lt euid[i] lt 200200 then flag15=1;
else if 200200 lt euid[i] lt 200300 then flag16=1;
else if 200300 lt euid[i] lt 200400 then flag17=1;
else if 200400 lt euid[i] lt 200500 then flag18=1;
else if 200500 lt euid[i] lt 200600 then flag19=1;
else if 200600 lt euid[i] lt 200700 then flag1_10=1;
else if 200700 lt euid[i] lt 200800 then flag1_11=1;
else if 200800 lt euid[i] lt 200900 then flag1_12=1;
else if 200900 lt euid[i] lt 201000 then flag1_13=1;
else if euid[i] gt 201000 then do;
flag1_91=1;
hours[i]=-3;
end;
end;
else if le13wk[i]=0 or -4<le13wk[i]<0 then do;
flag1_92=1;
hours[i]=-3;
end;
else if le13wk[i]=-4 then do;
flag1_93=1;
hours[i]=-4;
end;
end;
end;
endsas;