/* CV_DOI_EMPLOYED */ *This program is to create CV_DOI_EMPLOYED variable for Round 21. Variables required: wks910=EMP_STATUS_1997.23 wks911=EMP_STATUS_1997.24 wks2333=EMP_STATUS_2024.37 wks2334=EMP_STATUS_2024.38 r0int=CV_INTWK_R21 /*R21 interview date in continuous weeks: private variable*/ array alljobs (i) _1-_909 wks910-wks2334; do i=910 to 2334; if i=r0int-1 then do; empstat_wbi=alljobs; if empstat_wbi>0 & empstat_wbi<=5 & empstat_wbi~=3 then cv_doi_employed=0; else if empstat_wbi=6 then cv_doi_employed=2; else if empstat_wbi>=9701 then cv_doi_employed=1; else if empstat_wbi=0 | empstat_wbi=3 then cv_doi_employed=-3; else if empstat_wbi=. then cv_doi_employed=0; end; end; if r0int=-5 then cv_doi_employed=-5; /******************************************/ /* CV_DOI_HOURS_WORKED */ *This program is to create CV_DOI_HOURS_WORKED variable for Round 21. Variables required: hr910=EMP_HOURS_1997.23 hr911=EMP_HOURS_1997.24 hr2333=EMP_HOURS_2024.37 hr2334=EMP_HOURS_2024.38 array hrs (i) _1-_909 hr910-hr2334; do i=910 to 2334; if i=r0int-1 then do; hrs_doi=hrs; if hrs_doi>-4 & hrs_doi<0 then cv_doi_hours_worked=-3; else if hrs_doi>=0 & hrs_doi<30 then cv_doi_hours_worked=0; else if hrs_doi>=30 then cv_doi_hours_worked=1; else if hrs_doi=-4|hrs_doi=. then cv_doi_hours_worked=-4; end; end; if cv_doi_employed=0 & cv_doi_hours_worked=-3 then cv_doi_hours_worked=-4; if r0int=-5 then cv_doi_hours_worked=-5; /******************************************/ /* CV_DOI_DISABLED */ *This program is to create CV_DOI_ variable: dis=CV_DOI_DISABLED; *Variables required: CV_DOI_EMPLOYED YEMP-119410AA.01=yemp_119410aa_01 YEMP-119410AA.02=yemp_119410aa_02 YEMP-119410AA.03=yemp_119410aa_03 YEMP-119410AA.04=yemp_119410aa_04 YEMP-119410AA.05=yemp_119410aa_05 YEMP-119410AA.07=yemp_119410aa_07 YEMP-119410B.01=yemp_119410b_01 YEMP-119410B.02=yemp_119410b_02 YEMP-119410B.03=yemp_119410b_03 YEMP-119410B.04=yemp_119410b_04 YEMP-119410B.05=yemp_119410b_05 YEMP-119410B.07=yemp_119410b_07 gapb1-gapb7: start week of a gap from "1currentR21" program gape1-gape7: stop week of a gap from "1currentR21" program; array gapb (i) gapb1-gapb7; array gape (i) gape1-gape7; array y119410a (i) yemp_119410aa_01-yemp_119410aa_07; array y119410b (i) yemp_119410b_01-yemp_119410b_07; gap_ct=0; do i=1 to 7; if gapb>0 then gap_ct=gap_ct+1; end; if CV_DOI_EMPLOYED=1|CV_DOI_EMPLOYED=2|CV_DOI_EMPLOYED=-3 then dis=-4; else if CV_DOI_EMPLOYED=0 & gap_ct=0 then dis=0; else if CV_DOI_EMPLOYED=0 & gap_ct>0 then do; do i=1 to 7; if gapb<=r0int-1 & gape>=r0int-1 then do; gapnumber=i; if y119410a=3|y119410b=3 then dis=1; else dis=0; end; else if dis=. & gape