x cd /pub/data/pl942000/Tools; %let pgm=school_trends; filename pgm "&pgm..sas"; /* ----This report examine trends in population change at the school level for MO. For Bill Elder, OSEDA John Blodgett, OSEDA, U. of Missouri Outreach & Extension. May, 2001. ---- */ options nodate linesize=132 pagesize=120 formdlim='=' noovp; libname user '/SAS_temp/user'; libname corrlst '/pub/data/corrlst'; libname pl942000 '/pub/data/census_2000/pl942000'; %libname(pl9490,subdir=pl9490tx); filename dlmout 'dlmout.csv'; title 'School District Trends: Look at School Districts With Greatest Change over Decade of the 90''s'; options nodate; data togo; merge pl9490tx.moschl00(in=in90 rename=(totpop=totpop90 black1=black90 hisppop=hisppop90 white1=white90 asianpi=asianpi90)) pl942000.moschls(in=in00); by desedist; if desedist=:'9999' then delete; ***; sumlevel=upcase(sumlev); if sumlev='SDU' then schtyp='Uni'; else if sumlev='SDE' then schtyp='Ele'; if in00 then asianpi00=asian1 + hawnpi1; array counts00(*) totpop white1 black1 asian1 hisppop; array counts90(*) totpop90 white90 black90 asianpi90 hisppop90; array change(*) changepop changewhite changeblack changeasian changehisp; array pctchange(*) pctchangepop pctchangewhite pctchangeblack pctchangeasian pctchangehisp; format pctchangepop--pctchangehisp 7.1; if in90 and in00 then do i=1 to dim(counts90); counts90(i)=round (counts90(i)); *--estimate, allocated counts rounded to integers--; change(i) = counts00(i) - counts90(i); if counts90(i) then pctchange(i)=round( 100*change(i)/counts90(i) , .1); end; label asianpi00='Asian & Pac Islndr 2000'; keep desedist areaname schtyp totpop totpop90 changepop pctchangepop hisppop hisppop90 changehisp pctchangehisp white1 white90 changewhite pctchangewhite black1 black90 changeblack pctchangeblack asianpi00 asianpi90 changeasian pctchangeasian ; rename white1=white00 black1=black00 ; run; proc print data=togo(obs=50); id desedist; run; %cnvtdlm(setin=togo,names=1,round=.1,lrecl=512) run;