1 The SAS System 16:10 Thursday, June 16, 2011 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to HARVARD UNIV - SCHOOL OF PUBLIC HEALTH - T&R, Site 0001177014. NOTE: This session is executing on the SunOS 5.10 platform. NOTE: SAS 9.1.3 Service Pack 3 ----------------------------------------------------------------------- NBER NOTE: sas now defaults to sas9. sas8 or sas6 will invoke sas version 8 or 6 respectively. - 2005/10/21 ----------------------------------------------------------------------- You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "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.29 seconds cpu time 0.06 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Wed Aug 23 11:18:43 EDT 2006 6 This program reads the 1973 NCHS Multiple Cause of Death Data Data File 7 8 Report errors to jroth@nber.org 9 This program is distributed under the GNU GPL. 10 See end of this file and 11 http://www.gnu.org/licenses/ for details. 12 ----------------------------------------------- */ 13 14 * The following line should contain the directory 15 where the SAS file is to be stored ; 16 17 libname library "./"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /disk/nber10/SCCS/mortality/1973/data 18 19 * The following line should contain 20 the complete path and name of the raw data file. 2 The SAS System 16:10 Thursday, June 16, 2011 21 On a PC, use backslashes in paths as in C:\ ; 22 23 FILENAME datafile pipe "unzip -p /homes/data/mortality/1973/data/mort1973.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = mort1973 ; 28 29 DATA library.&dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 attrib datayear length=3 label=""; 33 attrib shipno length=$2 label=""; 34 attrib reparea length=3 label=""; 35 attrib rectype length=3 label=""; 36 attrib restatus length=3 label=""; 37 attrib countyrs length=$5 label=""; 38 attrib staters length=$2 label=""; 39 attrib cityrs length=$3 label=""; 40 attrib popsize length=$1 label=""; 41 attrib smsares length=$3 label=""; 42 attrib metro length=$1 label=""; 43 attrib stateoc length=3 label=""; 44 attrib countyoc length=$5 label=""; 45 attrib monthdth length=3 label=""; 46 attrib daydth length=3 label=""; 47 attrib sex length=3 label=""; 48 attrib race length=3 label=""; 49 attrib racer2 length=3 label=""; 50 attrib racer3 length=3 label=""; 51 attrib age length=3 label=""; 52 attrib ager12 length=3 label=""; 53 attrib ager27 length=3 label=""; 54 attrib ager22 length=3 label=""; 55 attrib divstres length=3 label=""; 56 attrib divstoc length=3 label=""; 57 attrib autopsy length=3 label=""; 58 attrib findings length=3 label=""; 59 attrib ucod length=$4 label=""; 60 attrib ucr281 length=4 label=""; 61 attrib ucr69 length=3 label=""; 62 attrib ucr65 length=3 label=""; 63 attrib ucr34 length=3 label=""; 64 attrib accident length=3 label=""; 65 attrib seqnum length=5 label=""; 66 attrib eanum length=3 label=""; 67 attrib entity1 length=$8 label=""; 68 attrib econdp_1 length=3 label=""; 69 attrib econds_1 length=$2 label=""; 70 attrib enicon_1 length=$4 label=""; 71 attrib eniflag1 length=3 label=""; 72 attrib entity2 length=$8 label=""; 73 attrib econdp_2 length=3 label=""; 74 attrib econds_2 length=$2 label=""; 75 attrib enicon_2 length=$4 label=""; 76 attrib eniflag2 length=3 label=""; 77 attrib entity3 length=$8 label=""; 78 attrib econdp_3 length=3 label=""; 3 The SAS System 16:10 Thursday, June 16, 2011 79 attrib econds_3 length=$2 label=""; 80 attrib enicon_3 length=$4 label=""; 81 attrib eniflag3 length=3 label=""; 82 attrib entity4 length=$8 label=""; 83 attrib econdp_4 length=3 label=""; 84 attrib econds_4 length=$2 label=""; 85 attrib enicon_4 length=$4 label=""; 86 attrib eniflag4 length=3 label=""; 87 attrib entity5 length=$8 label=""; 88 attrib econdp_5 length=3 label=""; 89 attrib econds_5 length=$2 label=""; 90 attrib enicon_5 length=$4 label=""; 91 attrib eniflag5 length=3 label=""; 92 attrib entity6 length=$8 label=""; 93 attrib econdp_6 length=3 label=""; 94 attrib econds_6 length=$2 label=""; 95 attrib enicon_6 length=$4 label=""; 96 attrib eniflag6 length=3 label=""; 97 attrib entity7 length=$8 label=""; 98 attrib econdp_7 length=3 label=""; 99 attrib econds_7 length=$2 label=""; 100 attrib enicon_7 length=$4 label=""; 101 attrib eniflag7 length=3 label=""; 102 attrib entity8 length=$8 label=""; 103 attrib econdp_8 length=3 label=""; 104 attrib econds_8 length=$2 label=""; 105 attrib enicon_8 length=$4 label=""; 106 attrib eniflag8 length=3 label=""; 107 attrib entity9 length=$8 label=""; 108 attrib econdp_9 length=3 label=""; 109 attrib econds_9 length=$2 label=""; 110 attrib enicon_9 length=$4 label=""; 111 attrib eniflag9 length=3 label=""; 112 attrib entity10 length=$8 label=""; 113 attrib econdp_10 length=3 label=""; 114 attrib econds_10 length=$2 label=""; 115 attrib enicon_10 length=$4 label=""; 116 attrib eniflag10 length=3 label=""; 117 attrib entity11 length=$8 label=""; 118 attrib econdp_11 length=3 label=""; 119 attrib econds_11 length=$2 label=""; 120 attrib enicon_11 length=$4 label=""; 121 attrib eniflag11 length=3 label=""; 122 attrib entity12 length=$8 label=""; 123 attrib econdp_12 length=3 label=""; 124 attrib econds_12 length=$2 label=""; 125 attrib enicon_12 length=$4 label=""; 126 attrib eniflag12 length=3 label=""; 127 attrib entity13 length=$8 label=""; 128 attrib econdp_13 length=3 label=""; 129 attrib econds_13 length=$2 label=""; 130 attrib enicon_13 length=$4 label=""; 131 attrib eniflag13 length=3 label=""; 132 attrib entity14 length=$8 label=""; 133 attrib econdp_14 length=3 label=""; 134 attrib econds_14 length=$2 label=""; 135 attrib enicon_14 length=$4 label=""; 136 attrib eniflag14 length=3 label=""; 4 The SAS System 16:10 Thursday, June 16, 2011 137 attrib ranum length=3 label=""; 138 attrib record_1 length=$5 label=""; 139 attrib rnifla_1 length=3 label=""; 140 attrib record_2 length=$5 label=""; 141 attrib rnifla_2 length=3 label=""; 142 attrib record_3 length=$5 label=""; 143 attrib rnifla_3 length=3 label=""; 144 attrib record_4 length=$5 label=""; 145 attrib rnifla_4 length=3 label=""; 146 attrib record_5 length=$5 label=""; 147 attrib rnifla_5 length=3 label=""; 148 attrib record_6 length=$5 label=""; 149 attrib rnifla_6 length=3 label=""; 150 attrib record_7 length=$5 label=""; 151 attrib rnifla_7 length=3 label=""; 152 attrib record_8 length=$5 label=""; 153 attrib rnifla_8 length=3 label=""; 154 attrib record_9 length=$5 label=""; 155 attrib rnifla_9 length=3 label=""; 156 attrib record_10 length=$5 label=""; 157 attrib rnifla_10 length=3 label=""; 158 attrib record_11 length=$5 label=""; 159 attrib rnifla_11 length=3 label=""; 160 attrib record_12 length=$5 label=""; 161 attrib rnifla_12 length=3 label=""; 162 attrib record_13 length=$5 label=""; 163 attrib rnifla_13 length=3 label=""; 164 attrib record_14 length=$5 label=""; 165 attrib rnifla_14 length=3 label=""; 166 167 168 INPUT 169 170 @1 datayear 1. 171 @2 shipno $2. 172 @4 reparea 1. 173 @11 rectype 1. 174 @12 restatus 1. 175 @13 countyrs $5. 176 @13 staters $2. 177 @18 cityrs $3. 178 @21 popsize $1. 179 @22 smsares $3. 180 @25 metro $1. 181 @26 stateoc 2. 182 @26 countyoc $5. 183 @31 monthdth 2. 184 @33 daydth 2. 185 @35 sex 1. 186 @36 race 1. 187 @37 racer2 1. 188 @38 racer3 1. 189 @39 age 3. 190 @42 ager12 2. 191 @44 ager27 2. 192 @46 ager22 2. 193 @48 divstres 2. 194 @50 divstoc 2. 5 The SAS System 16:10 Thursday, June 16, 2011 195 @52 autopsy 1. 196 @53 findings 1. 197 @60 ucod $4. 198 @64 ucr281 5. 199 @69 ucr69 3. 200 @72 ucr65 3. 201 @75 ucr34 3. 202 @91 accident 1. 203 @92 seqnum 7. 204 @99 eanum 2. 205 @101 entity1 $8. 206 @101 econdp_1 1. 207 @102 econds_1 $2. 208 @104 enicon_1 $4. 209 @108 eniflag1 1. 210 @109 entity2 $8. 211 @109 econdp_2 1. 212 @110 econds_2 $2. 213 @112 enicon_2 $4. 214 @116 eniflag2 1. 215 @117 entity3 $8. 216 @117 econdp_3 1. 217 @118 econds_3 $2. 218 @120 enicon_3 $4. 219 @124 eniflag3 1. 220 @125 entity4 $8. 221 @125 econdp_4 1. 222 @126 econds_4 $2. 223 @128 enicon_4 $4. 224 @132 eniflag4 1. 225 @133 entity5 $8. 226 @133 econdp_5 1. 227 @134 econds_5 $2. 228 @136 enicon_5 $4. 229 @140 eniflag5 1. 230 @141 entity6 $8. 231 @141 econdp_6 1. 232 @142 econds_6 $2. 233 @144 enicon_6 $4. 234 @148 eniflag6 1. 235 @149 entity7 $8. 236 @149 econdp_7 1. 237 @150 econds_7 $2. 238 @152 enicon_7 $4. 239 @156 eniflag7 1. 240 @157 entity8 $8. 241 @157 econdp_8 1. 242 @158 econds_8 $2. 243 @160 enicon_8 $4. 244 @164 eniflag8 1. 245 @165 entity9 $8. 246 @165 econdp_9 1. 247 @166 econds_9 $2. 248 @168 enicon_9 $4. 249 @172 eniflag9 1. 250 @173 entity10 $8. 251 @173 econdp_10 1. 252 @174 econds_10 $2. 6 The SAS System 16:10 Thursday, June 16, 2011 253 @176 enicon_10 $4. 254 @180 eniflag10 1. 255 @181 entity11 $8. 256 @181 econdp_11 1. 257 @182 econds_11 $2. 258 @184 enicon_11 $4. 259 @188 eniflag11 1. 260 @189 entity12 $8. 261 @189 econdp_12 1. 262 @190 econds_12 $2. 263 @192 enicon_12 $4. 264 @196 eniflag12 1. 265 @197 entity13 $8. 266 @197 econdp_13 1. 267 @198 econds_13 $2. 268 @200 enicon_13 $4. 269 @204 eniflag13 1. 270 @205 entity14 $8. 271 @205 econdp_14 1. 272 @206 econds_14 $2. 273 @208 enicon_14 $4. 274 @212 eniflag14 1. 275 @213 ranum 2. 276 @215 record_1 $5. 277 @219 rnifla_1 1. 278 @220 record_2 $5. 279 @224 rnifla_2 1. 280 @225 record_3 $5. 281 @229 rnifla_3 1. 282 @230 record_4 $5. 283 @234 rnifla_4 1. 284 @235 record_5 $5. 285 @239 rnifla_5 1. 286 @240 record_6 $5. 287 @244 rnifla_6 1. 288 @245 record_7 $5. 289 @249 rnifla_7 1. 290 @250 record_8 $5. 291 @254 rnifla_8 1. 292 @255 record_9 $5. 293 @259 rnifla_9 1. 294 @260 record_10 $5. 295 @264 rnifla_10 1. 296 @265 record_11 $5. 297 @269 rnifla_11 1. 298 @270 record_12 $5. 299 @274 rnifla_12 1. 300 @275 record_13 $5. 301 @279 rnifla_13 1. 302 @280 record_14 $5. 303 @284 rnifla_14 1. 304 ; 305 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1973/data/mort1973.zip " NOTE: 1975126 records were read from the infile DATAFILE. 7 The SAS System 16:10 Thursday, June 16, 2011 The minimum record length was 286. The maximum record length was 286. NOTE: The data set LIBRARY.MORT1973 has 1975126 observations and 134 variables. NOTE: DATA statement used (Total process time): real time 2:34.93 cpu time 35.64 seconds 306 proc print data=library.mort1973 (obs=6); 307 NOTE: There were 6 observations read from the data set LIBRARY.MORT1973. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 0.11 seconds cpu time 0.03 seconds 308 proc contents data=library.mort1973; 309 310 /* 311 Copyright 2006 shared by the National Bureau of Economic Research and Jean Roth 312 313 National Bureau of Economic Research. 314 1050 Massachusetts Avenue 315 Cambridge, MA 02138 316 jroth@nber.org 317 318 This program and all programs referenced in it are free software. You 319 can redistribute the program or modify it under the terms of the GNU 320 General Public License as published by the Free Software Foundation; 321 either version 2 of the License, or (at your option) any later version. 322 323 This program is distributed in the hope that it will be useful, 324 but WITHOUT ANY WARRANTY; without even the implied warranty of 325 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 326 GNU General Public License for more details. 327 328 You should have received a copy of the GNU General Public License 329 along with this program; if not, write to the Free Software 330 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 331 USA. 332 */ NOTE: The PROCEDURE CONTENTS printed pages 3-6. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.05 seconds cpu time 0.02 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 2:35.46 cpu time 35.76 seconds