x cd /pub/data/corrlst/Tools; %let pgm=mobl2mpo03; filename pgm "&pgm..sas"; *<======See setup modotx_corrlst03.sas in /pub/data/modotx/Tools for LATEST VERSION of this setup=====; *<===!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!====; *--Read the CSV files from by Lance H. with new blocks within MPOs for 2003 and use it to create a new corrlst.mobl2mpo03 correlation list. See job mobl2mpo for the setup that created the original mobl2mpo corr. list. JGB, 7-1-2003 --*; libname corrlst '/pub/data/corrlst'; libname sf12000x '/pub/data/sf12000x'; *filename in '/pub/data/modotx/mpoblks03/*.txt' ; filename in pipe 'unzip -a -p ../mpoblks03' ; libname user '/SAS_temp/userb'; title "&pgm: Create Updated MODOT MPO Correlation list"; /*<=========================Comment out===================================== *<=====OHIO - 2002 code=======; *---Note that not all blocks are in an MPO so not all blocks are in this corrlst dataset*; data &pgm(label="Mo 2000 Block to MODOT MPO as of 9/02" ); infile in dsd ; length county $5 tract $7 block $4 mpo $1 ; input _dum _dum _dum county tract block ; select (county); when ('29019') mpo='1'; when('29003','29021','20043') mpo='7'; when ('29051') mpo='3'; *<----More here? Jeff City--; otherwise mpo='5'; *,----marc--; end; if not (county=:'29') then do; *--we have blocks in the St Joe MPO from Ks--; delete; *<==================================for now===========================; *if county ne lag(county) then output nonmocos; *return; end; tract=substr(tract,1,4)||'.'||substr(tract,5,2); output &pgm; drop _dum ; run; proc sort data=&pgm; by county tract block; run; ===========================End commented out================================ */ data corrlst.&pgm(label='MO block to MPO as of July 2003'); merge corrlst.mobl2mpo(in=inold drop=pop100) &pgm(in=innew) sf12000x.moblks(keep=county tract block totpop in=in2); by county tract block; rename totpop=pop100; if inold or innew; *<----only keep blocks that are within an MPO------------------; run; proc freq data=corrlst.&pgm (keep=county mpo); table county*mpo /list; format county $mocnty. mpo $mponame.; title2 'County by MPO Freq Count (# of blocks)'; title3 'Not All Blocks Assigned -- Only Those Within MPOs'; run; proc print data=corrlst.&pgm(obs=40); by county; title2 "corrlst.&pgm"; run;