1 The SAS System 08:13 Friday, October 19, 2001 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to UNIVERSITY OF MISSOURI AT COLUMBIA-CAMPUSWIDE-T/R, Site 0001242001. NOTE: This session is executing on the AIX 4.3 platform. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.13 seconds cpu time 0.04 seconds NOTE: AUTOEXEC processing beginning; file is /home/john/autoexec.sas. v8= 1 ***** ****** MSCDC autoexec rev for V8 01-21-2000 - begin execution ******* Standard filerefs and librefs assigned ***** NOTE: Libref PL942000 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/pl942000 NOTE: Libref PL9490TX was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/pl9490/pl9490tx NOTE: Library POPESTS does not exist. NOTE: Libref STF903X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/stf903x ****Finished with generic autoexec **** *** ****Excuting my private autoexec.sas file, rev. 12May2001 WARNING: Libname LIBRARY is not assigned. NOTE: Libname LIBRARY refers to the same physical library as SASCTLGS. NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V8 Physical Name: /pub/sasctlgs WARNING: No logical assign for filename RLINK. ***** dmsflag= NODMS dmchk execution begins *** **Begin execution on Friday 19OCT01 at 08:13 PID=38124 NOTE: Libref SF1 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000 NOTE: Libref SF1X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000x NOTE: Libref INDCTRS was successfully assigned as follows: 2 The SAS System 08:13 Friday, October 19, 2001 Engine: V8 Physical Name: /pub/data/indctrs NOTE: AUTOEXEC processing completed. 1 x cd /pub/data/pl942000/Tools 1 ! ; %let pgm=pl94trend_aggmosums; filename pgm "&pgm..sas"; 2 *---Create various new summary data sets from the pl942000.mosums data set for geographic areas not 3 explicitly summarized on the data set. For use as input to the pl94_trend reports, among other things. 4 Modeled after the pl9490/Tools/pl94trend_aggmoblks00.sas setup which creates many of these using 1990 5 comparable data. 6 Creates pl942000 data sets: 7 motaz, moschls (combined elementary and unified districts) -- aggregated from block summaries. 8 Also creates: 9 mostcnty, mocds106, mosenate, mohouse, (just subsets of pl942000.mosums) 10 momsas00, morpcs, umextrgn, moczs90, moregns (aggregates of pl94200.mostcnty). 11 12 13 John Blodgett, OSEDA, U. of Missouri Outreach & Extension 14 jgb, 3-19-01. 15 ---*; 16 %libname(pl942000,opts=); NOTE: Libref PL942000 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/pl942000 17 libname user '/tmp/scratch/user'; NOTE: Libref USER was successfully assigned as follows: Engine: V8 Physical Name: /tmp/scratch/user 18 libname georef server=oseda.demoserv sapw=XXXXXX; NOTE: Libref GEOREF was successfully assigned as follows: Engine: REMOTE Physical Name: /mscdc/data/georef 19 20 %macro prnt50(set); 21 proc print data=pl942000.&set(obs=50); 22 by sumlev; 23 id geocode areaname; var totpop hisppop black1 black2 asian1 asian2 areasqmi intptlon intptlat; 24 title2 "Partial Listing of Selected Vars from pl942000.&set"; 25 run; 26 %mend prnt50; 27 28 /*<=========================Comment out===================================== 29 data aggin; 30 length sumlev $3 geocode $16; 31 set pl942000.mosums; 32 where sumlev='750'; 33 keep sumlev geocode _numeric_; 34 if sdelm ne ' ' then do; 35 sumlev='sde'; geocode=sdelm; output; 36 end; 37 if sduni ne ' ' then do; 38 sumlev='sdu'; geocode=sduni; output; 39 end; 40 if taz not in (' ','999999') then do; 41 sumlev='taz'; geocode=county||'-'||right(taz); output; 3 The SAS System 08:13 Friday, October 19, 2001 42 end; 43 run; 44 proc sort; by sumlev geocode; run; 45 %agg(aggin=aggin,aggout=aggout,aggby=sumlev geocode,aggvars=totpop--mrovr18 landsqmi areasqmi intptlon intptlat, 46 means=intptlon intptlat,mweights=totpop,agglvl=1,dropvars=_lvl_ _nag_) 47 run; 48 49 50 data pl942000.moschls(label='pl94 extract by 2000 Missouri school districts') 51 pl942000.motaz(label='1990 pl94 extract by Tran Analysis Zones' drop=desedist) 52 ; 53 length sumlevl $3 areaname $40 geocode $16 desedist $6 cnty $3; 54 set aggout; 55 select (sumlev); 56 when('sde','sdu') do; 57 areaname=put(geocode,$school.); desedist=put(geocode,$schcnvt.); *--add dese codes and the dist name-; 58 output pl942000.moschls; 59 end; 60 61 when('taz') do; 62 cnty=substr(geocode,3,3); _cntynam=put(cnty,$mocnty.); _taz=substr(geocode,7,6); drop _cntynam _taz; 63 areaname='Transp. Zone '||trim(left(_taz))||' in ' ||trim(_cntynam)|| ' county'; 64 output pl942000.motaz; 65 end; 66 67 otherwise do; 68 put /'***Unexpected value for sumlev code: ' sumlev= geocode= / _all_; 69 delete; 70 end; 71 end; *--select--; 72 format intptlon intptlat 10.6; 73 run; 74 75 proc sort data=pl942000.moschls; by desedist areaname; 76 run; 77 78 proc print data=pl942000.moschls(obs=50); 79 id sumlev desedist areaname; 80 var geocode totpop hisppop black1 black2 asian1 asian2 areasqmi intptlon intptlat; 81 title2 "Partial Listing of Selected Vars from pl942000.moschls"; 82 run; 83 %prnt50(motaz); 84 85 proc format; 86 value $umx2nam 87 'SE'='Southeast ' 88 'EC'='East Central ' 89 'NE'='Northeast ' 90 'NW'='Northwest ' 91 'SC'='South Central' 92 'SW'='Southwest ' 93 'WC'='West Central ' 94 'CE'='Central ' 95 ; 96 run; 97 4 The SAS System 08:13 Friday, October 19, 2001 98 %let keepvars=sumlev state geocode areaname _numeric_; 99 *--now create the pl942000.mostcnty data set and aggregate it to a series of codes based on country groups-; 100 data pl942000.mostcnty(label='Missouri State and County level summaries' keep=county msacmsa &keepvars) 101 pl942000.mocds106(label='Missouri 106th Congressional District summaries' keep=cd106 &keepvars) 102 pl942000.mosenate(label='Missouri state senate summaries' keep=sldu &keepvars) 103 pl942000.mohouse (label='Missouri state house of rep. summaries' keep=sldl &keepvars); 104 length sumlev $3 geocode $6 areaname $40; 105 retain state "29"; 106 set pl942000.mosums(where=(sumlev in ('050','040','500','610','620'))); 107 select (sumlev); 108 when ('040','050') output pl942000.mostcnty; 109 when ('500') output pl942000.mocds106; 110 when ('610') output pl942000.mosenate; 111 when ('620') output pl942000.mohouse; 112 otherwise return; 113 end; 114 run; 115 ===========================End commented out================================ */ 116 117 *---attach country-group codes rpc, umxw and cz90 from set stored on oseda server. Generate another aggin set-; 118 *---Adding region code, moregns data set -- these are DED economic regions--; 119 data agginc; 120 length geocode $16; 121 merge pl942000.mostcnty(in=indata where=(sumlev='050')) 122 georef.mocogeos(in=inclist keep=county rpc umx2 cz90); 123 by county; 124 if not (indata and inclist) then do; 125 put county= areaname= indata= inclist= ; 126 delete; 127 end; 128 if msacmsa ne ' ' then do; 129 sumlev='310'; geocode=state||'-'||msacmsa; areaname=put(msacmsa,$metro.); 130 output; 131 end; 132 sumlev='rpc'; geocode=rpc; 133 areaname=substr(put(geocode,$rpcname.),4); 134 %mixcase(areaname); 135 output; 136 137 sumlev='umx'; geocode=umx2; areaname=put(umx2,$umxname.); 138 output; 139 140 sumlev='cz '; geocode=cz90; areaname=put(cz90,$cz90nam.); 141 areaname=tranwrd(areaname,' ,',', '); 142 output; 143 sumlev='reg'; geocode=put(county,$mocorgn3.); areaname=put(geocode,$region.); 144 length region $3; label region='DED Region'; region=geocode; 145 146 output; 147 run; NOTE: There were 115 observations read from the data set PL942000.MOSTCNTY. WHERE sumlev='050'; NOTE: There were 115 observations read from the data set GEOREF.MOCOGEOS. NOTE: The data set USER.AGGINC has 575 observations and 53 variables. NOTE: DATA statement used: 5 The SAS System 08:13 Friday, October 19, 2001 real time 1.92 seconds cpu time 0.06 seconds 148 proc sort; by sumlev geocode; 149 %agg(aggin=agginc,aggout=aggoutc,aggby=sumlev geocode,idvars=areaname msacmsa rpc umx2 cz90 region, 150 aggvars=totpop--mrovr18 landsqmi areasqmi intptlon intptlat, 151 means=intptlon intptlat,mweights=totpop,agglvl=1,dropvars=_lvl_ _nag_) *************************************************************** * AGG MACRO REV 14May99 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** ***DATA STEP WILL BE USED TO COUNT NUMBER OF AGGVARS*** NOTE: There were 575 observations read from the data set USER.AGGINC. NOTE: The data set USER.AGGINC has 575 observations and 53 variables. NOTE: PROCEDURE SORT used: real time 0.36 seconds cpu time 0.07 seconds NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 151:30 NAGGVARS=38 NOTE: There were 1 observations read from the data set USER.AGGINC. NOTE: DATA statement used: real time 0.00 seconds cpu time 0.01 seconds **VALUE FOR NAGGVARS DETERMINED BY DATA STEP IS 38 152 run; NOTE: There were 575 observations read from the data set USER.AGGINC. NOTE: The data set USER.AGGOUTC has 76 observations and 46 variables. NOTE: DATA statement used: real time 0.14 seconds cpu time 0.06 seconds 153 154 %let keepvars=sumlev state geocode areaname _numeric_; 155 data pl942000.momsas00(label='Missouri MSA''s as of 2000' keep=msacmsa &keepvars) 156 pl942000.morpcs (label='Missouri Regional Planning Commission summaries' keep=rpc &keepvars) 157 pl942000.umextrgn(label='U of Missouri Extension Region Summaries' umx2 &keepvars) 158 pl942000.mocz90 (label='Mo 1990 Commuting Zone summaries (2000 data for 90 geog)' keep=cz90 &keepvars) 159 pl942000.moregns (label='Mo DED Regions' keep=region &keepvars); 160 length sumlev $3 geocode $16 areaname $40; 161 retain state "29"; 162 set aggoutc; 163 select (sumlev); 164 when ('310') output pl942000.momsas00; 165 when ('rpc') output pl942000.morpcs; 6 The SAS System 08:13 Friday, October 19, 2001 166 when ('umx') output pl942000.umextrgn; 167 when ('cz ') output pl942000.mocz90; 168 when ('reg') output pl942000.moregns; 169 otherwise return; 170 end; 171 format intptlon intptlat 10.6; 172 run; NOTE: There were 76 observations read from the data set USER.AGGOUTC. NOTE: The data set PL942000.MOMSAS00 has 7 observations and 43 variables. NOTE: The data set PL942000.MORPCS has 19 observations and 43 variables. NOTE: The data set PL942000.UMEXTRGN has 8 observations and 47 variables. NOTE: The data set PL942000.MOCZ90 has 29 observations and 43 variables. NOTE: The data set PL942000.MOREGNS has 13 observations and 43 variables. NOTE: DATA statement used: real time 0.23 seconds cpu time 0.02 seconds 173 174 %include sascode(notify); **** pl94trend_aggmosums (38124) has completed Friday 19OCT01 08:13 syserr=0 ***** NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 3.31 seconds cpu time 0.36 seconds