/******************************************************************************** AFDC1989.sas 4/15/99 SAS routine that reads ascii files of unit-level and person-level AFDC-QC data for 1989 and prints frequencies and means. NOTE: Edit the filename statements to point to your local drive where the data files have been downloaded. If you want a flat file for analysis, merge the unit and person datasets by unit_id. Special merge coding unique to 1989 is at end of this routine. It separates into two fields each of the four fields whose coding changes mid-year. To make the dataset permanent, comment in the final step and modify the libname statement to point to your local AFDC_QC data directory. The data are downloaded in zipped format. The 'x gzip' commands execute operating system commands that will unzip and then zip the original data files as this routine executes. Thus, it is not necessary for you to separately perform these steps. However, you must first ascertain that you have the gzip utility. See the downloads page for information about gzip. Edited and commented: July 18, 2002 (JWM) *********************************************************************************/ filename in1 'c:\afdc_qc\downloads\afun1989'; filename in2 'c:\afdc_qc\downloads\afpr1989'; x 'gzip -d c:\afdc_qc\downloads\afun1989'; x 'gzip -d c:\afdc_qc\downloads\afpr1989'; options nocenter compress = yes; *options obs=100; proc format; VALUE FSTATE 1="ALABAMA" 2="ALASKA" 4="ARIZONA" 5="ARKANSAS" 6="CALIFORNIA" 8="COLORADO" 9="CONNECTICUT" 10="DELAWARE" 11="DIST. OF COL." 12="FLORIDA" 13="GEORGIA" 15="HAWAII" 16="IDAHO" 17="ILLINOIS" 18="INDIANA" 19="IOWA" 20="KANSAS" 21="KENTUCKY" 22="LOUISIANA" 23="MAINE" 24="MARYLAND" 25="MASSACHUSETTS" 26="MICHIGAN" 27="MINNESOTA" 28="MISSISSIPPI" 29="MISSOURI" 30="MONTANA" 31="NEBRASKA" 32="NEVADA" 33="NEW HAMPSHIRE" 34="NEW JERSEY" 35="NEW MEXICO" 36="NEW YORK" 37="NORTH CAROLINA" 38="NORTH DAKOTA" 39="OHIO" 40="OKLAHOMA" 41="OREGON" 42="PENNSYLVANIA" 44="RHODE ISLAND" 45="SOUTH CAROLINA" 46="SOUTH DAKOTA" 47="TENNESSEE" 48="TEXAS" 49="UTAH" 50="VERMONT" 51="VIRGINIA" 53="WASHINGTON" 54="WEST VIRGINIA" 55="WISCONSIN" 56="WYOMING" 66="GUAM" 72="PUERTO RICO" 78="VIRGIN ISLANDS" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86REVTY 1="AFDC/FS/Medicaid" 2="AFDC/FS" 3="AFDC/Medicaid" 4="FS/Medicaid" 5="AFDC only" 6="FS only" 7="Medicaid only" 8="Adult only" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FYY 99="unknown" . ="Blank" -1="VALUE NOT IN CODEBOOK" ; VALUE FMM 1="january" 2="february" 3="march" 4="april" 5="may" 6="june" 7="july" 8="august" 9="september" 10="october" 11="november" 12="december" 99="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86STADS 1="Review completed" 2="Not subject to review/listed in error" 3="Recipient moved out of state" 4="Recipient unwilling to give information" 5="Unable to locate recipient" 6="Not processed(Food Stamp only)" 7="Other" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FYYREOPE 99="unknown" . ="Blank" -1="VALUE NOT IN CODEBOOK" ; VALUE FMMREOPE 1="january" 2="february" 3="march" 4="april" 5="may" 6="june" 7="july" 8="august" 9="september" 10="october" 11="november" 12="december" 99="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FDDREOPE 99="unknown" . ="Blank" ; VALUE FYYACTIO 99="unknown" . ="Blank" -1="VALUE NOT IN CODEBOOK" ; VALUE FMMACTIO 1="january" 2="february" 3="march" 4="april" 5="may" 6="june" 7="july" 8="august" 9="september" 10="october" 11="november" 12="december" 99="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FDDACTIO 99="unknown" . ="Blank" ; VALUE F86TYPAC 1="Initial approval or certification" 2="Reopend following discontinuance action" 3="Redetermination/recertification" 4="Monthly report (AFDC only)" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FLIQAST 99998="$99,998 or more" .Z ="zero" .U ="unknown" ; VALUE FRELPRP 99998="$99,998 or more" .Z ="zero" .U ="unknown" ; VALUE FCAR 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FOTHAST 99998="$99,998 or more" .Z ="zero" .U ="unknown" ; VALUE FPRIORA 1="Yes" 2="No" 9="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86SHLTR 1="Owns or is buying home" 2="Public housing" 3="HUD rent subsidy" 4="Other rent subsidy" 5="Private housing without subsidy" 6="Shares group quarters" 7="Rent free" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FGROSSY 9998="$9998 or more" .Z ="zero" .U ="missing" ; VALUE FDDWORK 998="$998 or more" .Z ="zero" .U ="missing" ; VALUE FDDCHLD 998="$998 or more" .Z ="zero" .U ="missing" ; VALUE F3013DD 998="$998 or more" .Z ="zero" .U ="missing" ; VALUE FNETINC 9998="$9998 or more" .Z ="zero" .U ="missing" ; VALUE F83UNBRN 1="Payment to pregnant mom w no other kids" 2="Special need pay pregnant mom w ot kids" 3="No unborn child assoc with AFDC case" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86RSTRC 1="Vendor payment" 2="Two-party payment" 3="Voluntary request of recipient" 4="Inadequate managemnt of assistnce paymnt" 5="Refused participation in WIN" 6="Refused to assign support rights to IV-D" 7="Refused to cooperate with IV-D agency" 8="Other" 9="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FFSTYPEA 1="Member Food Stamp case under review" 2="Member Food Stamp case not under review" 3="Member does not receive Food Stamps" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FFSTY83B 1="AFDC" 2="AFDC eligible but not receiving $ payment" 3="Medicaid" 4="Adult Assistance in Territories" 5="All other persons" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FAGE 0="Less than 1 year old" 98="98 or more years old" 99="unknown" . ="Blank" ; VALUE FSEX 1="Male" 2="Female" 9="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FRACE 1="White, Non-Hispanic" 2="Black, Non-Hispanic" 3="Hispanic" 4="Asian/Oriental/Pacific Islander" 5="Native American" 9="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F89ETP 1="Physically or mentally unfit" 2="Pregnant" 3="Over or under age limit" 4="Needed home ill/incapacitated HH member" 5="Rel/other caretaker of a dependent child" 6="Meeting student eligibility requirements" 7="Emp 30 hr/wk or earning Fed minx30/wk" 8="Program not offered in area (remote)" 9="Receiving or applied for unemp comp" 10="Complyng wrk requirements under oth pgms" 11="Participating in drug addiction/alc treatment" 12="Other (incl failure comply wrk regist)" 15="Required participate WIN/IVA/JOBS, but not" 16="Reg in FS pgm,not particip empl/training" 20="Mand:Job search training" 21="Mand:Job search" 22="Mand:Job search/work experience program" 23="Mand:CWEP/other work experience program" 24="Mand:Work supp,/grant diversion/OJT" 25="Mand:Educ for HS degree incl GED pgms" 26="Mand:Post-secndry educ for degree/certif" 27="Mand:Remedial education" 28="Mand:Vocational training, including JTPA" 29="Mand:Other" 30="Exm y ch:Job search training" 31="Exm y ch:Job search" 32="Exm y ch: job search/work experience prgm" 33="Exm y ch:CWEP or oth work experience pgm" 34="Exm y ch:Work supp,/grant diversion/OJT" 35="Exm y ch:Educ for HS degree incl GED pgms" 36="Exm y ch:Post-secndry educ for degree/certif" 37="Exm y ch:Remedial education" 38="Exm y ch:Vocational training, including JTPA" 39="Exm y ch:Other" 40="Exm oth:ob search training" 41="Exm oth:Job search" 42="Exm oth:Combined job search/work experience pgm" 43="Exm oth:CWEP or oth work experience pgm" 44="Exm oth:Work supp,/grant diversion/OJT" 45="Exm oth:Educ for HS degree incl GED pgms" 46="Exm oth:Post-secndry educ for degree/certif" 47="Exm oth:Remedial education" 48="Exm oth:Vocational training, including JTPA" 49="Exm oth:Other" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F83ETP 1="Registered:WIN - Mandatory" 2="Registered:WIN - Voluntary" 3="Registered:WIN and CWEP" 4="Registered :WIN, CWEP and Work Supp" 5="Registered:work under FS program" 7="Exempt:Ill, incapacitated, or advanced age" 8="Exempt:Under required age" 9="Exempt:Needed care for ill or incapacitated" 10="Exempt:Relative/caretaker under age child" 11="Exempt:Meeting student elig requirements" 12="Exempt:Participating drug rehab program" 13="Exempt:Emp 30 hr/wk or Fed minx30/wk" 14="Exempt:Emp 80 hr/mo for not < min wage" 15="Exempt:Receiving/applied unemp comp" 16="Exempt:Other (incl failure comply wrk regist)" 20="Regist & Exempt:Ill, incapacitated, or old" 21="Regist & Exempt:vUnder required age" 22="Regist & Exempt:Needed care for illness" 23="Regist & Exempt:Relative/caretaker under age child" 24="Regist & Exempt:Meeting student elig requirements" 25="Regist & Exempt:Participating drug rehab pgm" 26="Regist & Exempt: 30 hr/wk or Fed minx30/wk" 27="Regist & Exempt:Emp 80 hr/mo for not < min wage" 28="Regist & Exempt: or applying for unemployment" 29="Regist & Exempt:Other" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F89EMP 1="9 hours or less" 2="10-29 hours per week" 3="Part time Less than 30 hours" 4="30-39 hours per week" 5="Full-time: 40 + hours" 6="Hours per week not specified" 10="Active duty military service" 11="Migrant farm labor" 12="Primarily self-employed at farming" 13="Primarily self-employed, non-farm activity" 20="Particip WIN, IVA,JOBS,FS Emp & Training" 21="Not participating in any educ or training" 22="Leading to a High school degree incl GED" 23="Post-secondary educ toward deg/certif" 24="Remedial education toward a deg/certif" 25="Non-degree, including JTPA & voc educ" 30="Awaiting recall from layoff" 31="On strike" 32="Less than 1 year" 33="More than 1 year" 34="Other (incl newly entering the job market)" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86EMP 1="9 hours or less" 2="10-29 hours per week" 3="Part time Less than 30 hours" 4="30-39 hours per week" 5="Full-time: 40 + hours" 10="Active duty military service" 11="Migrant farm labor" 12="Primarily self-employed at farming" 13="Primarily self-employed, non-farm activity" 20="Incapacitated for employment" 21="Full-time homemaker" 22="Attending school or receiving training" 23="Not actively seeking employment" 24="Awaiting recall from layoff" 25="On strike" 26="Unemployed: less than 1 year" 27="Unemployed: more than 1 year" 28="Other unemployed" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FWAGE 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FSELFEM 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FEITC 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FOTHERN 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FSSRR 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FVA 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FSSI 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FUCOMP 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FWCOMP 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FOTHGOV 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FFSHSE 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FINKIND 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FDEEMED 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FGAST 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FEDBENS 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FUNINC 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FADCAMT 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE FCHDSUP 9998="$9,998 or more" .Z ="zero" .U ="unknown" ; VALUE F89NEDUC 0=" None" 1="Grades 1-5" 2="Grades 6-8" 3="Grades 9-10" 4="Grade 11" 5="High School Graduate/GED" 6="Some college, but less than 2 years" 7="2-3 years of college including graduate of 2-year " 8="College graduate or post graduate study" 9="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86AFT 21="Adult:Natural or adoptive parent" 22="Adult:Stepparent" 23="Adult:Grandparent" 24="Adult:Brother/sister" 25="Adult:Other relative" 26="Adult:Nonrelative" 31="Child:Deceased" 32="Child:Incapacitated" 33="Child:Unemployed" 34="Divorced or legally separated" 35="Child:Not legally separated (includes desertion)" 36="Child:Not married each oth, paternty estab" 37="Child:Not married each oth, paternty not estab" 41="Other unit:Natural or adoptive parent" 42="Other unit:Stepparent" 43="Other unit:Grandparent" 44="Other unit:Brother/sister" 45="Other unit:Other relative" 46="Other unit:Nonrelative" 51="Nonrecipient:Natural or adoptive parent" 52="Nonrecipient:Stepparent" 53="Nonrecipient:Grandparent" 54="Nonrecipient:Brother/sister" 55="Nonrecipient:Other relative" 56="Nonrecipient:Nonrelative" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F89REL 1="Head of Household (Or Principal person)" 2="Spouse" 3="Parent" 4="Daughter/son" 5="Stepdaughter/Stepson" 6="Grandchild or Great-grandchild" 7="Other related person (eg brother,niece)" 8="Foster child or other unrelated child" 9="Unrelated adult" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F83CIT 1="Born in this State" 2="Born US not this State/State unk" 3="Naturalized citizen" 4="Immigrant wth permanent residence status" 5="Alien accorded refugee status" 6="Alien granted political asylum" 7="Nonimmigrnt admitted for specific period" 8="Alien granted stay of deportation by INS" 9="Mexican citizen with "border" card" 10="Undocumented alien (visa expired, entered illegall" 11="Not U.S. Citizen but exact status unknown" 12="Indiv permanently residing in US legally" 99="unknown" . ="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86INST 1="Not institutionalized" 2="Intermediate care for mentally retarded" 3="Intermediate care or skilled nurse facility" 4="Other long-term care facility or home" 5="Chronic-care-only institutions" 6="Skilled care for mentally retarded" 7="Other" . ="Blank" 9="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86NEDUC 0="None" 17="Post Graduate work" 19="unknown" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F86REL 1="Head of Household (Or Principal Person)" 2="Spouse" 3="Parent" 4="Daughter/son" 5="Stepdaughter/Stepson" 6="Other related person (eg brother,niece)" 7="Foster Child or other unrelated child" 8="Unrelated Adult" 10="Other" . ="Blank" 99="unknown" OTHER="VALUE NOT IN CODEBOOK" ; *read in unit level variables; data unit; infile in1 lrecl = 91 missover; INPUT UNIT_ID 6.0 STATE 2.0 STRATM 2.0 REVTYP 1.0 YY 2.0 MM 2.0 STATEDIS 1.0 YYREOPEN 2.0 MMREOPEN 2.0 DDREOPEN 2.0 YYACTION 2.0 MMACTION 2.0 DDACTION 2.0 TYPACT 1.0 TOTAU 2.0 LIQAST 5.0 RELPRP 5.0 CAR 4.0 OTHAST 5.0 PSTAND 4.0 SAMPAY 4.0 RESTRC 2.0 UNBORN 1.0 PRIORA 1.0 SHELTR 1.0 GROSSY 4.0 DDWORK 3.0 DDCHLD 3.0 DD3013 3.0 NETINC 4.0 NUMPER 2.0 WGT 9.4 ; rename TYPACT =TYPACT86 statedis=statds86 unborn =unborn83 sheltr =sheltr86 RESTRC =rstrc86 REVTYP =REVTYP86 ; *label; label UNIT_ID="Unit Identifier"; label STATE="State"; label STRATM="Stratum"; label REVTYP="Receive Type"; label YY="Sample year"; label MM="Sample month"; label statedis="State disposition"; label YYREOPEN="Most Recent Opening Year"; label MMREOPEN="Most Recent Opening Month"; label DDREOPEN="Most Recent Opening Day"; label YYACTION="Most Recent Action Year"; label MMACTION="Most Recent Action Month"; label DDACTION="Most Recent Action Day"; label TYPACT="Type of Action"; label TOTAU="Persons in Assistance Unit"; label LIQAST="Liquid Assets"; label RELPRP="Real Property"; label CAR="Countable vehicle assets"; label OTHAST="Other non-liquid assets"; label PSTAND="Payment standard"; label SAMPAY="Sample month's payment"; label PRIORA="Prior AFDC"; label SHELTR="Shelter Arrangements"; label GROSSY="Gross Countable income"; label DDWORK="Work expenses disregards"; label DDCHLD="Child care disregards"; label DD3013="First 30+1/3 disregards"; label NETINC="Net countable income"; label NUMPER="Number of case members"; label WGT="Unit weight"; label UNBORN="Unborn Children"; label RESTRC="Restricted Payment"; /*** Convert missing and negative codes to missing indicator ***/ array array5 LIQAST RELPRP OTHAST; array array4 CAR PSTAND SAMPAY GROSSY NETINC; array array3 DDWORK DDCHLD DD3013; do over array5; if (array5 eq 0) then array5=.Z; else if (array5 eq 99999 or array5 eq -1) then array5=.U; end; do over array4; if (array4 eq 0) then array4=.Z; else if (array4 eq 9999 or array4 eq -1) then array4=.U; end; do over array3; if (array3 eq 0) then array3=.Z; else if (array3 eq 999 or array3 eq -1) then array3=.U; end; *print out statistics; Proc freq data = unit; tables STATE STRATM REVTYP86 YY MM STATDS86 YYREOPEN MMREOPEN DDREOPEN YYACTION MMACTION DDACTION TYPACT86 TOTAU rstrc86 UNBORN83 PRIORA SHELTR86 NUMPER/MISSING; title '******** 1989 ********* the unit level variables'; format STATE FSTATE. REVTYP86 F86REVTY. YY FYY. MM FMM. STATDS86 F86STADS. YYREOPEN FYYREOPE. MMREOPEN FMMREOPE. DDREOPEN FDDREOPE. YYACTION FYYACTIO. MMACTION FMMACTIO. DDACTION FDDACTIO. TYPACT86 F86TYPAC. LIQAST FLIQAST. RELPRP FRELPRP. CAR FCAR. OTHAST FOTHAST. PRIORA FPRIORA. SHELTR86 F86SHLTR. GROSSY FGROSSY. DDWORK FDDWORK. DDCHLD FDDCHLD. DD3013 F3013DD. NETINC FNETINC. UNBORN83 F83UNBRN. RSTRC86 F86RSTRC. ; proc means data = unit; var UNIT_ID LIQAST RELPRP CAR OTHAST PSTAND SAMPAY GROSSY DDWORK DDCHLD DD3013 NETINC WGT; run; *read in person level variables; data person; infile in2 lrecl = 100 missover; INPUT UNIT_ID 6.0 PER_ID 2.0 FSTYPEA 1.0 FSTYPEB 1.0 AFT 2.0 REL 2.0 AGE 2.0 SEX 1.0 RACE 1.0 CIT 2.0 ETP 2.0 EMP 2.0 INSTIT 1.0 WAGE 4.0 SELFEM 4.0 EITC 4.0 OTHERN 4.0 SSRR 4.0 VA 4.0 SSI 4.0 UCOMP 4.0 WCOMP 4.0 OTHGOV 4.0 FSHSE 4.0 INKIND 4.0 DEEMED 4.0 GAST 4.0 EDBENS 4.0 UNINC 4.0 ADCAMT 4.0 CHDSUP 4.0 NEDUC 2.0 ; rename aft =aft86 cit =cit83 instit=instit86 FSTYPEB=FSTYB83 ; label PER_ID=" Person Identification"; label FSTYPEA=" Food Stamp affiliation"; label FSTYPEB="AFDC/Medicaid receipt"; label AGE=" Age (1-97 actual years)"; label SEX=" Sex"; label RACE=" Race"; label WAGE=" Wages"; label SELFEM=" Self-employment earnings"; label EITC=" Earned income tax credit"; label OTHERN=" Other earned income"; label SSRR=" SSA/Railroad retirement"; label VA=" VA benefits"; label SSI=" Federal SSI benefit"; label UCOMP=" Unemployment compensation"; label WCOMP=" Workmen's compensation"; label OTHGOV=" Other government benefit"; label FSHSE=" Food stamps/Housing subsidy"; label INKIND=" Contribution/Income in kind"; label DEEMED=" Deemed income"; label GAST=" PA or GA"; label EDBENS=" Education grants/scholarship"; label UNINC=" Other Unearned"; label ADCAMT=" AFDC"; label CHDSUP=" Child support pay. to agency"; label AFT=" AFDC affiliation"; label CIT=" Citizenship status"; label INSTIT=" Institutional status"; label UNIT_ID="Unit Identifier"; /**************************************************** The coding of four fields changes mid-year in 1989. Use the following merge to separate these fields into pre-April 1989 and April-forward fields. *****************************************************/ data mrg; merge unit(in=a) person(in=b) end=eof; by unit_id; retain k1-k2 0; if a and not b then k1+1; else if b and not a then k2+1; if eof then do; put 'In unit dataset but not in person set: ' k1; put 'In person dataset but not in unit set: ' k2; end; label EMP86=" Employment status"; label EMP89=" Employment status"; label NEDUC86=" Education level"; label NEDUC89=" Education level"; label REL83=" Relationship/Head of Household"; label REL89=" Relationship/Head of Household"; label ETP83=" Employment Training Program"; label ETP89=" Employment Training Program"; if yy = 89 and mm >=4 then do; neduc89=neduc; etp89 =etp; emp89 =emp; rel89 =rel; end; else do; neduc86=neduc; etp83 =etp; emp86 =emp; rel83 =rel; end; /*** Convert missing and negative codes to missing indicator ***/ array array4 WAGE SELFEM EITC OTHERN SSRR VA SSI UCOMP WCOMP OTHGOV FSHSE INKIND DEEMED GAST EDBENS UNINC ADCAMT CHDSUP; do over array4; if (array4 eq 0) then array4=.Z; else if (array4 eq 9999 or array4 eq -1) then array4=.U; end; proc freq data = mrg; tables PER_ID FSTYPEA FSTYB83 aft86 REL83 REL89 AGE SEX RACE CIT83 ETP ETP83 ETP89 EMP EMP86 EMP89 INSTIT86 NEDUC NEDUC86 NEDUC89/MISSING; TITLE1 '******** 1989 ********* Person level variables '; title2 'Note that the code definitions change beginning April 1989 for REL NEDUC ETP and EMP'; format FSTYPEA FFSTYPEA. FSTYB83 FFSTY83B. AGE FAGE. SEX FSEX. RACE FRACE. ETP89 F89ETP. EMP89 F89EMP. WAGE FWAGE. SELFEM FSELFEM. EITC FEITC. OTHERN FOTHERN. SSRR FSSRR. VA FVA. SSI FSSI. UCOMP FUCOMP. WCOMP FWCOMP. OTHGOV FOTHGOV. FSHSE FFSHSE. INKIND FINKIND. DEEMED FDEEMED. GAST FGAST. EDBENS FEDBENS. UNINC FUNINC. ADCAMT FADCAMT. CHDSUP FCHDSUP. NEDUC89 F89NEDUC. AFT86 F86AFT. REL89 F89REL. CIT83 F83CIT. ETP83 F83ETP. emp86 F86EMP. INSTIT86 F86INST. NEDUC86 F86NEDUC. REL83 F86REL. ; proc means data = mrg; var UNIT_ID WAGE SELFEM EITC OTHERN SSRR VA SSI UCOMP WCOMP OTHGOV FSHSE INKIND DEEMED GAST EDBENS UNINC ADCAMT CHDSUP; run; x 'gzip c:\afdc_qc\downloads\afun1989'; x 'gzip c:\afdc_qc\downloads\afpr1989'; /************************************* *** Merge the temporary datasets into a single permanent one; proc sort data=unit; by unit_id; proc sort data=person; by unit_id; libname locdir 'c:\afdc_qc\data'; data locdir.afdc1989; set mrg; run; **************************************/