x cd /pub/data/stf901x2/Tools; %let pgm=blks00_bgs00_trs00; filename pgm "&pgm..sas"; *--We read the full 1990 stf901.moblks00, motrs00 and mobgs00 (aggregated/allocated to 2000 census geography) sets and create the corresponding standard extracts for use primarily for our dp1_2kt trend reports. We also use the totpop data in these sets as the source for our TotPop90 fields in the sf12000x extracts for these geographic entities (tracts, bgs and blocks in Missouri.) Adapted from a setup by Shiva Kumar, by J. Blodtett, 8-13-01 And rerun 12.17.01 to fix Asian1. ---; %libname(stf901); libname stf901x2 '/pub/data/stf901x2'; title 'blk00_trs00_bgs00: Create 1990 STF1 Std Extract Sets (stf901x2) for Missouri at 2000 Geographic Units'; /*<=========================Comment out===================================== *----Create stf901x2.moblks00--; data stf901x2.moblks00(label='MO State Blocks as Defined in 2000'); length esriid $16 default=4; set stf901.moblks00; ; *--the following select group assigns the variable geocode based on values of slvl. note that it is critical that this code be consistent with that used in stf801x conversion so that we can match the data sets on geocode and slvl.; retain sumlev '101'; esriid=compress(geocode,'-.'); keep esriid ; keep county tract bg block geocode geo_id cousubfp -- nagg; format county $mocnty.; %include sascode(stf901x2); *<---the basic transformation takes place here-------------; run; proc sort; by geocode; run; ===========================End commented out================================ */ *----Create stf901x2.motrs00--; data stf901x2.motrs00(label='MO State Tracts as Defined in 2000'); length esriid $16 AreaName $18 default=4; set stf901.motrs00; ; *--the following select group assigns the variable geocode based on values of slvl. note that it is critical that this code be consistent with that used in stf801x conversion so that we can match the data sets on geocode and slvl.; retain sumlev '140'; format county $mocnty.; esriid=compress(geocode,'-.'); Areaname='2000 Tract '||tract; keep esriid ; keep county tract geocode areaname geo_id cousubfp -- areasqmi; %include sascode(stf901x2); *<---the basic transformation takes place here-------------; run; proc sort; by geocode; run; *----Create stf901x2.mobgs00--; data stf901x2.mobgs00(label='MO State Blocks as Defined in 2000'); length esriid $16 AreaName $18 default=4; set stf901.mobgs00; ; *--the following select group assigns the variable geocode based on values of slvl. note that it is critical that this code be consistent with that used in stf801x conversion so that we can match the data sets on geocode and slvl.; retain sumlev '150'; areaname= '2000 BG '||tract||'-'||bg; esriid=compress(geocode,'-.'); keep esriid areaname ; keep county tract bg geocode geo_id cousubfp -- areasqmi; format county $mocnty.; %include sascode(stf901x2); *<---the basic transformation takes place here-------------; run; proc sort; by geocode; run; *---Create indices on geo_id for the 3 data sets--; proc datasets library = stf901x2; modify moblks00; index create geo_id /unique; index create county; modify motrs00; index create geo_id /unique; index create county; modify mobgs00; index create geo_id /unique; index create county; quit; options pageno=1 nodate ls=132 ps=60; proc means data=stf901x2.motrs00 sum maxdec=0; title2 'Means on the stf901x2.motrs00 Set'; run; *proc means data=stf901x2.mobgs00 n sum mean maxdec=1; * title2 'Means on the stf901x2.mobgs00 Set'; * run;