1 The SAS System 17:20 Wednesday, October 30, 2002 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.12 seconds cpu time 0.05 seconds NOTE: AUTOEXEC processing beginning; file is /home/john/autoexec.sas. v8= 1 ***** ****** Standard OSEDA/MCDC autoexec (autoexec8.sas in sascode) rev. 07JUN02 - Begin execution ******* Standard filerefs and librefs assigned ***** NOTE: Libref SF12000 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000 NOTE: Libref SF1 was successfully assigned as follows: Levels: 1 Engine(1): V8 Physical Name(1): /pub/data/sf12000 NOTE: Libref SF12000X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000x NOTE: Libref SF1X was successfully assigned as follows: Levels: 1 Engine(1): V8 Physical Name(1): /pub/data/sf12000x NOTE: Libref SF3PROF was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf3prof NOTE: Libref SF32000 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf32000 NOTE: Libref SF3 was successfully assigned as follows: Levels: 1 Engine(1): V8 Physical Name(1): /pub/data/sf32000 NOTE: Libref SF32000X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf32000x NOTE: Libref SF3X was successfully assigned as follows: Levels: 1 Engine(1): V8 Physical Name(1): /pub/data/sf32000x 2 The SAS System 17:20 Wednesday, October 30, 2002 NOTE: Libref INDCTRS was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/indctrs NOTE: Libref POPESTS was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/popests NOTE: Libref STF903X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/stf903x NOTE: Libref STF903X2 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/stf903x2 ****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 Wednesday 30OCT02 at 17:20 PID=30398 NOTE: Libname SF1 refers to the same physical library as SF12000. NOTE: Libref SF1 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000 NOTE: Libname SF1X refers to the same physical library as SF12000X. NOTE: Libref SF1X was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf12000x NOTE: Libref INDCTRS was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/indctrs NOTE: Libref SF3TEMP was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf32000/temp NOTE: Library SF3XTEMP does not exist. NOTE: AUTOEXEC processing completed. 1 x cd /pub/data/sf32000/Tools 1 ! ; %let pgm=aggsf3_MIslds; filename pgm "&pgm..sas"; 2 /*----------------------------------------------------------------------------------------------------------------- 3 This code aggregates sf32000 data to Michigan State Legislative Districts (Senate , House and CD108). 4 Creates the SAS datasets: 5 sf3.misldsph, 6 sf3.misldsphct and 7 sf3.misldsphctr: complete House, Senate and cd108 as well as split-by-county datasets for 8 the 3 sets of tables. These are the "real" datasets created, the rest are views of these. 9 10 sf3.misenateph: Complete Senate districts - P and H tables. 11 sf3.misenatephct: Complete Senate districts - PCT and HCT tables. 3 The SAS System 17:20 Wednesday, October 30, 2002 12 sf3.misenatephctr: Complete Senate districts - PCT and HCT tables. 13 14 sf3.mihouseph: Complete House districts- P and H tables. 15 sf3.mihousephct: Complete House districts- PCT and HCT tables. 16 sf3.mihousephctr: Complete House districts- PCT and HCT tables. 17 18 We also create the misbg2k_sldl02, misbg2k_sldu02 & misbg2k_cd108 correlations lists 19 and the corresponding mistr --Michigan split-tract-- lists 20 in corrlst directory based on 21 the Michigan block to slds correlation list provided by the Mi SDC, 10-02. 22 23 Coded by John Blodgett, OSEDA, U. of Missouri, blodgettj@umsystem.edu 24 Under contract with the Michigan State Data Center 25 26 Revision History: 27 10.30.02: Coding begins. 28 ------------------------------------------------------------------------------------------------------*/ 29 30 libname sf32000 '/pub/data/sf32000'; NOTE: Libname SF32000 refers to the same physical library as SF3. NOTE: Libref SF32000 was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/sf32000 31 libname sf3 (sf32000); NOTE: Libref SF3 was successfully assigned as follows: Levels: 1 Engine(1): V8 Physical Name(1): /pub/data/sf32000 31 ! *<--alternate name--; 32 libname mable2k '/pub/data/mable2k' access=readonly; NOTE: Libref MABLE2K was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/mable2k 33 libname corrlst '/pub/data/corrlst'; NOTE: Libref CORRLST was successfully assigned as follows: Engine: V8 Physical Name: /pub/data/corrlst 34 libname user '/tmp/scratch/user'; NOTE: Libref USER was successfully assigned as follows: Engine: V8 Physical Name: /tmp/scratch/user 35 36 options msglevel=i; 37 38 title "&pgm: Aggregate 2000 sf3 Datasets to 2002 Legislative Districts"; 39 title2 'For MICHIGAN'; 40 41 42 *---------------------Part I: Create the 6 Correlation Lists (for split-bg and split-tract for cd108, sldl02 and 42 ! sldu02)----------*; 43 44 %let sbg_geos_mable=county cousubfp placefp tract ur bg; *<---geocodes comprising the "split block group" -SumLev 44 ! 090-; 45 *---We have 2 versions of the sbg_geos list because we called the urban-rural var on mable2k ur and called it urbanrur on 45 ! the sfs; 46 %let sbg_geos=county cousubfp placefp tract urbanrur bg; *<---geocodes comprising the "split block group" -SumLev 4 The SAS System 17:20 Wednesday, October 30, 2002 46 ! 090-; 47 %let str_geos=county cousubfp placefp tract urbanrur; *<---geocodes comprising the "split tract" -SumLev 085-; 48 49 *---Merge the correlation list provided by the Michigan SDC with additional geocodes from the mable2k database---; 50 data miblocks; 51 merge corrlst.mibl2slds02(in=in1 rename=(sldl=sldl02 sldu=sldu02)) 52 mable2k.miv(keep=&sbg_geos_mable block pop2k rename=(ur=urbanrur) in=in2 ) ; 53 by county tract block; 54 format tract ; 55 if not (in1 and in2) then do; 56 if not in1 and pop2k=0 then delete; 57 put '***Block missing from one of the sets**** ' in1= in2= county= tract= block=; 58 _nbad+1; drop _nbad; if _nbad gt 10 then abort abend; 59 delete; 60 end; 61 run; ***Block missing from one of the sets**** in1=1 in2=0 County=26147 tract=6516.00 block=1476 NOTE: View MABLE2K.MIV.VIEW used: real time 4.96 seconds cpu time 2.92 seconds NOTE: There were 258925 observations read from the data set MABLE2K.MIBLKS. NOTE: There were 258925 observations read from the data set MABLE2K.MIBLKS2. NOTE: There were 83 observations read from the data set MABLE2K.MICOCDS1. NOTE: There were 258231 observations read from the data set CORRLST.MIBL2SLDS02. NOTE: There were 258925 observations read from the data set MABLE2K.MIV. NOTE: The data set USER.MIBLOCKS has 258230 observations and 12 variables. NOTE: DATA statement used: real time 5.02 seconds cpu time 2.06 seconds 62 63 %let clist=misbg2k_sldl02; 64 *---create corrlst.&clist--- state House districts 2002; 65 proc sort data=miblocks(keep=&sbg_geos block pop2k sldl02 sldu02 cd108) out=blkcodes; 66 by &sbg_geos sldl02; 67 run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.MIBLOCKS. NOTE: The data set USER.BLKCODES has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.79 seconds cpu time 1.63 seconds 68 *--We use the corrwt utility macro to create the correlation list by collapsing--; 69 %corrwt(setin=blkcodes,setout=corrlst.&clist, 70 geocds1=&sbg_geos, 71 geocds2=sldl02, 72 weight=pop2k, 73 keepwt=1); *************************************************************** 5 The SAS System 17:20 Wednesday, October 30, 2002 * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER._TOTALS has 13548 observations and 7 variables. NOTE: DATA statement used: real time 0.66 seconds cpu time 0.64 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: There were 13548 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISBG2K_SLDL02 has 13730 observations and 9 variables. NOTE: DATA statement used: real time 0.71 seconds cpu time 0.67 seconds 74 proc print data=corrlst.&clist(obs=50); 75 title3 "Sample Obs from corrlst.&clist"; 76 by county; 77 run; NOTE: There were 50 observations read from the data set CORRLST.MISBG2K_SLDL02. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used: real time 0.01 seconds cpu time 0.01 seconds 78 79 %let clist=misbg2k_sldu02; 80 *---create corrlst.&clist--- Senate districts 2002; 81 proc sort data=blkcodes out=blkcodesU; 82 by &sbg_geos sldu02; 83 run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER.BLKCODESU has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.62 seconds cpu time 1.49 seconds 84 85 *--We use the corrwt utility macro to create the correlation list by collapsing--; 86 %corrwt(setin=blkcodesU,setout=corrlst.&clist, 87 geocds1=&sbg_geos, 88 geocds2=sldu02, 89 weight=pop2k, 90 keepwt=1); 6 The SAS System 17:20 Wednesday, October 30, 2002 *************************************************************** * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** NOTE: There were 258230 observations read from the data set USER.BLKCODESU. NOTE: The data set USER._TOTALS has 13548 observations and 7 variables. NOTE: DATA statement used: real time 0.67 seconds cpu time 0.64 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODESU. NOTE: There were 13548 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISBG2K_SLDU02 has 13628 observations and 9 variables. NOTE: DATA statement used: real time 0.69 seconds cpu time 0.68 seconds 91 proc print data=corrlst.&clist(obs=50); 92 title3 "Sample Obs from corrlst.&clist"; 93 by county; 94 run; NOTE: There were 50 observations read from the data set CORRLST.MISBG2K_SLDU02. NOTE: The PROCEDURE PRINT printed pages 3-4. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.00 seconds 95 96 %let clist=misbg2k_cd108; 97 *---create corrlst.&clist--- 108th congressional districts; 98 proc sort data=blkcodes out=blkcodesC; 99 by &sbg_geos cd108; 100 run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER.BLKCODESC has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.52 seconds cpu time 1.49 seconds 101 102 *--We use the corrwt utility macro to create the correlation list by collapsing--; 103 %corrwt(setin=blkcodesC,setout=corrlst.&clist, 104 geocds1=&sbg_geos, 105 geocds2=cd108, 106 weight=pop2k, 107 keepwt=1); 7 The SAS System 17:20 Wednesday, October 30, 2002 *************************************************************** * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** NOTE: There were 258230 observations read from the data set USER.BLKCODESC. NOTE: The data set USER._TOTALS has 13548 observations and 7 variables. NOTE: DATA statement used: real time 0.68 seconds cpu time 0.63 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODESC. NOTE: There were 13548 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISBG2K_CD108 has 13607 observations and 9 variables. NOTE: DATA statement used: real time 0.69 seconds cpu time 0.69 seconds 108 proc print data=corrlst.&clist(obs=50); 109 title3 "Sample Obs from corrlst.&clist"; 110 by county; 111 run; NOTE: There were 50 observations read from the data set CORRLST.MISBG2K_CD108. NOTE: The PROCEDURE PRINT printed pages 5-6. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.00 seconds 112 113 *--------and now create the corresponding split-tract correlation lists needed to work with the "ct" tables that 114 do not have 090 level summaries but stop at 085 (split census tract)---; 115 proc sort data=blkcodes; by &str_geos sldl02; run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER.BLKCODES has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.64 seconds cpu time 1.51 seconds 116 117 %let clist=mistr2k_sldl02; 118 %corrwt(setin=blkcodes,setout=corrlst.&clist, 119 geocds1=&str_geos, 120 geocds2=sldl02, 121 weight=pop2k, 122 keepwt=1); 8 The SAS System 17:20 Wednesday, October 30, 2002 *************************************************************** * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER._TOTALS has 6289 observations and 6 variables. NOTE: DATA statement used: real time 0.63 seconds cpu time 0.60 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: There were 6289 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISTR2K_SLDL02 has 6434 observations and 8 variables. NOTE: DATA statement used: real time 0.67 seconds cpu time 0.65 seconds 123 proc print data=corrlst.&clist(obs=50); 124 title3 "Sample Obs from corrlst.&clist"; 125 by county; 126 run; NOTE: There were 50 observations read from the data set CORRLST.MISTR2K_SLDL02. NOTE: The PROCEDURE PRINT printed pages 7-8. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.00 seconds 127 128 proc sort data=blkcodesU; by &str_geos sldu02; run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.BLKCODESU. NOTE: The data set USER.BLKCODESU has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.64 seconds cpu time 1.50 seconds 129 130 %let clist=mistr2k_sldu02; 131 %corrwt(setin=blkcodesU,setout=corrlst.&clist, 132 geocds1=&str_geos, 133 geocds2=sldu02, 134 weight=pop2k, 135 keepwt=1); *************************************************************** * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * 9 The SAS System 17:20 Wednesday, October 30, 2002 *************************************************************** NOTE: There were 258230 observations read from the data set USER.BLKCODESU. NOTE: The data set USER._TOTALS has 6289 observations and 6 variables. NOTE: DATA statement used: real time 0.62 seconds cpu time 0.61 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODESU. NOTE: There were 6289 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISTR2K_SLDU02 has 6340 observations and 8 variables. NOTE: DATA statement used: real time 0.65 seconds cpu time 0.66 seconds 136 proc print data=corrlst.&clist(obs=100); 137 title3 "Sample Obs from corrlst.&clist"; 138 by county; 139 run; NOTE: There were 100 observations read from the data set CORRLST.MISTR2K_SLDU02. NOTE: The PROCEDURE PRINT printed pages 9-11. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.01 seconds 140 141 %let clist=mistr2k_cd108; 142 *---create corrlst.&clist--- 108th congressional districts; 143 proc sort data=blkcodes out=blkcodesC; 144 by &str_geos cd108; 145 run; NOTE: SAS sort was used. NOTE: There were 258230 observations read from the data set USER.BLKCODES. NOTE: The data set USER.BLKCODESC has 258230 observations and 11 variables. NOTE: PROCEDURE SORT used: real time 1.55 seconds cpu time 1.50 seconds 146 %corrwt(setin=blkcodesC,setout=corrlst.&clist, 147 geocds1=&str_geos, 148 geocds2=cd108, 149 weight=pop2k, 150 keepwt=1); *************************************************************** * CORRWT MACRO REV 01May96 BEGIN EXECUTION * * MISSOURI STATE CENSUS DATA CENTER * *************************************************************** 10 The SAS System 17:20 Wednesday, October 30, 2002 NOTE: There were 258230 observations read from the data set USER.BLKCODESC. NOTE: The data set USER._TOTALS has 6289 observations and 6 variables. NOTE: DATA statement used: real time 0.76 seconds cpu time 0.61 seconds NOTE: There were 258230 observations read from the data set USER.BLKCODESC. NOTE: There were 6289 observations read from the data set USER._TOTALS. NOTE: The data set CORRLST.MISTR2K_CD108 has 6330 observations and 8 variables. NOTE: DATA statement used: real time 0.65 seconds cpu time 0.65 seconds 151 proc print data=corrlst.&clist(obs=50); 152 title3 "Sample Obs from corrlst.&clist"; 153 by county; 154 run; NOTE: There were 50 observations read from the data set CORRLST.MISTR2K_CD108. NOTE: The PROCEDURE PRINT printed pages 12-13. NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.01 seconds 155 156 *=========================================Part 2=====================================================*; 157 158 *------------- Create the data sets to be aggregated by merging with the corr. lists 159 to attach the legislative district and the afact (allocation factor) var. Then invoke the 160 agg macro to aggregate each of the 3 sets.---------------------------------; 161 162 data temp_ph1; 163 merge sf3.miph(where=(sumlev='090') in=insf3) 164 corrlst.misbg2k_sldl02(in=inclist); INFO: Index SumLev selected for WHERE clause optimization. 165 by &sbg_geos; 166 if inclist; 167 if not insf3 then do; 168 put '**Geography on the corr. list not found on sf3: ' &sbg_geos; 169 delete; 170 end; 171 sldcode=sldl02; SumLev='620'; output; 172 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. NOTE: There were 13698 observations read from the data set SF3.MIPH. WHERE sumlev='090'; NOTE: There were 13730 observations read from the data set CORRLST.MISBG2K_SLDL02. NOTE: The data set USER.TEMP_PH1 has 13730 observations and 5636 variables. 11 The SAS System 17:20 Wednesday, October 30, 2002 NOTE: DATA statement used: real time 1:39.74 cpu time 1:16.16 173 174 data temp_ph2; 175 length sldcode $3; 176 merge sf3.miph(where=(sumlev='090') in=insf3) 177 corrlst.misbg2k_sldu02(in=inclistu); INFO: Index SumLev selected for WHERE clause optimization. 178 by &sbg_geos; 179 if inclistu; 180 if not insf3 then do; 181 put '**Geography on the corr. list not found on sf3: ' &sbg_geos; 182 delete; 183 end; 184 sldcode=sldu02; SumLev='610'; output; 185 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. NOTE: There were 13698 observations read from the data set SF3.MIPH. WHERE sumlev='090'; NOTE: There were 13628 observations read from the data set CORRLST.MISBG2K_SLDU02. NOTE: The data set USER.TEMP_PH2 has 13628 observations and 5636 variables. NOTE: DATA statement used: real time 1:36.49 cpu time 1:15.33 186 187 proc datasets library=user; -----Directory----- Libref: USER Engine: V8 Physical Name: /tmp/scratch/user File Name: /tmp/scratch/user Inode Number: 6144 Access Permission: rwxrwx--- Owner Name: john File Size (bytes): 17920 # Name Memtype File Size Last Modified ------------------------------------------------------- 1 BLKCODES DATA 12533760 30OCT2002:17:21:12 2 BLKCODESC DATA 12533760 30OCT2002:17:21:18 3 BLKCODESU DATA 12533760 30OCT2002:17:21:15 4 ILBGS VIEW 1171456 29OCT2002:13:41:55 5 ILPLACES VIEW 1171456 29OCT2002:13:41:55 6 ILSTCNTY DATA 2275328 29OCT2002:13:41:52 7 ILTRACTS VIEW 1171456 29OCT2002:13:41:55 8 KSBGS VIEW 1171456 29OCT2002:13:41:54 9 KSPLACES VIEW 1171456 29OCT2002:13:41:53 12 The SAS System 17:20 Wednesday, October 30, 2002 # Name Memtype File Size Last Modified ------------------------------------------------------- 10 KSSTCNTY DATA 2275328 29OCT2002:13:41:52 11 KSTRACTS VIEW 1171456 29OCT2002:13:41:54 12 MIBLOCKS DATA 12533760 30OCT2002:17:21:01 13 MOBGS VIEW 1171456 29OCT2002:13:41:53 14 MOPLACES VIEW 1171456 29OCT2002:13:41:52 15 MOSTCNTY DATA 11763712 29OCT2002:13:41:52 16 MOTRACTS VIEW 1171456 29OCT2002:13:41:53 17 TEMP_PH1 DATA 394362880 30OCT2002:17:22:59 18 TEMP_PH2 DATA 391438336 30OCT2002:17:24:36 19 _TOTALS DATA 212992 30OCT2002:17:21:19 188 modify temp_ph1; 189 index delete ph; WARNING: No key variables have been defined for file TEMP_PH1. WARNING: No index named ph. 190 index create ph=(Sumlev sldcode county); NOTE: Composite index ph has been defined. 191 modify temp_ph2; 192 index delete ph; WARNING: No key variables have been defined for file TEMP_PH2. WARNING: No index named ph. 193 index create ph=(Sumlev sldcode county); NOTE: Composite index ph has been defined. 194 quit; NOTE: PROCEDURE DATASETS used: real time 35.10 seconds cpu time 5.24 seconds 195 196 data temp_ph3; *<--new for Michigan processing. cd108 aggregation--; 197 length sldcode $3; 198 merge sf3.miph(where=(sumlev='090') in=insf3) 199 corrlst.misbg2k_cd108(in=inclistu); INFO: Index SumLev selected for WHERE clause optimization. 200 by &sbg_geos; 201 if inclistu; 202 if not insf3 then do; 203 put '**Geography on the corr. list not found on sf3: ' &sbg_geos; 204 delete; 205 end; 206 sldcode=cd108; SumLev='500'; output; 207 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. INFO: The variable cd108 on data set SF3.MIPH will be overwritten by data set CORRLST.MISBG2K_CD108. NOTE: There were 13698 observations read from the data set SF3.MIPH. WHERE sumlev='090'; NOTE: There were 13607 observations read from the data set CORRLST.MISBG2K_CD108. NOTE: The data set USER.TEMP_PH3 has 13607 observations and 5635 variables. NOTE: DATA statement used: real time 1:39.36 cpu time 1:16.04 13 The SAS System 17:20 Wednesday, October 30, 2002 208 209 proc datasets library=user; -----Directory----- Libref: USER Engine: V8 Physical Name: /tmp/scratch/user File Name: /tmp/scratch/user Inode Number: 6144 Access Permission: rwxrwx--- Owner Name: john File Size (bytes): 17920 # Name Memtype File Size Last Modified ------------------------------------------------------- 1 BLKCODES DATA 12533760 30OCT2002:17:21:12 2 BLKCODESC DATA 12533760 30OCT2002:17:21:18 3 BLKCODESU DATA 12533760 30OCT2002:17:21:15 4 ILBGS VIEW 1171456 29OCT2002:13:41:55 5 ILPLACES VIEW 1171456 29OCT2002:13:41:55 6 ILSTCNTY DATA 2275328 29OCT2002:13:41:52 7 ILTRACTS VIEW 1171456 29OCT2002:13:41:55 8 KSBGS VIEW 1171456 29OCT2002:13:41:54 9 KSPLACES VIEW 1171456 29OCT2002:13:41:53 10 KSSTCNTY DATA 2275328 29OCT2002:13:41:52 11 KSTRACTS VIEW 1171456 29OCT2002:13:41:54 12 MIBLOCKS DATA 12533760 30OCT2002:17:21:01 13 MOBGS VIEW 1171456 29OCT2002:13:41:53 14 MOPLACES VIEW 1171456 29OCT2002:13:41:52 15 MOSTCNTY DATA 11763712 29OCT2002:13:41:52 16 MOTRACTS VIEW 1171456 29OCT2002:13:41:53 17 TEMP_PH1 DATA 394420224 30OCT2002:17:24:54 TEMP_PH1 INDEX 147456 30OCT2002:17:24:54 18 TEMP_PH2 DATA 391495680 30OCT2002:17:25:11 TEMP_PH2 INDEX 147456 30OCT2002:17:25:11 19 TEMP_PH3 DATA 390864896 30OCT2002:17:26:51 20 _TOTALS DATA 212992 30OCT2002:17:21:19 210 modify temp_ph1; 211 index delete ph; NOTE: All indexes defined on USER.TEMP_PH1.DATA have been deleted. 212 index create ph=(Sumlev sldcode county); NOTE: Composite index ph has been defined. 213 modify temp_ph2; 214 index delete ph; NOTE: All indexes defined on USER.TEMP_PH2.DATA have been deleted. 215 index create ph=(Sumlev sldcode county); NOTE: Composite index ph has been defined. 216 modify temp_ph3; 217 index delete ph; WARNING: No key variables have been defined for file TEMP_PH3. WARNING: No index named ph. 218 index create ph=(Sumlev sldcode county); NOTE: Composite index ph has been defined. 14 The SAS System 17:20 Wednesday, October 30, 2002 219 quit; NOTE: PROCEDURE DATASETS used: real time 54.66 seconds cpu time 8.19 seconds 220 221 222 *----We replace the pre step (generated by the aggsf3 macro) with our own here. Then we use the steps parm to tell 223 aggsf3 to skip the prestep. Of course this only works if we create something called aggin&settype. ----*; 224 225 *----------------------------------(1 of 3): Aggregate the ph dataset--------------------------------------------*; 226 227 data agginph/view=agginph; set temp_ph3 temp_ph2 temp_ph1 ; by SumLev sldcode county; 228 229 *--this code allows us to skip the pre step generated by the aggsf3 macro--; 230 if H4i1 then H3i2=100*(H2i2/H4i1); *--100% count of occ units is occ units sampled divided by pct occ units sampled-; 231 if H4i2 then H3i3=100*(H2i3/H4i2); *--100% count of vac units is vac units sampled divided by pct vac units 231 ! sampled-; 232 label H3i2='100% Count of Occupied hus (derived)' H3i3='100% Count of Vacant units (derived)'; 233 keep SumLev sldcode county _numeric_; *<----specify id vars and then keep all the table cells with _numeric_; 234 drop PCT; 235 run; NOTE: DATA STEP view saved on file USER.AGGINPH. NOTE: A stored DATA STEP view cannot run under a different operating system. NOTE: DATA statement used: real time 0.51 seconds cpu time 0.20 seconds 235 ! *--the indices should be used to allow this sorted concatenation--; 236 237 %macro preexit; %*--macro invoked by aggsf3--; 238 %mend preexit; 239 240 *---We need to define our custom code for the post step using an "exit macro" prior to invoking aggsf3---; 241 242 *<=============This macro needs to be define and accessed for EACH OF THE 3 AGG steps that follow. So if commenting 243 out earlier steps, make sure NOT TO COMMENT OUT THIS CODE============================================; 244 245 %macro postexit; %*--invoked during post-aggregation processing--; 246 by sldcode notsorted _lvl_ notsorted; 247 248 select(sumlev); 249 when('610') do; 250 areaname='State Senate District '||sldcode; 251 sldu02=sldcode; 252 end; 253 when('620') do; 254 areaname='State House District '||sldcode; 255 sldl02=sldcode; 256 end; 257 when('500') do; 258 areaname='Congressional District '||sldcode; 15 The SAS System 17:20 Wednesday, October 30, 2002 259 cd108=sldcode; 260 end; 261 end; *--select--; 262 263 if _lvl_=1 then do; 264 *--this is a district within county summary--; 265 substr(sumlev,3,1)='c'; *<---We make up the codes, 61c and 62c for Senate/county and House/county, resp. --; 266 if sumlev='50c' then sumlev='510'; *--cd within county has a recognized sumlev code so we override--; 267 geocode=trim(sldcode)||'-'||county; 268 cnty=substr(county,3,3); 269 if not (first._lvl_ and last._lvl_) then do; 270 partflag='y'; 271 areaname=trim(areaname)||'/'||put(cnty,$mocnty.); 272 end; 273 else partflag='n'; 274 end; 275 else do; 276 *--this is a complete district (_lvl_=2) summary--; 277 geocode=sldcode; county=' '; 278 end; 279 drop _lvl_ _nag_; 280 label sldcode='Legislative District Code' 281 partflag='District Spans Counties?'; 282 format intptlon 11.6 intptlat 10.6; 283 284 %mend postexit; 285 286 %aggsf3(settypes=ph, setinlib=user, setin=temp, setoutlib=sf3, 287 setout=mislds, 288 templib=user, 289 aggby=sumlev sldcode county, 290 idlens=%str(SumLev $3 geocode $9 sldcode $3 county $5 cd108 $2 sldl02 sldu02 $3 AreaName $40 cnty $3 partflag 290 ! $1), 291 agglvl=2, 292 steps=agg post, 293 afact=afact, 294 report=0) *** aggsf3 macro, revised 30Sep02 , Begin execution with: setin:temp setout:mislds settypes:ph aggby:sumlev sldcode county ***Begin processing of set type PH *** *************************************************************** * AGG Macro Rev. 28Oct02 Begin Execution * * Missouri Census Data Center * *************************************************************** *****PARAMETERS SPECIFIED***** (NAMES IN PARENTHESES ARE ALIASES) SETIN(AGGIN)= agginph (INPUT DATA SET) SETOUT(AGGOUT)= aggoutph (OUTPUT DATA SET) AGGBY(BYVARS)= sumlev sldcode county (AGGREGATION BY VARIABLES) 16 The SAS System 17:20 Wednesday, October 30, 2002 AGGLVL(AGGLVLS)= 2 (NUMBER OF LEVELS OF AGGREGATION) AGGVARS(VARS)= POP100 HU100 INTPTLAT INTPTLON LANDSQMI AREASQMI P1I1 -- H121I7 (VARIABLES ON SETIN TO AGGREGATE) NUMS= (NUMERATOR VARIABLES) DENOMS(DENS)= (LIST OF DENOMINATORS) MEANS(MEDIANS)= IntPtLat IntPtLon P4i1 P82i1 P157ai1 p157bi1 p157ci1 p157di1 p157ei1 p157fi1 p157gi1 p157hi1 p157Ii1 H4i1 H4i2 H18i1-H18i3 H82i1 (MEAN/MEDIAN VARS TO BE AGGREGATED) MWEIGHTS= Landsqmi Landsqmi P3i1 P1i1 P6i2-P6i8 P7i10 P7i3 H3i2 H3i3 H7i1-H7i3 H32i11 (LIST OF WEIGHT VARIABLES FOR MEANS) SLCTEDIT(FILTER)= (SELECT/EDIT USER-EXIT MACRO NAME) IDVARS(IDS)= (ID VARIABLES TO KEEP ON AGGOUT) GRAND= 0 (GRAND TOTALS OPTION) FACVAR= afact (NAME OF VARIABLE USED TO FACTOR DATA) FILLBY= (FILLER CHARACTER FOR AGGBY VARIABLES) NODUPS= 0 (OPTION TO OMIT REDUNDANT HIGHER LEVEL SUMS) ***END PARM LIST*** ***DATA STEP WILL BE USED TO COUNT NUMBER OF AGGVARS*** NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 294:30 INFO: Index ph selected for BY clause processing. INFO: Index ph selected for BY clause processing. INFO: Index ph selected for BY clause processing. NAGGVARS=5564 NOTE: View USER.AGGINPH.VIEW used: real time 2.04 seconds cpu time 1.27 seconds NOTE: There were 2 observations read from the data set USER.TEMP_PH3. NOTE: There were 1 observations read from the data set USER.TEMP_PH2. NOTE: There were 1 observations read from the data set USER.TEMP_PH1. NOTE: There were 1 observations read from the data set USER.AGGINPH. NOTE: DATA statement used: real time 2.06 seconds cpu time 0.24 seconds **VALUE FOR NAGGVARS DETERMINED BY DATA STEP IS 5564 AGGBY1= county AGGBY2= sldcode AGGBY3= sumlev ****PARM VERIFICATION PHASE COMPLETE**** ****WARNING: VARIABLES APPEARING IN NUMS, DENOMS OR MWEIGHTS LISTS WILL NOT BE AGGREGATED UNLESS THEY ALSO APPEAR IN THE AGGVARS LIST. USE THE DROPVARS PARM TO OMIT THEM FROM THE OUTPUT DATA SET. INFO: Index ph selected for BY clause processing. INFO: Index ph selected for BY clause processing. INFO: Index ph selected for BY clause processing. NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 158 at 294:4 158 at 294:67 158 at 294:4 NOTE: View USER.AGGINPH.VIEW used: real time 5:44.84 cpu time 1:38.25 17 The SAS System 17:20 Wednesday, October 30, 2002 NOTE: There were 13607 observations read from the data set USER.TEMP_PH3. NOTE: There were 13628 observations read from the data set USER.TEMP_PH2. NOTE: There were 13730 observations read from the data set USER.TEMP_PH1. NOTE: There were 40965 observations read from the data set USER.AGGINPH. NOTE: The data set USER.AGGOUTPH has 529 observations and 5572 variables. NOTE: DATA statement used: real time 5:45.11 cpu time 3:54.80 NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 1433 at 294:87 NOTE: There were 529 observations read from the data set USER.AGGOUTPH. NOTE: The data set SF3.MISLDSPH has 529 observations and 5577 variables. NOTE: DATA statement used: real time 3.71 seconds cpu time 2.67 seconds 295 296 run; 297 298 *----------------------------------(2 of 3): Aggregate the phct dataset--------------------------------------------*; 299 data temp_phct1; 300 length sldcode $3; 301 merge sf3.miphct(where=(sumlev='085') in=insf3) 302 corrlst.mistr2k_sldl02(in=inclist); INFO: Index SumLev selected for WHERE clause optimization. 303 by &str_geos; 304 if inclist; 305 if not insf3 then do; 306 put '**Geographcty on the corr. list not found on sf3: ' &str_geos; 307 delete; 308 end; 309 sldcode=sldl02; SumLev='620'; output; 310 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. NOTE: There were 6397 observations read from the data set SF3.MIPHCT. WHERE sumlev='085'; NOTE: There were 6434 observations read from the data set CORRLST.MISTR2K_SLDL02. NOTE: The data set USER.TEMP_PHCT1 has 6434 observations and 4470 variables. NOTE: DATA statement used: real time 48.98 seconds cpu time 32.50 seconds 311 312 data temp_phct2; 313 length sldcode $3; 314 merge sf3.miphct(where=(sumlev='085') in=insf3) 315 corrlst.mistr2k_sldu02(in=inclistU); 18 The SAS System 17:20 Wednesday, October 30, 2002 INFO: Index SumLev selected for WHERE clause optimization. 316 by &str_geos; 317 if inclistU; 318 if not insf3 then do; 319 put '**Geographcty on the corr. list not found on sf3: ' &str_geos; 320 delete; 321 end; 322 sldcode=sldu02; SumLev='610'; output; 323 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. NOTE: There were 6397 observations read from the data set SF3.MIPHCT. WHERE sumlev='085'; NOTE: There were 6340 observations read from the data set CORRLST.MISTR2K_SLDU02. NOTE: The data set USER.TEMP_PHCT2 has 6340 observations and 4470 variables. NOTE: DATA statement used: real time 31.26 seconds cpu time 30.89 seconds 324 325 data temp_phct3; 326 length sldcode $3; 327 merge sf3.miphct(where=(sumlev='085') in=insf3) 328 corrlst.mistr2k_cd108(in=inclistU); INFO: Index SumLev selected for WHERE clause optimization. 329 by &str_geos; 330 if inclistU; 331 if not insf3 then do; 332 put '**Geography on the corr. list not found on sf3: ' &str_geos; 333 delete; 334 end; 335 sldcode=cd108; SumLev='500'; output; 336 run; INFO: Use of index SumLev for WHERE clause optimization cancelled. INFO: Index County selected for BY clause processing. INFO: The variable cd108 on data set SF3.MIPHCT will be overwritten by data set CORRLST.MISTR2K_CD108. NOTE: There were 6397 observations read from the data set SF3.MIPHCT. WHERE sumlev='085'; NOTE: There were 6330 observations read from the data set CORRLST.MISTR2K_CD108. NOTE: The data set USER.TEMP_PHCT3 has 6330 observations and 4469 variables. NOTE: DATA statement used: real time 31.05 seconds cpu time 30.61 seconds 337 338 proc datasets library=user; -----Directory----- Libref: USER Engine: V8 Physical Name: /tmp/scratch/user File Name: /tmp/scratch/user 19 The SAS System 17:20 Wednesday, October 30, 2002 -----Directory----- Inode Number: 6144 Access Permission: rwxrwx--- Owner Name: john File Size (bytes): 17920 # Name Memtype File Size Last Modified -------------------------------------------------------- 1 AGGINPH VIEW 663552 30OCT2002:17:27:46 2 AGGOUTPH DATA 15892480 30OCT2002:17:33:34 3 BLKCODES DATA 12533760 30OCT2002:17:21:12 4 BLKCODESC DATA 12533760 30OCT2002:17:21:18 5 BLKCODESU DATA 12533760 30OCT2002:17:21:15 6 ILBGS VIEW 1171456 29OCT2002:13:41:55 7 ILPLACES VIEW 1171456 29OCT2002:13:41:55 8 ILSTCNTY DATA 2275328 29OCT2002:13:41:52 9 ILTRACTS VIEW 1171456 29OCT2002:13:41:55 10 KSBGS VIEW 1171456 29OCT2002:13:41:54 11 KSPLACES VIEW 1171456 29OCT2002:13:41:53 12 KSSTCNTY DATA 2275328 29OCT2002:13:41:52 13 KSTRACTS VIEW 1171456 29OCT2002:13:41:54 14 MIBLOCKS DATA 12533760 30OCT2002:17:21:01 15 MOBGS VIEW 1171456 29OCT2002:13:41:53 16 MOPLACES VIEW 1171456 29OCT2002:13:41:52 17 MOSTCNTY DATA 11763712 29OCT2002:13:41:52 18 MOTRACTS VIEW 1171456 29OCT2002:13:41:53 19 TEMP_PH1 DATA 394420224 30OCT2002:17:27:11 TEMP_PH1 INDEX 147456 30OCT2002:17:27:11 20 TEMP_PH2 DATA 391495680 30OCT2002:17:27:27 TEMP_PH2 INDEX 147456 30OCT2002:17:27:27 21 TEMP_PH3 DATA 390922240 30OCT2002:17:27:45 TEMP_PH3 INDEX 155648 30OCT2002:17:27:45 22 TEMP_PHCT1 DATA 158670848 30OCT2002:17:34:27 23 TEMP_PHCT2 DATA 156360704 30OCT2002:17:34:58 24 TEMP_PHCT3 DATA 156114944 30OCT2002:17:35:30 25 _TOTALS DATA 212992 30OCT2002:17:21:19 339 modify temp_phct1; 340 index delete phct; WARNING: No key variables have been defined for file TEMP_PHCT1. WARNING: No index named phct. 341 index create phct=(Sumlev sldcode county); NOTE: Composite index phct has been defined. 342 modify temp_phct2; 343 index delete phct; WARNING: No key variables have been defined for file TEMP_PHCT2. WARNING: No index named phct. 344 index create phct=(Sumlev sldcode county); NOTE: Composite index phct has been defined. 345 modify temp_phct3; 346 index delete phct; WARNING: No key variables have been defined for file TEMP_PHCT3. WARNING: No index named phct. 347 index create phct=(Sumlev sldcode county); NOTE: Composite index phct has been defined. 20 The SAS System 17:20 Wednesday, October 30, 2002 348 quit; NOTE: PROCEDURE DATASETS used: real time 8.43 seconds cpu time 1.97 seconds 349 350 *----We replace the pre step (generated by the aggsf3 macro) with our own here. Then we use the steps parm to tell 351 aggsf3 to skip the prestep. Of course this only works if we create something called aggin&settype. ----*; 352 data agginphct/view=agginphct; set temp_phct3 temp_phct2 temp_phct1 ; by SumLev sldcode county; 353 354 *--this code allows us to skip the pre step generated by the aggsf3 macro--; 355 keep SumLev sldcode county _numeric_; *<----specify id vars and then keep all the table cells with _numeric_; 356 drop PCT; 357 run; NOTE: DATA STEP view saved on file USER.AGGINPHCT. NOTE: A stored DATA STEP view cannot run under a different operating system. NOTE: DATA statement used: real time 0.22 seconds cpu time 0.15 seconds 357 ! *--the indices should be used to allow this sorted concatenation--; 358 359 %macro preexit; %*--macro invoked by aggsf3--; 360 %mend preexit; 361 362 ******************Be sure that the postexit macro defn (above) is NOT COMMENTED OUT if doing a partial run. We could 363 replicate it here, but will not do that until we have debugged it**********************************************; 364 365 %aggsf3(settypes=phct, setinlib=user, setin=temp, setoutlib=sf3, 366 setout=mislds, 367 templib=user, 368 aggby=sumlev sldcode county, 369 idlens=%str(SumLev $3 geocode $11 sldcode $3 county $5 cd108 $2 sldl02 sldu02 $3 AreaName $40 cnty $3 partflag 369 ! $1), 370 agglvl=2, 371 steps=agg post, 372 afact=afact, 373 report=0) *** aggsf3 macro, revised 30Sep02 , Begin execution with: setin:temp setout:mislds settypes:phct aggby:sumlev sldcode county ***Begin processing of set type PHCT *** *************************************************************** * AGG Macro Rev. 28Oct02 Begin Execution * * Missouri Census Data Center * *************************************************************** 21 The SAS System 17:20 Wednesday, October 30, 2002 *****PARAMETERS SPECIFIED***** (NAMES IN PARENTHESES ARE ALIASES) SETIN(AGGIN)= agginphct (INPUT DATA SET) SETOUT(AGGOUT)= aggoutphct (OUTPUT DATA SET) AGGBY(BYVARS)= sumlev sldcode county (AGGREGATION BY VARIABLES) AGGLVL(AGGLVLS)= 2 (NUMBER OF LEVELS OF AGGREGATION) AGGVARS(VARS)= PCT1I1 -- HCT28I13 (VARIABLES ON SETIN TO AGGREGATE) NUMS= (NUMERATOR VARIABLES) DENOMS(DENS)= (LIST OF DENOMINATORS) MEANS(MEDIANS)= Pct42i1-Pct42i15 (MEAN/MEDIAN VARS TO BE AGGREGATED) MWEIGHTS= Pct2i1-Pct2i15 (LIST OF WEIGHT VARIABLES FOR MEANS) SLCTEDIT(FILTER)= (SELECT/EDIT USER-EXIT MACRO NAME) IDVARS(IDS)= (ID VARIABLES TO KEEP ON AGGOUT) GRAND= 0 (GRAND TOTALS OPTION) FACVAR= afact (NAME OF VARIABLE USED TO FACTOR DATA) FILLBY= (FILLER CHARACTER FOR AGGBY VARIABLES) NODUPS= 0 (OPTION TO OMIT REDUNDANT HIGHER LEVEL SUMS) ***END PARM LIST*** ***DATA STEP WILL BE USED TO COUNT NUMBER OF AGGVARS*** NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 373:30 INFO: Index phct selected for BY clause processing. INFO: Index phct selected for BY clause processing. INFO: Index phct selected for BY clause processing. NAGGVARS=4392 NOTE: View USER.AGGINPHCT.VIEW used: real time 1.29 seconds cpu time 0.89 seconds NOTE: There were 2 observations read from the data set USER.TEMP_PHCT3. NOTE: There were 1 observations read from the data set USER.TEMP_PHCT2. NOTE: There were 1 observations read from the data set USER.TEMP_PHCT1. NOTE: There were 1 observations read from the data set USER.AGGINPHCT. NOTE: DATA statement used: real time 1.30 seconds cpu time 0.18 seconds **VALUE FOR NAGGVARS DETERMINED BY DATA STEP IS 4392 AGGBY1= county AGGBY2= sldcode AGGBY3= sumlev ****PARM VERIFICATION PHASE COMPLETE**** ****WARNING: VARIABLES APPEARING IN NUMS, DENOMS OR MWEIGHTS LISTS WILL NOT BE AGGREGATED UNLESS THEY ALSO APPEAR IN THE AGGVARS LIST. USE THE DROPVARS PARM TO OMIT THEM FROM THE OUTPUT DATA SET. INFO: Index phct selected for BY clause processing. INFO: Index phct selected for BY clause processing. INFO: Index phct selected for BY clause processing. NOTE: View USER.AGGINPHCT.VIEW used: real time 1:58.09 cpu time 31.89 seconds 22 The SAS System 17:20 Wednesday, October 30, 2002 NOTE: There were 6330 observations read from the data set USER.TEMP_PHCT3. NOTE: There were 6340 observations read from the data set USER.TEMP_PHCT2. NOTE: There were 6434 observations read from the data set USER.TEMP_PHCT1. NOTE: There were 19104 observations read from the data set USER.AGGINPHCT. NOTE: The data set USER.AGGOUTPHCT has 529 observations and 4398 variables. NOTE: DATA statement used: real time 1:58.19 cpu time 1:25.47 NOTE: Variable intptlon is uninitialized. NOTE: Variable intptlat is uninitialized. WARNING: The variable _age in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable _q1 in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable _q3 in the DROP, KEEP, or RENAME list has never been referenced. NOTE: There were 529 observations read from the data set USER.AGGOUTPHCT. NOTE: The data set SF3.MISLDSPHCT has 529 observations and 4405 variables. NOTE: DATA statement used: real time 2.55 seconds cpu time 1.84 seconds 374 375 run; 376 377 *----------------------------------(3 of 3): Aggregate the phctr dataset--------------------------------------------*; 378 379 data temp_phctr1; 380 length sldcode $3; 381 merge sf3.miphctr(where=(sumlev='085') in=insf3) 382 corrlst.mistr2k_sldl02(in=inclist); 383 by &str_geos; 384 if inclist; 385 if not insf3 then do; 386 put '**Geography on the corr. list not found on sf3: ' &str_geos; 387 delete; 388 end; 389 sldcode=sldl02; SumLev='620'; output; 390 run; NOTE: There were 6397 observations read from the data set SF3.MIPHCTR. WHERE sumlev='085'; NOTE: There were 6434 observations read from the data set CORRLST.MISTR2K_SLDL02. NOTE: The data set USER.TEMP_PHCTR1 has 6434 observations and 6648 variables. NOTE: DATA statement used: real time 46.75 seconds cpu time 38.27 seconds 391 392 data temp_phctr2; 393 length sldcode $3; 394 merge sf3.miphctr(where=(sumlev='085') in=insf3) 395 corrlst.mistr2k_sldu02(in=inclistu); 23 The SAS System 17:20 Wednesday, October 30, 2002 396 by &str_geos; 397 if inclistu; 398 if not insf3 then do; 399 put '**Geography on the corr. list not found on sf3: ' &str_geos; 400 delete; 401 end; 402 sldcode=sldu02; SumLev='610'; output; 403 run; NOTE: There were 6397 observations read from the data set SF3.MIPHCTR. WHERE sumlev='085'; NOTE: There were 6340 observations read from the data set CORRLST.MISTR2K_SLDU02. NOTE: The data set USER.TEMP_PHCTR2 has 6340 observations and 6648 variables. NOTE: DATA statement used: real time 36.79 seconds cpu time 36.57 seconds 404 405 data temp_phctr3; 406 length sldcode $3; 407 merge sf3.miphctr(where=(sumlev='085') in=insf3) 408 corrlst.mistr2k_cd108(in=inclistu); 409 by &str_geos; 410 if inclistu; 411 if not insf3 then do; 412 put '**Geography on the corr. list not found on sf3: ' &str_geos; 413 delete; 414 end; 415 sldcode=cd108; SumLev='500'; output; 416 run; INFO: The variable cd108 on data set SF3.MIPHCTR will be overwritten by data set CORRLST.MISTR2K_CD108. NOTE: There were 6397 observations read from the data set SF3.MIPHCTR. WHERE sumlev='085'; NOTE: There were 6330 observations read from the data set CORRLST.MISTR2K_CD108. NOTE: The data set USER.TEMP_PHCTR3 has 6330 observations and 6647 variables. NOTE: DATA statement used: real time 38.41 seconds cpu time 37.11 seconds 417 418 proc datasets library=user; -----Directory----- Libref: USER Engine: V8 Physical Name: /tmp/scratch/user File Name: /tmp/scratch/user Inode Number: 6144 Access Permission: rwxrwx--- Owner Name: john File Size (bytes): 17920 24 The SAS System 17:20 Wednesday, October 30, 2002 # Name Memtype File Size Last Modified --------------------------------------------------------- 1 AGGINPH VIEW 663552 30OCT2002:17:27:46 2 AGGINPHCT VIEW 532480 30OCT2002:17:35:38 3 AGGOUTPH DATA 15892480 30OCT2002:17:33:34 4 AGGOUTPHCT DATA 13574144 30OCT2002:17:37:38 5 BLKCODES DATA 12533760 30OCT2002:17:21:12 6 BLKCODESC DATA 12533760 30OCT2002:17:21:18 7 BLKCODESU DATA 12533760 30OCT2002:17:21:15 8 ILBGS VIEW 1171456 29OCT2002:13:41:55 9 ILPLACES VIEW 1171456 29OCT2002:13:41:55 10 ILSTCNTY DATA 2275328 29OCT2002:13:41:52 11 ILTRACTS VIEW 1171456 29OCT2002:13:41:55 12 KSBGS VIEW 1171456 29OCT2002:13:41:54 13 KSPLACES VIEW 1171456 29OCT2002:13:41:53 14 KSSTCNTY DATA 2275328 29OCT2002:13:41:52 15 KSTRACTS VIEW 1171456 29OCT2002:13:41:54 16 MIBLOCKS DATA 12533760 30OCT2002:17:21:01 17 MOBGS VIEW 1171456 29OCT2002:13:41:53 18 MOPLACES VIEW 1171456 29OCT2002:13:41:52 19 MOSTCNTY DATA 11763712 29OCT2002:13:41:52 20 MOTRACTS VIEW 1171456 29OCT2002:13:41:53 21 TEMP_PH1 DATA 394420224 30OCT2002:17:27:11 TEMP_PH1 INDEX 147456 30OCT2002:17:27:11 22 TEMP_PH2 DATA 391495680 30OCT2002:17:27:27 TEMP_PH2 INDEX 147456 30OCT2002:17:27:27 23 TEMP_PH3 DATA 390922240 30OCT2002:17:27:45 TEMP_PH3 INDEX 155648 30OCT2002:17:27:45 24 TEMP_PHCT1 DATA 158720000 30OCT2002:17:35:37 TEMP_PHCT1 INDEX 81920 30OCT2002:17:35:37 25 TEMP_PHCT2 DATA 156409856 30OCT2002:17:35:38 TEMP_PHCT2 INDEX 81920 30OCT2002:17:35:38 26 TEMP_PHCT3 DATA 156164096 30OCT2002:17:35:38 TEMP_PHCT3 INDEX 81920 30OCT2002:17:35:38 27 TEMP_PHCTR1 DATA 264364032 30OCT2002:17:38:27 28 TEMP_PHCTR2 DATA 260513792 30OCT2002:17:39:04 29 TEMP_PHCTR3 DATA 260104192 30OCT2002:17:39:43 30 _TOTALS DATA 212992 30OCT2002:17:21:19 419 modify temp_phctr1; 420 index delete phctr; WARNING: No key variables have been defined for file TEMP_PHCTR1. WARNING: No index named phctr. 421 index create phctr=(Sumlev sldcode county); NOTE: Composite index phctr has been defined. 422 modify temp_phctr2; 423 index delete phctr; WARNING: No key variables have been defined for file TEMP_PHCTR2. WARNING: No index named phctr. 424 index create phctr=(Sumlev sldcode county); NOTE: Composite index phctr has been defined. 425 modify temp_phctr3; 426 index delete phctr; WARNING: No key variables have been defined for file TEMP_PHCTR3. WARNING: No index named phctr. 427 index create phctr=(Sumlev sldcode county); NOTE: Composite index phctr has been defined. 25 The SAS System 17:20 Wednesday, October 30, 2002 428 quit; NOTE: PROCEDURE DATASETS used: real time 36.79 seconds cpu time 5.30 seconds 429 430 *----We replace the pre step (generated by the aggsf3 macro) with our own here. Then we use the steps parm to tell 431 aggsf3 to skip the prestep. Of course this only works if we create something called aggin&settype. ----*; 432 data agginphctr/view=agginphctr; set temp_phctr3 temp_phctr2 temp_phctr1 ; by SumLev sldcode county; 433 434 *--this code allows us to skip the pre step generated by the aggsf3 macro--; 435 label H3i2='100% Count of Occupied hus (derived)' H3i3='100% Count of Vacant units (derived)'; 436 keep SumLev sldcode county _numeric_; *<----specify id vars and then keep all the table cells with _numeric_; 437 drop PCT; 438 run; NOTE: DATA STEP view saved on file USER.AGGINPHCTR. NOTE: A stored DATA STEP view cannot run under a different operating system. NOTE: DATA statement used: real time 0.41 seconds cpu time 0.21 seconds 438 ! *--the indices should be used to allow this sorted concatenation--; 439 440 %macro preexit; %*--macro invoked by aggsf3--; 441 %mend preexit; 442 443 ******************Be sure that the postexit macro defn (above) is NOT COMMENTED OUT if doing a partial run. We could 444 *---We need to define our custom code for the post step using an "exit macro" prior to invoking aggsf3---; 445 *--this is the same postexit routine run for the other aggregations--; 446 447 %aggsf3(settypes=phctr, setinlib=user, setin=temp, setoutlib=sf3, 448 setout=mislds, 449 templib=user, 450 aggby=sumlev sldcode county, 451 idlens=%str(SumLev $3 geocode $11 sldcode $3 county $5 cd108 $2 sldl02 sldu02 $3 AreaName $40 cnty $3 partflag 451 ! $1), 452 agglvl=2, 453 steps=agg post, 454 afact=afact, 455 report=0) *** aggsf3 macro, revised 30Sep02 , Begin execution with: setin:temp setout:mislds settypes:phctr aggby:sumlev sldcode county ***Begin processing of set type PHCTR *** *************************************************************** * AGG Macro Rev. 28Oct02 Begin Execution * * Missouri Census Data Center * *************************************************************** 26 The SAS System 17:20 Wednesday, October 30, 2002 *****PARAMETERS SPECIFIED***** (NAMES IN PARENTHESES ARE ALIASES) SETIN(AGGIN)= agginphctr (INPUT DATA SET) SETOUT(AGGOUT)= aggoutphctr (OUTPUT DATA SET) AGGBY(BYVARS)= sumlev sldcode county (AGGREGATION BY VARIABLES) AGGLVL(AGGLVLS)= 2 (NUMBER OF LEVELS OF AGGREGATION) AGGVARS(VARS)= PCT62AI1--HCT48II3 (VARIABLES ON SETIN TO AGGREGATE) NUMS= (NUMERATOR VARIABLES) DENOMS(DENS)= (LIST OF DENOMINATORS) MEANS(MEDIANS)= (MEAN/MEDIAN VARS TO BE AGGREGATED) MWEIGHTS= (LIST OF WEIGHT VARIABLES FOR MEANS) SLCTEDIT(FILTER)= (SELECT/EDIT USER-EXIT MACRO NAME) IDVARS(IDS)= (ID VARIABLES TO KEEP ON AGGOUT) GRAND= 0 (GRAND TOTALS OPTION) FACVAR= afact (NAME OF VARIABLE USED TO FACTOR DATA) FILLBY= (FILLER CHARACTER FOR AGGBY VARIABLES) NODUPS= 0 (OPTION TO OMIT REDUNDANT HIGHER LEVEL SUMS) ***END PARM LIST*** ***DATA STEP WILL BE USED TO COUNT NUMBER OF AGGVARS*** NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 455:30 NOTE: Variable H3i2 is uninitialized. NOTE: Variable H3i3 is uninitialized. INFO: Index phctr selected for BY clause processing. INFO: Index phctr selected for BY clause processing. INFO: Index phctr selected for BY clause processing. NAGGVARS=6570 NOTE: View USER.AGGINPHCTR.VIEW used: real time 2.11 seconds cpu time 1.64 seconds NOTE: There were 2 observations read from the data set USER.TEMP_PHCTR3. NOTE: There were 1 observations read from the data set USER.TEMP_PHCTR2. NOTE: There were 1 observations read from the data set USER.TEMP_PHCTR1. NOTE: There were 1 observations read from the data set USER.AGGINPHCTR. NOTE: DATA statement used: real time 2.16 seconds cpu time 0.26 seconds **VALUE FOR NAGGVARS DETERMINED BY DATA STEP IS 6570 AGGBY1= county AGGBY2= sldcode AGGBY3= sumlev ****PARM VERIFICATION PHASE COMPLETE**** NOTE: Variable H3i2 is uninitialized. NOTE: Variable H3i3 is uninitialized. INFO: Index phctr selected for BY clause processing. INFO: Index phctr selected for BY clause processing. INFO: Index phctr selected for BY clause processing. NOTE: View USER.AGGINPHCTR.VIEW used: 27 The SAS System 17:20 Wednesday, October 30, 2002 real time 2:38.39 cpu time 49.03 seconds NOTE: There were 6330 observations read from the data set USER.TEMP_PHCTR3. NOTE: There were 6340 observations read from the data set USER.TEMP_PHCTR2. NOTE: There were 6434 observations read from the data set USER.TEMP_PHCTR1. NOTE: There were 19104 observations read from the data set USER.AGGINPHCTR. NOTE: The data set USER.AGGOUTPHCTR has 529 observations and 6576 variables. NOTE: DATA statement used: real time 2:38.49 cpu time 1:48.78 NOTE: Variable intptlon is uninitialized. NOTE: Variable intptlat is uninitialized. WARNING: The variable _age in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable _q1 in the DROP, KEEP, or RENAME list has never been referenced. WARNING: The variable _q3 in the DROP, KEEP, or RENAME list has never been referenced. NOTE: Missing values were generated as a result of performing an operation on missing values. Each place is given by: (Number of times) at (Line):(Column). 2756 at 455:128 5155 at 455:83 NOTE: There were 529 observations read from the data set USER.AGGOUTPHCTR. NOTE: The data set SF3.MISLDSPHCTR has 529 observations and 6583 variables. NOTE: DATA statement used: real time 4.92 seconds cpu time 4.12 seconds 456 457 run; 458 459 proc sql; 460 create view sf3.misenateph as 461 select * from misldsph where SumLev='610'; NOTE: SQL view SF3.MISENATEPH has been defined. 462 463 create view sf3.misenatephct as 464 select * from misldsphct where SumLev='610'; NOTE: SQL view SF3.MISENATEPHCT has been defined. 465 466 create view sf3.misenatephctr as 467 select * from misldsphctr where SumLev='610'; NOTE: SQL view SF3.MISENATEPHCTR has been defined. 468 469 create view sf3.mihouseph as 470 select * from misldsph where SumLev='620'; NOTE: SQL view SF3.MIHOUSEPH has been defined. 471 472 create view sf3.mihousephct as 473 select * from misldsphct where SumLev='620'; NOTE: SQL view SF3.MIHOUSEPHCT has been defined. 474 475 create view sf3.mihousephctr as 476 select * from misldsphctr where SumLev='620'; NOTE: SQL view SF3.MIHOUSEPHCTR has been defined. 28 The SAS System 17:20 Wednesday, October 30, 2002 477 quit; NOTE: PROCEDURE SQL used: real time 0.19 seconds cpu time 0.00 seconds 478 479 create view sf3.micd108ph as ______ ______ ______ 180 180 180 ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. 480 select * from misldsph where SumLev='620'; 481 482 create view sf3.micd108phct as ______ ______ ______ 180 180 180 ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. 483 select * from misldsphct where SumLev='620'; 484 485 create view sf3.micd108phctr as ______ ______ ______ 180 180 180 ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 180-322: Statement is not valid or it is used out of proper order. 486 select * from misldsphctr where SumLev='620'; 487 quit; 488 489 proc freq data=sf3.misldsph(keep=SumLev Geocode); 490 table SumLev; 491 title2 'Frequency Report on the sf3.misldsph Dataset'; 492 run; NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set. NOTE: PROCEDURE FREQ used: real time 0.08 seconds cpu time 0.01 seconds 493 proc print data=sf3.misldsph(keep=_char_ p1i1); 494 title2 'First 100 Obs, ID Variables Only, from sf3.misldsph Dataset'; 495 run; NOTE: PROCEDURE PRINT used: real time 0.00 seconds cpu time 0.01 seconds 496 proc print data=sf3.misenateph(keep=_char_ p1i1); 497 title2 'sf3.misenateph - ID Variables only'; 498 run; NOTE: PROCEDURE PRINT used: real time 0.79 seconds cpu time 0.69 seconds 499 29 The SAS System 17:20 Wednesday, October 30, 2002 500 proc print data=sf3.mihousephct(keep=_char_ pct1i1 hct1i1); 501 title2 'sf3.mihousephct - ID Variables only'; 502 run; NOTE: PROCEDURE PRINT used: real time 0.54 seconds cpu time 0.48 seconds 503 504 %include sascode(notify); **** aggsf3_MIslds (30398) has completed Wednesday 30OCT02 17:20 syserr=3 ***** ERROR: Errors printed on page 28. ERROR: Errors printed on page 28. ERROR: Errors printed on page 28. NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 22:12.33 cpu time 18:20.08