x cd /pub/data/pl942000/Tools; %let pgm=basic_trend_report_momsas00; filename pgm "&pgm..sas"; /* ----Special rerun to just regenerate the mo msas00 output after finding problem with it. Oct. 2001 ---- */ options nodate linesize=132 pagesize=120 formdlim='=' noovp; libname pl942000 '/pub/data/pl942000'; libname pl9490tx '/pub/data/pl9490/pl9490tx' access=readonly; *<--saved 1990 pl94 extracts with 2k geography; proc format; value popgrp (fuzz=.01) 1='Total' 2='Hispanic or Latino' 3='White' 4='White: Non Hispanic' 5='Black / African American' 6='Asian' 6.5='Asian or Pac Islander' 7='Am. Indian or Alaska Ntv' 8='Hawaiian or other PI' 9='Some Other Race' 10='Total Multiracial'; run; title 'Public Law Population Trend Report'; footnote 'See https://mcdc.missouri.edu/reports/pl94trend/Notes.html for Background Information'; footnote2 'Programming by OSEDA Under a Contract with the Missouri Census Data Center'; %macro doit(state,stab,statenm,geos,arange,byvars=sumlev geocode,html=1,pdf=1,txt=1,csvfiles=1, set90=,set2000=,sort90=0,reportby=,maxobs=99999); %*--This macro handles setting up all the various parameters involved in using the %pl94trnd macro to generate a pl94 trend report. It specifies exactly which geographic entities are to be used , what output formats to generate and what decades we have data for.-- ; %let htmlfile=&statenm._&geos&arange; *--e.g. Missouri_Counties --; %let htmldir=%str(/pub/reports/pl94trend); %let title2=&htmlfile; %if &html %then %do; ods html file="&htmldir/&htmlfile..html" ; *include sascode('styles_default.sas')/nosource2; *---This modules sets the default html styles------; %end; %if &pdf %then %do; ods printer pdf file="&htmldir/&htmlfile..pdf" author='MCDC' ; %end; %if &txt %then %do; proc printto print="&htmldir/&htmlfile..txt" new; run; %end; %else %str(ods listing close;); %if &geos=Counties %then %let sumlevp=%str(050 040); %else %if &geos=States %then %let sumlevp=040; %else %if &geos=usregdiv %then %let sumlevp=%str(010 020 030); %else %if &geos=Places %then %let sumlevp=%str(160 161); %else %if &geos=Schools %then %let sumlevp=%str(sde sdu); %else %if &geos=CD106 %then %let sumlevp=%str(500); %else %if &geos=Senate %then %let sumlevp=%str(sen 610); %else %if &geos=House %then %let sumlevp=%str(hse 620); %else %if &geos=TAZ %then %let sumlevp=%str(taz); %else %if &geos=Tracts %then %let sumlevp=%str(140); %else %if &geos=MSAS %then %let sumlevp=%str(300 310); %else %if &geos=rpcs %then %let sumlevp=%str(rpc); %else %if &geos=Regions %then %let sumlevp=%str(reg); %else %if &geos=MCDs %then %let sumlevp=%str(060); %else %if &geos=UMExtsn %then %let sumlevp=%str(umx); %else %if &geos=CZ90 %then %let sumlevp=%str(cz); %pl94trnd(inset90=&set90,inset=&set2000,sumlevs=&sumlevp,byvars=&byvars,arange=&arange,/*title2=%str(&htmlfile),*/sort90=&sort90, title2=%str(Data is for the Missouri Portions of the Metropolitan Statistical Areas as of 4/2000), csvfiles=&csvfiles,state=&state,reportby=&reportby,maxobs=&maxobs); * title2 "&htmlfile"; %if &html %then %str( ods html close; ); %if &pdf %then %str( ods printer close; ); %mend doit; options nomprint; data work.momsas00; length geocode $8; set pl9490tx.momsas00; geocode='29-'||geocode; run; %doit(29,mo,Missouri,MSAS,,byvars=geocode,set90=work.momsas00,set2000=pl942000.momsas00,pdf=1,html=0,csvfiles=0, reportby=,maxobs=99999);