x cd /pub/data/pums2000/Tools; %let pgm=educ_attain; filename pgm "&pgm..sas"; /* ------------------------------------------------------------------------ Program: educ_attain Description: Tabulates people that worked and groups by educational attainment HTML report stored in /pub/reports/&folder -- see let folder below ------------------------------------------------------------------------ */ libname pums2000 "/pub/data/pums2000"; libname user "/SAS_temp/user"; proc format; value educ 00 = 'Not in universe (Under 3 years)' 01 = 'No schooling completed' 02 = 'Nursery school to 4th grade' 03 = '5th grade or 6th grade' 04 = '7th grade or 8th grade' 05 = '9th grade' 06 = '10th grade' 07 = '11th grade' 08 = '12th grade, no diploma' 09 = 'High school graduate' 10 = 'Some college, but less than 1 year' 11 = 'One or more years of college, no degree' 12 = 'Associate degree' 13 = "Bachelor's degree" 14 = "Masters degree" 15 = 'Professional degree' 16 = 'Doctorate degree'; value $cmbeduc 01-08 = 'Not completed High-School' 09-11 = 'High-School graduate' 12 = 'Associate degree' 13 = "Bachelor's degree" 14-high = "Master's, Professional, Doctorate degree"; run; data alleducation; set pums2000.mo5 (keep=age educ pweight puma1 incws weeks hours); where (educ > '00') and (weeks >= '40') and (hours ge 30); run; title1 "Salary and Wage Income by Educational Attainment"; title2 "Missouri Residents 4-1-2000 who Worked Full Time Year Round in 1999"; footnote1 "Source: 2000 Decennial Census 5 Percent PUMS File"; footnote2 "Full Time Year Round defined as at least 40 weeks per year and at least 30 hours per week"; footnote3 "Report generated by educ_attain.sas in /pub/data/pums2000/Tools"; %let folder=educ_attain; ods listing close; ods html file="/pub/reports/&folder./&pgm..html" style=sasweb;; proc tabulate data=alleducation; format educ $cmbeduc.; var incws; freq pweight; class educ; table (educ all),all=' '*incws*(n*f=comma9. mean*f=dollar8. median*f=dollar8.); run; ods html close;