x cd /pub/data/pl942000/Tools; %let pgm=unincorporated_pops; filename pgm "&pgm..sas"; /* ----This report generates a report showing the populations of each county, incorporate and unincoporated. John Blodgett, OSEDA, U. of Missouri Outreach & Extension. March, 2001. ---- */ options nodate linesize=100 pagesize=120 formdlim='=' noovp; libname user '/SAS_temp/user'; %libname (pl942000); %let webfile=Incorporated_by_County_2000; *--e.g. Missouri_Counties --; %let webdir=%str(/pub/reports/misc/mo); %let webdiru=%str(https://mcdc.missouri.edu)%substr(&webdir,5); *---add site portion and removes the /pub part--; %put webdiru= &webdiru; %let title2=&webfile; ods printer pdf file="&webdir/&webfile..pdf" author='MCDC' ; /*<=========================Comment out===================================== data aggin; set pl942000.mosums(keep=sumlev county totpop placefp placecc); where sumlev='740'; if placefp='99999' or placecc=:'U' then unincorp=totpop; else incorp=totpop; run; %agg(aggout=aggout,aggby=county,aggvars=totpop unincorp incorp,dropvars=_nag_ _lvl_); data report; set aggout; pctincorp=100*incorp/totpop; label totpop='Total/Population' unincorp='Population/ in Unincorporated/Areas' incorp='Population/ in Incorporated/Areas' pctincorp='% Population/in Incorporated/Areas'; format pctincorp 5.1 totpop incorp unincorp comma11.; run; ===========================End commented out================================ */ proc print split='/' label uniform noobs data=report; format county $mocnty.; sum totpop incorp unincorp; var county totpop incorp unincorp pctincorp; title 'Special Report: Missouri Counties Broken Down by Incorporated Population, 2000 Census'; footnote 'Report Generated by OSEDA Under a Contract With the MCDC'; footnote2 'Source: 2000 U.S. Census - Public Law 94-171 File'; footnote3 "Access CSV file at: &webdiru/&webfile..csv"; run; ods printer close; filename dlmout "&webdir/&webfile..csv"; %cnvtdlm(setin=report, names=0,varlabs=1,round=(.1))