1 The SAS System 16:27 Tuesday, August 8, 2006 WARNING: The Base Product product with which Session Manager is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. WARNING: The Base Product product with which TKSRV is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. WARNING: The Base Product product with which DOS Monitor is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. WARNING: The Base Product product with which Program mort1989.sas is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, Site 0001177014. NOTE: This session is executing on the SunOS 5.9 platform. NOTE: SAS 9.1.3 Service Pack 3 WARNING: Your system is scheduled to expire on September 12, 2006, which is 35 days from now. Please contact your SAS Software Representative to obtain your updated SETINIT information. The SAS System will no longer function on or after that date. ----------------------------------------------------------------------- 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.59 seconds cpu time 0.28 seconds 1 options obs=100 ; 2 The SAS System 16:27 Tuesday, August 8, 2006 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Tue Aug 8 16:26:51 EDT 2006 6 This program reads the 1989 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/homes2b/nber/jroth/text 18 19 * The following line should contain 20 the complete path and name of the raw data file. 21 On a PC, use backslashes in paths as in C:\ ; 22 23 FILENAME datafile pipe "unzip -p /homes/data/mortality/1989/data/mort89.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = mort1989 ; 28 29 DATA library.&dataset ; WARNING: The Base Product product with which DATASTEP is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. 30 31 INFILE datafile LRECL = 20000 ; 32 attrib datayear length=3 label=""; 33 attrib reparea length=3 label=""; 34 attrib shipno length=3 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 popsizoc length=3 label=""; 52 attrib popsizrs length=$1 label=""; 53 attrib popmsa length=$1 label=""; 3 The SAS System 16:27 Tuesday, August 8, 2006 54 attrib educ length=3 label=""; 55 attrib educr length=3 label=""; 56 attrib monthdth length=3 label=""; 57 attrib sex length=3 label=""; 58 attrib race length=3 label=""; 59 attrib racer3 length=3 label=""; 60 attrib racer2 length=3 label=""; 61 attrib age length=3 label=""; 62 attrib ager52 length=3 label=""; 63 attrib ager27 length=3 label=""; 64 attrib ager12 length=3 label=""; 65 attrib ager22 length=3 label=""; 66 attrib placdth length=3 label=""; 67 attrib marstat length=3 label=""; 68 attrib statebth length=3 label=""; 69 attrib hispanic length=3 label=""; 70 attrib hspanicr length=3 label=""; 71 attrib weekday length=3 label=""; 72 attrib autopsy length=3 label=""; 73 attrib industry length=3 label=""; 74 attrib occup length=3 label=""; 75 attrib ucr52 length=3 label=""; 76 attrib indusr51 length=3 label=""; 77 attrib indusr15 length=3 label=""; 78 attrib occupr59 length=3 label=""; 79 attrib occupr9 length=3 label=""; 80 attrib calcage length=4 label=""; 81 attrib ageflag length=3 label=""; 82 attrib fipsctyo length=4 label=""; 83 attrib fipssto length=3 label=""; 84 attrib fipsctyr length=4 label=""; 85 attrib fipsstr length=3 label=""; 86 attrib fipssmsa length=4 label=""; 87 attrib fipscmsa length=3 label=""; 88 attrib accident length=3 label=""; 89 attrib ucod length=$4 label=""; 90 attrib ucr282 length=4 label=""; 91 attrib ucr72 length=3 label=""; 92 attrib ucr61 length=3 label=""; 93 attrib ucr34 length=3 label=""; 94 attrib eanum length=3 label=""; 95 attrib entity1 length=$7 label=""; 96 attrib econdp_1 length=3 label=""; 97 attrib econds_1 length=$1 label=""; 98 attrib enicon_1 length=$4 label=""; 99 attrib eniflag1 length=3 label=""; 100 attrib entity2 length=$7 label=""; 101 attrib econdp_2 length=3 label=""; 102 attrib econds_2 length=$1 label=""; 103 attrib enicon_2 length=$4 label=""; 104 attrib eniflag2 length=3 label=""; 105 attrib entity3 length=$7 label=""; 106 attrib econdp_3 length=3 label=""; 107 attrib econds_3 length=$1 label=""; 108 attrib enicon_3 length=$4 label=""; 109 attrib eniflag3 length=3 label=""; 110 attrib entity4 length=$7 label=""; 111 attrib econdp_4 length=3 label=""; 4 The SAS System 16:27 Tuesday, August 8, 2006 112 attrib econds_4 length=$1 label=""; 113 attrib enicon_4 length=$4 label=""; 114 attrib eniflag4 length=3 label=""; 115 attrib entity5 length=$7 label=""; 116 attrib econdp_5 length=3 label=""; 117 attrib econds_5 length=$1 label=""; 118 attrib enicon_5 length=$4 label=""; 119 attrib eniflag5 length=3 label=""; 120 attrib entity6 length=$7 label=""; 121 attrib econdp_6 length=3 label=""; 122 attrib econds_6 length=$1 label=""; 123 attrib enicon_6 length=$4 label=""; 124 attrib eniflag6 length=3 label=""; 125 attrib entity7 length=$7 label=""; 126 attrib econdp_7 length=3 label=""; 127 attrib econds_7 length=$1 label=""; 128 attrib enicon_7 length=$4 label=""; 129 attrib eniflag7 length=3 label=""; 130 attrib entity8 length=$7 label=""; 131 attrib econdp_8 length=3 label=""; 132 attrib econds_8 length=$1 label=""; 133 attrib enicon_8 length=$4 label=""; 134 attrib eniflag8 length=3 label=""; 135 attrib entity9 length=$7 label=""; 136 attrib econdp_9 length=3 label=""; 137 attrib econds_9 length=$1 label=""; 138 attrib enicon_9 length=$4 label=""; 139 attrib eniflag9 length=3 label=""; 140 attrib entity10 length=$7 label=""; 141 attrib econdp_10 length=3 label=""; 142 attrib econds_10 length=$1 label=""; 143 attrib enicon_10 length=$4 label=""; 144 attrib eniflag10 length=3 label=""; 145 attrib entity11 length=$7 label=""; 146 attrib econdp_11 length=3 label=""; 147 attrib econds_11 length=$1 label=""; 148 attrib enicon_11 length=$4 label=""; 149 attrib eniflag11 length=3 label=""; 150 attrib entity12 length=$7 label=""; 151 attrib econdp_12 length=3 label=""; 152 attrib econds_12 length=$1 label=""; 153 attrib enicon_12 length=$4 label=""; 154 attrib eniflag12 length=3 label=""; 155 attrib entity13 length=$7 label=""; 156 attrib econdp_13 length=3 label=""; 157 attrib econds_13 length=$1 label=""; 158 attrib enicon_13 length=$4 label=""; 159 attrib eniflag13 length=3 label=""; 160 attrib entity14 length=$7 label=""; 161 attrib econdp_14 length=3 label=""; 162 attrib econds_14 length=$1 label=""; 163 attrib enicon_14 length=$4 label=""; 164 attrib eniflag14 length=3 label=""; 165 attrib entity15 length=$7 label=""; 166 attrib econdp_15 length=3 label=""; 167 attrib econds_15 length=$1 label=""; 168 attrib enicon_15 length=$4 label=""; 169 attrib eniflag15 length=3 label=""; 5 The SAS System 16:27 Tuesday, August 8, 2006 170 attrib entity16 length=$7 label=""; 171 attrib econdp_16 length=3 label=""; 172 attrib econds_16 length=$1 label=""; 173 attrib enicon_16 length=$4 label=""; 174 attrib eniflag16 length=3 label=""; 175 attrib entity17 length=$7 label=""; 176 attrib econdp_17 length=3 label=""; 177 attrib econds_17 length=$1 label=""; 178 attrib enicon_17 length=$4 label=""; 179 attrib eniflag17 length=3 label=""; 180 attrib entity18 length=$7 label=""; 181 attrib econdp_18 length=3 label=""; 182 attrib econds_18 length=$1 label=""; 183 attrib enicon_18 length=$4 label=""; 184 attrib eniflag18 length=3 label=""; 185 attrib entity19 length=$7 label=""; 186 attrib econdp_19 length=3 label=""; 187 attrib econds_19 length=$1 label=""; 188 attrib enicon_19 length=$4 label=""; 189 attrib eniflag19 length=3 label=""; 190 attrib entity20 length=$7 label=""; 191 attrib econdp_20 length=3 label=""; 192 attrib econds_20 length=$1 label=""; 193 attrib enicon_20 length=$4 label=""; 194 attrib eniflag20 length=3 label=""; 195 attrib ranum length=3 label=""; 196 attrib record_1 length=$5 label=""; 197 attrib rnifla_1 length=3 label=""; 198 attrib record_2 length=$5 label=""; 199 attrib rnifla_2 length=3 label=""; 200 attrib record_3 length=$5 label=""; 201 attrib rnifla_3 length=3 label=""; 202 attrib record_4 length=$5 label=""; 203 attrib rnifla_4 length=3 label=""; 204 attrib record_5 length=$5 label=""; 205 attrib rnifla_5 length=3 label=""; 206 attrib record_6 length=$5 label=""; 207 attrib rnifla_6 length=3 label=""; 208 attrib record_7 length=$5 label=""; 209 attrib rnifla_7 length=3 label=""; 210 attrib record_8 length=$5 label=""; 211 attrib rnifla_8 length=3 label=""; 212 attrib record_9 length=$5 label=""; 213 attrib rnifla_9 length=3 label=""; 214 attrib record_10 length=$5 label=""; 215 attrib rnifla_10 length=3 label=""; 216 attrib record_11 length=$5 label=""; 217 attrib rnifla_11 length=3 label=""; 218 attrib record_12 length=$5 label=""; 219 attrib rnifla_12 length=3 label=""; 220 attrib record_13 length=$5 label=""; 221 attrib rnifla_13 length=3 label=""; 222 attrib record_14 length=$5 label=""; 223 attrib rnifla_14 length=3 label=""; 224 attrib record_15 length=$5 label=""; 225 attrib rnifla_15 length=3 label=""; 226 attrib record_16 length=$5 label=""; 227 attrib rnifla_16 length=3 label=""; 6 The SAS System 16:27 Tuesday, August 8, 2006 228 attrib record_17 length=$5 label=""; 229 attrib rnifla_17 length=3 label=""; 230 attrib record_18 length=$5 label=""; 231 attrib rnifla_18 length=3 label=""; 232 attrib record_19 length=$5 label=""; 233 attrib rnifla_19 length=3 label=""; 234 attrib record_20 length=$5 label=""; 235 attrib rnifla_20 length=3 label=""; 236 237 238 INPUT 239 240 @1 datayear 2. 241 @3 reparea 1. 242 @10 shipno 2. 243 @19 rectype 1. 244 @20 restatus 1. 245 @21 countyoc $5. 246 @21 stateoc $2. 247 @26 region 1. 248 @27 divstoc $2. 249 @29 exstatoc $2. 250 @31 countyrs $5. 251 @31 staters 2. 252 @36 cityrs $3. 253 @39 popsize $1. 254 @40 metro $1. 255 @41 regnres 1. 256 @42 divstres 2. 257 @44 exstares 2. 258 @46 smsares $3. 259 @49 popsizoc 1. 260 @50 popsizrs $1. 261 @51 popmsa $1. 262 @52 educ 2. 263 @54 educr 1. 264 @55 monthdth 2. 265 @59 sex 1. 266 @60 race 2. 267 @62 racer3 1. 268 @63 racer2 1. 269 @64 age 3. 270 @67 ager52 2. 271 @69 ager27 2. 272 @71 ager12 2. 273 @73 ager22 2. 274 @75 placdth 1. 275 @77 marstat 1. 276 @78 statebth 2. 277 @80 hispanic 2. 278 @82 hspanicr 1. 279 @83 weekday 1. 280 @84 autopsy 1. 281 @85 industry 3. 282 @88 occup 3. 283 @91 ucr52 3. 284 @94 indusr51 2. 285 @96 indusr15 2. 7 The SAS System 16:27 Tuesday, August 8, 2006 286 @98 occupr59 2. 287 @100 occupr9 2. 288 @110 calcage 4. 289 @114 ageflag 1. 290 @119 fipsctyo 5. 291 @119 fipssto 2. 292 @124 fipsctyr 5. 293 @124 fipsstr 2. 294 @129 fipssmsa 4. 295 @134 fipscmsa 2. 296 @141 accident 1. 297 @142 ucod $4. 298 @146 ucr282 5. 299 @151 ucr72 3. 300 @154 ucr61 3. 301 @157 ucr34 3. 302 @160 eanum 2. 303 @162 entity1 $7. 304 @162 econdp_1 1. 305 @163 econds_1 $1. 306 @164 enicon_1 $4. 307 @168 eniflag1 1. 308 @169 entity2 $7. 309 @169 econdp_2 1. 310 @170 econds_2 $1. 311 @171 enicon_2 $4. 312 @175 eniflag2 1. 313 @176 entity3 $7. 314 @176 econdp_3 1. 315 @177 econds_3 $1. 316 @178 enicon_3 $4. 317 @182 eniflag3 1. 318 @183 entity4 $7. 319 @183 econdp_4 1. 320 @184 econds_4 $1. 321 @185 enicon_4 $4. 322 @189 eniflag4 1. 323 @190 entity5 $7. 324 @190 econdp_5 1. 325 @191 econds_5 $1. 326 @192 enicon_5 $4. 327 @196 eniflag5 1. 328 @197 entity6 $7. 329 @197 econdp_6 1. 330 @198 econds_6 $1. 331 @199 enicon_6 $4. 332 @203 eniflag6 1. 333 @204 entity7 $7. 334 @204 econdp_7 1. 335 @205 econds_7 $1. 336 @206 enicon_7 $4. 337 @210 eniflag7 1. 338 @211 entity8 $7. 339 @211 econdp_8 1. 340 @212 econds_8 $1. 341 @213 enicon_8 $4. 342 @217 eniflag8 1. 343 @218 entity9 $7. 8 The SAS System 16:27 Tuesday, August 8, 2006 344 @218 econdp_9 1. 345 @219 econds_9 $1. 346 @220 enicon_9 $4. 347 @224 eniflag9 1. 348 @225 entity10 $7. 349 @225 econdp_10 1. 350 @226 econds_10 $1. 351 @227 enicon_10 $4. 352 @231 eniflag10 1. 353 @232 entity11 $7. 354 @232 econdp_11 1. 355 @233 econds_11 $1. 356 @234 enicon_11 $4. 357 @238 eniflag11 1. 358 @239 entity12 $7. 359 @239 econdp_12 1. 360 @240 econds_12 $1. 361 @241 enicon_12 $4. 362 @245 eniflag12 1. 363 @246 entity13 $7. 364 @246 econdp_13 1. 365 @247 econds_13 $1. 366 @248 enicon_13 $4. 367 @252 eniflag13 1. 368 @253 entity14 $7. 369 @253 econdp_14 1. 370 @254 econds_14 $1. 371 @255 enicon_14 $4. 372 @259 eniflag14 1. 373 @260 entity15 $7. 374 @260 econdp_15 1. 375 @261 econds_15 $1. 376 @262 enicon_15 $4. 377 @266 eniflag15 1. 378 @267 entity16 $7. 379 @267 econdp_16 1. 380 @268 econds_16 $1. 381 @269 enicon_16 $4. 382 @273 eniflag16 1. 383 @274 entity17 $7. 384 @274 econdp_17 1. 385 @275 econds_17 $1. 386 @276 enicon_17 $4. 387 @280 eniflag17 1. 388 @281 entity18 $7. 389 @281 econdp_18 1. 390 @282 econds_18 $1. 391 @283 enicon_18 $4. 392 @287 eniflag18 1. 393 @288 entity19 $7. 394 @288 econdp_19 1. 395 @289 econds_19 $1. 396 @290 enicon_19 $4. 397 @294 eniflag19 1. 398 @295 entity20 $7. 399 @295 econdp_20 1. 400 @296 econds_20 $1. 401 @297 enicon_20 $4. 9 The SAS System 16:27 Tuesday, August 8, 2006 402 @301 eniflag20 1. 403 @338 ranum 2. 404 @341 record_1 $5. 405 @345 rnifla_1 1. 406 @346 record_2 $5. 407 @350 rnifla_2 1. 408 @351 record_3 $5. 409 @355 rnifla_3 1. 410 @356 record_4 $5. 411 @360 rnifla_4 1. 412 @361 record_5 $5. 413 @365 rnifla_5 1. 414 @366 record_6 $5. 415 @370 rnifla_6 1. 416 @371 record_7 $5. 417 @375 rnifla_7 1. 418 @376 record_8 $5. 419 @380 rnifla_8 1. 420 @381 record_9 $5. 421 @385 rnifla_9 1. 422 @386 record_10 $5. 423 @390 rnifla_10 1. 424 @391 record_11 $5. 425 @395 rnifla_11 1. 426 @396 record_12 $5. 427 @400 rnifla_12 1. 428 @401 record_13 $5. 429 @405 rnifla_13 1. 430 @406 record_14 $5. 431 @410 rnifla_14 1. 432 @411 record_15 $5. 433 @415 rnifla_15 1. 434 @416 record_16 $5. 435 @420 rnifla_16 1. 436 @421 record_17 $5. 437 @425 rnifla_17 1. 438 @426 record_18 $5. 439 @430 rnifla_18 1. 440 @431 record_19 $5. 441 @435 rnifla_19 1. 442 @436 record_20 $5. 443 @440 rnifla_20 1. 444 ; 445 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1989/data/mort89.zip " NOTE: 100 records were read from the infile DATAFILE. The minimum record length was 441. The maximum record length was 441. NOTE: The data set LIBRARY.MORT1989 has 100 observations and 204 variables. NOTE: DATA statement used (Total process time): real time 0.57 seconds cpu time 0.30 seconds 446 proc print data=library.mort1989 (obs=6); 10 The SAS System 16:27 Tuesday, August 8, 2006 WARNING: The Base Product product with which PRINT is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. WARNING: The Base Product product with which SASODR is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. 447 NOTE: There were 6 observations read from the data set LIBRARY.MORT1989. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 0.21 seconds cpu time 0.14 seconds 448 proc contents data=library.mort1989; WARNING: The Base Product product with which CONTENTS is associated will be expiring soon, and is currently in warning mode to indicate this upcoming expiration. Most typically this warning period runs for 45 days. Please run PROC SETINIT to obtain more information on your warning period. 449 450 /* 451 Copyright 2006 shared by the National Bureau of Economic Research and Jean Roth 452 453 National Bureau of Economic Research. 454 1050 Massachusetts Avenue 455 Cambridge, MA 02138 456 jroth@nber.org 457 458 This program and all programs referenced in it are free software. You 459 can redistribute the program or modify it under the terms of the GNU 460 General Public License as published by the Free Software Foundation; 461 either version 2 of the License, or (at your option) any later version. 462 463 This program is distributed in the hope that it will be useful, 464 but WITHOUT ANY WARRANTY; without even the implied warranty of 465 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 466 GNU General Public License for more details. 467 468 You should have received a copy of the GNU General Public License 469 along with this program; if not, write to the Free Software 470 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 471 USA. 472 */ NOTE: The PROCEDURE CONTENTS printed pages 3-7. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.13 seconds cpu time 0.08 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1.63 seconds cpu time 0.86 seconds