x cd /pub/data/sf12000/Tools; %let pgm=agersexh_query4; filename pgm "&pgm..sas"; *---Use the sf1.agersexh data to handle following query: From D. Ratliff, UM 7/03: Hi, John: Needs breakdown of Misosuri pop by race and hispanic (separately) for males age 45-80. ---; title 'Missouri Male Population Aged 45-80 by Race and Hispanic Origin'; title2 'Source: 2000 Census Summary File 1'; *--Save output for web access in html format--; ods html file="/pub/reports/temp/ratliff.html" style=sasweb; libname sf1 '/pub/data/sf12000'; libname user '/SAS_temp/user'; proc format; value $h '0'='Non-Hisp.' '1'='Hispanic'; value $r '1w'='White' '2b'='Black' '3i'='Indian' '4a'='Asian' '5h'='Hawn + PI' '6o'='Other' mr='Multi Race'; run; options missing='0'; *<---so the cells with no data print as 0's instead of .'s--; options nodate; proc tabulate data=sf1.moagersexh; where sex='m' and (16 <= age <= 80) and race ne ' '; class race hispanic ; format race $r. hispanic $h.; var persons; table (all='Total Pop' race=' ' hispanic=' ')*persons=' '*sum=' '*f=comma9.; footnote 'Generated by setup in ' 'sf12000/Tools/agersexh_query4.sas' ' Using Data from SF1, MO'; run;