/******************************************************************************** AFDC1992.sas 3/31/99 SAS routine that reads ascii files of unit-level and person-level AFDC-QC data for 1992 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. Optional merge coding is at end of this routine but is initially commented out. If the merge coding is used, also 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\afun1992'; filename in2 'c:\afdc_qc\downloads\afpr1992'; x 'gzip -d c:\afdc_qc\downloads\afun1992'; x 'gzip -d c:\afdc_qc\downloads\afpr1992'; options nocenter compress = yes; *options obs=0; 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 . ="Blank" 99="UNKNOWN" -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 FYYREOPEN 99="Unknown" .="Blank" -1="VALUE NOT IN CODEBOOK" ; VALUE FMMREOPEN 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 FDDREOPEN 99="Unknown" .="Blank" ; VALUE FYYACTION 99="Unknown" .="Blank" -1="VALUE NOT IN CODEBOOK" ; VALUE FMMACTION 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 FDDACTION 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 FRSTR92A 1="Vendor payment" 2="Two-party payment" 3="Family member or friend" 4="Agency representative" 5="Guardian/legal rep (court order only)" 6="None" .="Blank" 9="UNKNOWN" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FRSTR92B 1="Voluntary request of recipient" 2="Result vendor reqst (non paymnt rent etc)" 3="Other mismanagement assistnce payment" 4="Refused to participate empl/training pgms" 5="Failed assign support rights IV-D agency" 6="Refused to cooperate in support activities" 7="Other (including court order)" 8="Unknown" .="Blank" 9="UNKNOWN" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F92UNBRN 1="Pregnant,no othr kids,dad absnt" 2="Pregnant,no othr kids,dad disabld" 3="Pregnant,no othr kids,dad unemply" 4="Pregnant,no othr kids,dad deceasd" 5="Preg,with ot kids,dad absnt,spec need pay" 6="Preg,with ot kids,dad disabl,spec need pay" 7="Preg,with ot kids,dad unemp,spec need pay" 8="Preg,with ot kids,dad dead,spec need pay" 9="No unborn child assoc with AFDC case" .="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE FPRIORA 1="Yes" 2="No" 9="Unknown" .="Blank" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F92SHLTR 0="Homeless shelter/emergency housing" 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 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 FFSTY92B 1=" AFDC" 2="AFDC eligible but not receiving $ payment" 3="Medicaid" 4="Adult Assistance in Territories" 5="All other persons" 6="S.S.I." .="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 F92CIT 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" 10="Alien granted stay of deportation by INS" 11="Mexican citizen with 'border' card" 12="Undocumented alien" 13="Not US citizen but exact status unknown" 14="Indiv permanently residing in US legally" 15="Lawful temporary resident under amnesty" 16="Lawful permanent resident under amnesty" 17="Lawful temp res under SAW Sect 210 IRCA" 18="Lawful perm res under SAW Sect 20 IRCA" 99=" 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 F92EMP 1="Emp:9 hours or less" 2="Emp:10-19 hours per week" 3="Emp:20-29 hours per week" 4="Emp:30-39 hours per week" 5="Emp:Full-time: 40 + hours" 6="Emp:Hours per week not specified" 10="Emp:Active duty military service" 11="Emp:Migrant farm labor" 12="Emp:Primarily self-employed at farming" 13="Emp:Primarily self-employed, non-farm" 20="Not emp:Participating JOBS/FS educ/train" 21="Not emp:Participatng self-init educ/train" 22="Not partic any educ/training activs" 30="Not emp:Awaiting recall from layoff" 31="Unemp:On strike" 32="Unemp:Less than 1 year" 33="Unemp:More than 1 year" 34="Unemp:Other (incl newly entering job market)" .="Blank" 99="UNKNOWN" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F92INST 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="Addict or alcoholic center" 8="other" .="Blank" 9="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 FADCHCD 1="Adult with known affiliation and known age" 2="Adult with known affiliation and unknown age" 3="Adult with unknown affiliation and known age" 4="Reserved" 5="Child with known affiliation and known age" 6="Child with known affiliation and unknown age" 7="Child with unknown affiliation and known age" 8="S.S.I. Child age unknown" .="Blank" 9="UNKNOWN" OTHER="VALUE NOT IN CODEBOOK" ; VALUE F92AFT 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="Child w/cs:Divorced or legally separated" 35="Child w/cs:Not legally separated" 36="Child no cs:Not married ea oth, paternty estab" 37="Child no cs:Not married ea oth, no paternty" 38="Child no cs:Other" 39="Child:Child receiving S.S.I." 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" ; *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 RESTRCA 1.0 RESTRCB 1.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 =unborn92 sheltr =sheltr92 RESTRCA =RSTR92A restrcb =RSTR92B REVTYP =REVTYP86 ; 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 RESTRCA="Restricted Payment(first digit)"; label RESTRCB="Restricted Payment(Second digit)"; label UNBORN="Unborn Children"; 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"; /*** 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 RSTR92A RSTR92B UNBORN92 PRIORA SHELTR92 NUMPER/MISSING; title '******** 1992 ********** 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. RSTR92A FRSTR92A. RSTR92B FRSTR92B. UNBORN92 F92UNBRN. PRIORA FPRIORA. SHELTR92 F92SHLTR. GROSSY FGROSSY. DDWORK FDDWORK. DDCHLD FDDCHLD. DD3013 F3013DD. NETINC FNETINC. ; 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 ADCHCD 1.0 ; rename aft =AFT92 rel =rel89 cit =cit92 etp =etp89 emp =emp92 instit=instit92 neduc =neduc89 FSTYPEB=FSTYB92; 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 CIT=" Citizenship status"; label ETP=" Employment Training Program"; label EMP=" Employment status"; label INSTIT=" Institutional status"; 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 NEDUC=" Education level"; label ADCHCD=" Adult Child Code"; label AFT=" AFDC affiliation"; label REL=" Relationship/Head of Household"; label UNIT_ID="Unit Identifier"; /*** 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 = person; tables PER_ID FSTYPEA FSTYB92 AFT92 REL89 AGE SEX RACE CIT92 ETP89 EMP92 INSTIT92 NEDUC89 ADCHCD/MISSING; title "******** 1992 ********** person level variables"; format FSTYPEA FFSTYPEA. FSTYB92 FFSTY92B. AGE FAGE. SEX FSEX. RACE FRACE. CIT92 F92CIT. ETP89 F89ETP. EMP92 F92EMP. INSTIT92 F92INST. 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. ADCHCD FADCHCD. AFT92 F92AFT. REL89 F89REL. ; proc means data = person; 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\afun1992'; x 'gzip c:\afdc_qc\downloads\afpr1992'; /************************************* *** 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.afdc1992; 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; run; **************************************/