1 The SAS System 16:08 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.12 seconds cpu time 0.03 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Mon Aug 14 16:03:20 EDT 2006 6 This program reads the 1980 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/1980/data 18 19 * The following line should contain 20 the complete path and name of the raw data file. 2 The SAS System 16:08 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/1980/data/mort1980.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = mort1980 ; 28 29 DATA library.&dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 attrib datayear length=3 label=""; 33 attrib reparea length=3 label=""; 34 attrib shipno length=$2 label=""; 35 attrib rectype length=3 label=""; 36 attrib restatus length=3 label=""; 37 attrib countyoc length=$5 label=""; 38 attrib stateoc length=$2 label=""; 39 attrib region length=3 label=""; 40 attrib divstoc length=$2 label=""; 41 attrib exstatoc length=$2 label=""; 42 attrib countyrs length=$5 label=""; 43 attrib staters length=3 label=""; 44 attrib cityrs length=$3 label=""; 45 attrib popsize length=$1 label=""; 46 attrib metro length=$1 label=""; 47 attrib regnres length=3 label=""; 48 attrib divstres length=3 label=""; 49 attrib exstares length=3 label=""; 50 attrib smsares length=$3 label=""; 51 attrib monthdth length=3 label=""; 52 attrib daydth length=3 label=""; 53 attrib sex length=3 label=""; 54 attrib race length=3 label=""; 55 attrib racer3 length=3 label=""; 56 attrib racer2 length=3 label=""; 57 attrib age length=3 label=""; 58 attrib ager52 length=3 label=""; 59 attrib ager27 length=3 label=""; 60 attrib ager12 length=3 label=""; 61 attrib ager22 length=3 label=""; 62 attrib hospstat length=3 label=""; 63 attrib marstat length=3 label=""; 64 attrib statebth length=3 label=""; 65 attrib autopsy length=3 label=""; 66 attrib fipssmsa length=$4 label=""; 67 attrib accident length=3 label=""; 68 attrib ucod length=$4 label=""; 69 attrib ucr282 length=4 label=""; 70 attrib ucr72 length=3 label=""; 71 attrib ucr61 length=3 label=""; 72 attrib ucr34 length=3 label=""; 73 attrib eanum length=3 label=""; 74 attrib entity1 length=$7 label=""; 75 attrib econdp_1 length=3 label=""; 76 attrib econds_1 length=$1 label=""; 77 attrib enicon_1 length=$4 label=""; 78 attrib eniflag1 length=3 label=""; 3 The SAS System 16:08 Thursday, June 16, 2011 79 attrib entity2 length=$7 label=""; 80 attrib econdp_2 length=3 label=""; 81 attrib econds_2 length=$1 label=""; 82 attrib enicon_2 length=$4 label=""; 83 attrib eniflag2 length=3 label=""; 84 attrib entity3 length=$7 label=""; 85 attrib econdp_3 length=3 label=""; 86 attrib econds_3 length=$1 label=""; 87 attrib enicon_3 length=$4 label=""; 88 attrib eniflag3 length=3 label=""; 89 attrib entity4 length=$7 label=""; 90 attrib econdp_4 length=3 label=""; 91 attrib econds_4 length=$1 label=""; 92 attrib enicon_4 length=$4 label=""; 93 attrib eniflag4 length=3 label=""; 94 attrib entity5 length=$7 label=""; 95 attrib econdp_5 length=3 label=""; 96 attrib econds_5 length=$1 label=""; 97 attrib enicon_5 length=$4 label=""; 98 attrib eniflag5 length=3 label=""; 99 attrib entity6 length=$7 label=""; 100 attrib econdp_6 length=3 label=""; 101 attrib econds_6 length=$1 label=""; 102 attrib enicon_6 length=$4 label=""; 103 attrib eniflag6 length=3 label=""; 104 attrib entity7 length=$7 label=""; 105 attrib econdp_7 length=3 label=""; 106 attrib econds_7 length=$1 label=""; 107 attrib enicon_7 length=$4 label=""; 108 attrib eniflag7 length=3 label=""; 109 attrib entity8 length=$7 label=""; 110 attrib econdp_8 length=3 label=""; 111 attrib econds_8 length=$1 label=""; 112 attrib enicon_8 length=$4 label=""; 113 attrib eniflag8 length=3 label=""; 114 attrib entity9 length=$7 label=""; 115 attrib econdp_9 length=3 label=""; 116 attrib econds_9 length=$1 label=""; 117 attrib enicon_9 length=$4 label=""; 118 attrib eniflag9 length=3 label=""; 119 attrib entity10 length=$7 label=""; 120 attrib econdp_10 length=3 label=""; 121 attrib econds_10 length=$1 label=""; 122 attrib enicon_10 length=$4 label=""; 123 attrib eniflag10 length=3 label=""; 124 attrib entity11 length=$7 label=""; 125 attrib econdp_11 length=3 label=""; 126 attrib econds_11 length=$1 label=""; 127 attrib enicon_11 length=$4 label=""; 128 attrib eniflag11 length=3 label=""; 129 attrib entity12 length=$7 label=""; 130 attrib econdp_12 length=3 label=""; 131 attrib econds_12 length=$1 label=""; 132 attrib enicon_12 length=$4 label=""; 133 attrib eniflag12 length=3 label=""; 134 attrib entity13 length=$7 label=""; 135 attrib econdp_13 length=3 label=""; 136 attrib econds_13 length=$1 label=""; 4 The SAS System 16:08 Thursday, June 16, 2011 137 attrib enicon_13 length=$4 label=""; 138 attrib eniflag13 length=3 label=""; 139 attrib entity14 length=$7 label=""; 140 attrib econdp_14 length=3 label=""; 141 attrib econds_14 length=$1 label=""; 142 attrib enicon_14 length=$4 label=""; 143 attrib eniflag14 length=3 label=""; 144 attrib entity15 length=$7 label=""; 145 attrib econdp_15 length=3 label=""; 146 attrib econds_15 length=$1 label=""; 147 attrib enicon_15 length=$4 label=""; 148 attrib eniflag15 length=3 label=""; 149 attrib entity16 length=$7 label=""; 150 attrib econdp_16 length=3 label=""; 151 attrib econds_16 length=$1 label=""; 152 attrib enicon_16 length=$4 label=""; 153 attrib eniflag16 length=3 label=""; 154 attrib entity17 length=$7 label=""; 155 attrib econdp_17 length=3 label=""; 156 attrib econds_17 length=$1 label=""; 157 attrib enicon_17 length=$4 label=""; 158 attrib eniflag17 length=3 label=""; 159 attrib entity18 length=$7 label=""; 160 attrib econdp_18 length=3 label=""; 161 attrib econds_18 length=$1 label=""; 162 attrib enicon_18 length=$4 label=""; 163 attrib eniflag18 length=3 label=""; 164 attrib entity19 length=$7 label=""; 165 attrib econdp_19 length=3 label=""; 166 attrib econds_19 length=$1 label=""; 167 attrib enicon_19 length=$4 label=""; 168 attrib eniflag19 length=3 label=""; 169 attrib entity20 length=$7 label=""; 170 attrib econdp_20 length=3 label=""; 171 attrib econds_20 length=$1 label=""; 172 attrib enicon_20 length=$4 label=""; 173 attrib eniflag20 length=3 label=""; 174 attrib ranum length=3 label=""; 175 attrib record_1 length=$5 label=""; 176 attrib rnifla_1 length=3 label=""; 177 attrib record_2 length=$5 label=""; 178 attrib rnifla_2 length=3 label=""; 179 attrib record_3 length=$5 label=""; 180 attrib rnifla_3 length=3 label=""; 181 attrib record_4 length=$5 label=""; 182 attrib rnifla_4 length=3 label=""; 183 attrib record_5 length=$5 label=""; 184 attrib rnifla_5 length=3 label=""; 185 attrib record_6 length=$5 label=""; 186 attrib rnifla_6 length=3 label=""; 187 attrib record_7 length=$5 label=""; 188 attrib rnifla_7 length=3 label=""; 189 attrib record_8 length=$5 label=""; 190 attrib rnifla_8 length=3 label=""; 191 attrib record_9 length=$5 label=""; 192 attrib rnifla_9 length=3 label=""; 193 attrib record_10 length=$5 label=""; 194 attrib rnifla_10 length=3 label=""; 5 The SAS System 16:08 Thursday, June 16, 2011 195 attrib record_11 length=$5 label=""; 196 attrib rnifla_11 length=3 label=""; 197 attrib record_12 length=$5 label=""; 198 attrib rnifla_12 length=3 label=""; 199 attrib record_13 length=$5 label=""; 200 attrib rnifla_13 length=3 label=""; 201 attrib record_14 length=$5 label=""; 202 attrib rnifla_14 length=3 label=""; 203 attrib record_15 length=$5 label=""; 204 attrib rnifla_15 length=3 label=""; 205 attrib record_16 length=$5 label=""; 206 attrib rnifla_16 length=3 label=""; 207 attrib record_17 length=$5 label=""; 208 attrib rnifla_17 length=3 label=""; 209 attrib record_18 length=$5 label=""; 210 attrib rnifla_18 length=3 label=""; 211 attrib record_19 length=$5 label=""; 212 attrib rnifla_19 length=3 label=""; 213 attrib record_20 length=$5 label=""; 214 attrib rnifla_20 length=3 label=""; 215 216 217 INPUT 218 219 @1 datayear 2. 220 @3 reparea 1. 221 @10 shipno $2. 222 @19 rectype 1. 223 @20 restatus 1. 224 @21 countyoc $5. 225 @21 stateoc $2. 226 @26 region 1. 227 @27 divstoc $2. 228 @29 exstatoc $2. 229 @31 countyrs $5. 230 @31 staters 2. 231 @36 cityrs $3. 232 @39 popsize $1. 233 @40 metro $1. 234 @41 regnres 1. 235 @42 divstres 2. 236 @44 exstares 2. 237 @46 smsares $3. 238 @55 monthdth 2. 239 @57 daydth 2. 240 @59 sex 1. 241 @60 race 2. 242 @62 racer3 1. 243 @63 racer2 1. 244 @64 age 3. 245 @67 ager52 2. 246 @69 ager27 2. 247 @71 ager12 2. 248 @73 ager22 2. 249 @75 hospstat 1. 250 @77 marstat 1. 251 @78 statebth 2. 252 @84 autopsy 1. 6 The SAS System 16:08 Thursday, June 16, 2011 253 @129 fipssmsa $4. 254 @141 accident 1. 255 @142 ucod $4. 256 @146 ucr282 5. 257 @151 ucr72 3. 258 @154 ucr61 3. 259 @157 ucr34 3. 260 @160 eanum 2. 261 @162 entity1 $7. 262 @162 econdp_1 1. 263 @163 econds_1 $1. 264 @164 enicon_1 $4. 265 @168 eniflag1 1. 266 @169 entity2 $7. 267 @169 econdp_2 1. 268 @170 econds_2 $1. 269 @171 enicon_2 $4. 270 @175 eniflag2 1. 271 @176 entity3 $7. 272 @176 econdp_3 1. 273 @177 econds_3 $1. 274 @178 enicon_3 $4. 275 @182 eniflag3 1. 276 @183 entity4 $7. 277 @183 econdp_4 1. 278 @184 econds_4 $1. 279 @185 enicon_4 $4. 280 @189 eniflag4 1. 281 @190 entity5 $7. 282 @190 econdp_5 1. 283 @191 econds_5 $1. 284 @192 enicon_5 $4. 285 @196 eniflag5 1. 286 @197 entity6 $7. 287 @197 econdp_6 1. 288 @198 econds_6 $1. 289 @199 enicon_6 $4. 290 @203 eniflag6 1. 291 @204 entity7 $7. 292 @204 econdp_7 1. 293 @205 econds_7 $1. 294 @206 enicon_7 $4. 295 @210 eniflag7 1. 296 @211 entity8 $7. 297 @211 econdp_8 1. 298 @212 econds_8 $1. 299 @213 enicon_8 $4. 300 @217 eniflag8 1. 301 @218 entity9 $7. 302 @218 econdp_9 1. 303 @219 econds_9 $1. 304 @220 enicon_9 $4. 305 @224 eniflag9 1. 306 @225 entity10 $7. 307 @225 econdp_10 1. 308 @226 econds_10 $1. 309 @227 enicon_10 $4. 310 @231 eniflag10 1. 7 The SAS System 16:08 Thursday, June 16, 2011 311 @232 entity11 $7. 312 @232 econdp_11 1. 313 @233 econds_11 $1. 314 @234 enicon_11 $4. 315 @238 eniflag11 1. 316 @239 entity12 $7. 317 @239 econdp_12 1. 318 @240 econds_12 $1. 319 @241 enicon_12 $4. 320 @245 eniflag12 1. 321 @246 entity13 $7. 322 @246 econdp_13 1. 323 @247 econds_13 $1. 324 @248 enicon_13 $4. 325 @252 eniflag13 1. 326 @253 entity14 $7. 327 @253 econdp_14 1. 328 @254 econds_14 $1. 329 @255 enicon_14 $4. 330 @259 eniflag14 1. 331 @260 entity15 $7. 332 @260 econdp_15 1. 333 @261 econds_15 $1. 334 @262 enicon_15 $4. 335 @266 eniflag15 1. 336 @267 entity16 $7. 337 @267 econdp_16 1. 338 @268 econds_16 $1. 339 @269 enicon_16 $4. 340 @273 eniflag16 1. 341 @274 entity17 $7. 342 @274 econdp_17 1. 343 @275 econds_17 $1. 344 @276 enicon_17 $4. 345 @280 eniflag17 1. 346 @281 entity18 $7. 347 @281 econdp_18 1. 348 @282 econds_18 $1. 349 @283 enicon_18 $4. 350 @287 eniflag18 1. 351 @288 entity19 $7. 352 @288 econdp_19 1. 353 @289 econds_19 $1. 354 @290 enicon_19 $4. 355 @294 eniflag19 1. 356 @295 entity20 $7. 357 @295 econdp_20 1. 358 @296 econds_20 $1. 359 @297 enicon_20 $4. 360 @301 eniflag20 1. 361 @338 ranum 2. 362 @341 record_1 $5. 363 @345 rnifla_1 1. 364 @346 record_2 $5. 365 @350 rnifla_2 1. 366 @351 record_3 $5. 367 @355 rnifla_3 1. 368 @356 record_4 $5. 8 The SAS System 16:08 Thursday, June 16, 2011 369 @360 rnifla_4 1. 370 @361 record_5 $5. 371 @365 rnifla_5 1. 372 @366 record_6 $5. 373 @370 rnifla_6 1. 374 @371 record_7 $5. 375 @375 rnifla_7 1. 376 @376 record_8 $5. 377 @380 rnifla_8 1. 378 @381 record_9 $5. 379 @385 rnifla_9 1. 380 @386 record_10 $5. 381 @390 rnifla_10 1. 382 @391 record_11 $5. 383 @395 rnifla_11 1. 384 @396 record_12 $5. 385 @400 rnifla_12 1. 386 @401 record_13 $5. 387 @405 rnifla_13 1. 388 @406 record_14 $5. 389 @410 rnifla_14 1. 390 @411 record_15 $5. 391 @415 rnifla_15 1. 392 @416 record_16 $5. 393 @420 rnifla_16 1. 394 @421 record_17 $5. 395 @425 rnifla_17 1. 396 @426 record_18 $5. 397 @430 rnifla_18 1. 398 @431 record_19 $5. 399 @435 rnifla_19 1. 400 @436 record_20 $5. 401 @440 rnifla_20 1. 402 ; 403 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1980/data/mort1980.zip " NOTE: LOST CARD. datayear=80 reparea=0 shipno=00 rectype=1 restatus=1 countyoc=51003 stateoc=51 region=4 divstoc=83 exstatoc=52 countyrs=51003 staters=51 cityrs=999 popsize=9 metro=2 regnres=4 divstres=83 exstares=52 smsares=000 monthdth=12 daydth=28 sex=1 race=1 racer3=1 racer2=1 age=86 ager52=43 ager27=23 ager12=11 ager22=. hospstat=6 marstat=4 statebth=24 autopsy=2 fipssmsa=0000 accident=. ucod=3109 ucr282=14700 ucr72=780 ucr61=680 ucr34=320 eanum=2 entity1=11486 0 econdp_1=1 econds_1=1 enicon_1=486 eniflag1=0 entity2=2131090 econdp_2=2 econds_2=1 enicon_2=3109 eniflag2=0 entity3= econdp_3=. econds_3= enicon_3= eniflag3=. entity4= econdp_4=. econds_4= enicon_4= eniflag4=. entity5= econdp_5=. econds_5= enicon_5= eniflag5=. entity6= econdp_6=. econds_6= enicon_6= eniflag6=. entity7= econdp_7=. econds_7= enicon_7= eniflag7=. entity8= econdp_8=. econds_8= enicon_8= eniflag8=. entity9= econdp_9=. econds_9= enicon_9= eniflag9=. entity10= econdp_10=. econds_10= enicon_10= eniflag10=. entity11= econdp_11=. econds_11= enicon_11= eniflag11=. entity12= econdp_12=. econds_12= enicon_12= eniflag12=. entity13= econdp_13=. econds_13= enicon_13= eniflag13=. entity14= econdp_14=. econds_14= enicon_14= eniflag14=. entity15= econdp_15=. econds_15= enicon_15= eniflag15=. entity16= econdp_16=. econds_16= enicon_16= eniflag16=. entity17= econdp_17=. econds_17= enicon_17= eniflag17=. entity18= econdp_18=. econds_18= enicon_18= eniflag18=. entity19= econdp_19=. econds_19= enicon_19= eniflag19=. entity20= econdp_20=. econds_20= enicon_20= eniflag20=. ranum=2 record_1=31090 rnifla_1=0 record_2=486 0 rnifla_2=0 record_3=800 rnifla_3=0 record_4=496 0 rnifla_4=0 record_5=79910 rnifla_5=0 record_6=800 rnifla_6=8 record_7=800 rnifla_7=8 record_8=800 rnifla_8=8 record_9=800 rnifla_9=8 record_10=800 rnifla_10=8 record_11=800 rnifla_11=8 record_12=800 rnifla_12=8 record_13=800 rnifla_13=8 record_14=800 rnifla_14=8 record_15= rnifla_15=. record_16= rnifla_16=. record_17= rnifla_17=. record_18= rnifla_18=. record_19= rnifla_19=. record_20= rnifla_20=. _ERROR_=1 _N_=59467 NOTE: 1993137 records were read from the infile DATAFILE. 9 The SAS System 16:08 Thursday, June 16, 2011 The minimum record length was 340. The maximum record length was 421. NOTE: SAS went to a new line when INPUT statement reached past the end of a line. NOTE: The data set LIBRARY.MORT1980 has 59466 observations and 183 variables. NOTE: DATA statement used (Total process time): real time 10.58 seconds cpu time 8.52 seconds 404 proc print data=library.mort1980 (obs=6); 405 NOTE: There were 6 observations read from the data set LIBRARY.MORT1980. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 406 proc contents data=library.mort1980; 407 408 /* 409 Copyright 2006 shared by the National Bureau of Economic Research and Jean Roth 410 411 National Bureau of Economic Research. 412 1050 Massachusetts Avenue 413 Cambridge, MA 02138 414 jroth@nber.org 415 416 This program and all programs referenced in it are free software. You 417 can redistribute the program or modify it under the terms of the GNU 418 General Public License as published by the Free Software Foundation; 419 either version 2 of the License, or (at your option) any later version. 420 421 This program is distributed in the hope that it will be useful, 422 but WITHOUT ANY WARRANTY; without even the implied warranty of 423 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 424 GNU General Public License for more details. 425 426 You should have received a copy of the GNU General Public License 427 along with this program; if not, write to the Free Software 428 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 429 USA. 430 */ NOTE: The PROCEDURE CONTENTS printed pages 3-7. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.02 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 10.80 seconds cpu time 8.62 seconds