1 The SAS System 11:34 Tuesday, November 25, 2014 NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.3 (TS1M0) Licensed to NATIONAL BUREAU OF ECONOMIC RESEARCH, Site 70111351. NOTE: This session is executing on the Linux 2.6.32-431.29.2.el6.x86_64 (LIN X64) platform. 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.22 seconds cpu time 0.02 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 **------------------------------------------------ ; 5 ** by Jean Roth Mon Jul 14 16:41:57 EDT 2014 6 ** This program reads the 1998 NCHS Multiple Cause of Death Data Data File ; 7 ** Report errors to jroth@nber.org ; 8 ** This program is distributed under the GNU GPL. ; 9 ** See end of this file and 10 ** http://www.gnu.org/licenses/ for details. ; 11 ** ----------------------------------------------- ; 12 13 * The following line should contain the directory 14 where the SAS file is to be stored ; 15 16 libname library "/homes/data/mortality/1998/"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/mortality/1998 17 18 * The following line should contain 19 the complete path and name of the raw data file. 20 On a PC, use backslashes in paths as in C:\ ; 21 22 FILENAME datafile pipe "unzip -p /homes/data/mortality/1998/mort1998us.zip "; 23 24 * The following line should contain the name of the SAS dataset ; 25 26 %let dataset = library.mort1998; 2 The SAS System 11:34 Tuesday, November 25, 2014 27 28 DATA &dataset ; 29 30 INFILE datafile LRECL = 20000 ; 31 attrib rectype length=3 label="Record Type"; 32 attrib restatus length=3 label="Resident Status"; 33 attrib stateoc length=$2 label="State of Occurrence"; 34 attrib countyoc length=$5 label="County of Occurrence"; 35 attrib region length=3 label="Region"; 36 attrib divstoc length=3 label="Division and State Subcode of Occurrence"; 37 attrib exstatoc length=$2 label="Expanded State of Occurrence Code"; 38 attrib staters length=$2 label="State of Residence"; 39 attrib countyrs length=$5 label="County of Residence"; 40 attrib cityrs length=$3 label="City of Residence"; 41 attrib popsize length=$1 label="Population Size of City of Residence"; 42 attrib metro length=$1 label="Metropolitan - Nonmetropolitan County of Residence"; 43 attrib regnres length=3 label="Region"; 44 attrib divstres length=3 label="Division and State Subcode of Residence"; 45 attrib exstares length=$2 label="Expanded State of Residence Code"; 46 attrib pmsares length=$3 label="NCHS PMSA/MSA of Residence"; 47 attrib popsizoc length=3 label="Population Size of County of Occurrence"; 48 attrib popsizrs length=$1 label="Population Size of County of Residence"; 49 attrib popmsa length=$1 label="PMSA/MSA Population Size"; 50 attrib educ length=3 label="Education"; 51 attrib educr length=3 label="Education recode"; 52 attrib monthdth length=3 label="Month of Death"; 53 attrib sex length=3 label="Sex"; 54 attrib race length=3 label="Detail Race"; 55 attrib racer3 length=3 label="Race Recode 3"; 56 attrib racer2 length=3 label="Race Recode 2"; 57 attrib age length=3 label="Detail Age"; 58 attrib ager52 length=3 label="Age Recode 52"; 59 attrib ager27 length=3 label="Age Recode 27"; 60 attrib ager12 length=3 label="Age Recode 12"; 61 attrib ager22 length=3 label="Infant Age Recode 22"; 62 attrib placdth length=3 label="Place of Death and Decedent"; 63 attrib marstat length=3 label="Marital Status"; 64 attrib statbth length=3 label="State of Birth"; 65 attrib hispanic length=3 label="Hispanic Origin"; 66 attrib hspanicr length=3 label="Hispanic Origin/Race Recode"; 67 attrib weekday length=3 label="Day of Week of Death"; 68 attrib industry length=3 label="Kind of Business or Industry"; 69 attrib occup length=3 label="Usual Occupation"; 70 attrib ucr52 length=3 label="52 Cause Recode"; 71 attrib fipscity length=$5 label="Place (city) of Residence (FIPS)"; 72 attrib year length=4 label="Current Data Year"; 73 attrib fipssto length=$2 label="State of Occurrence (FIPS)"; 74 attrib fipsctyo length=$5 label="County of Occurrence (FIPS)"; 75 attrib fipsstr length=$2 label="State of Residence (FIPS)"; 76 attrib fipsctyr length=$5 label="County of Residence (FIPS)"; 77 attrib fipspmsa length=$4 label="PMSA/MSA of Residence (FIPS)"; 78 attrib fipscmsa length=$2 label="CMSA of Residence (FIPS)"; 79 attrib injwork length=3 label="Injury at Work"; 80 attrib raceimp length=3 label="Race Imputation Flag"; 81 attrib ageflag length=3 label="Age Substitution Flag"; 82 attrib accident length=3 label="Place of Accident for Causes E850-E869 and E880-E928"; 83 attrib ucod length=$4 label="ICD Code (9th Revision)"; 84 attrib ucr282 length=4 label="282 Cause Recode"; 3 The SAS System 11:34 Tuesday, November 25, 2014 85 attrib ucr72 length=3 label="72 Cause Recode"; 86 attrib ucr61 length=3 label="61 Cause Recode"; 87 attrib ucr34 length=3 label="34 Cause Recode"; 88 attrib eanum length=3 label="Number of Entity-Axis Conditions"; 89 attrib econdp_1 length=3 label=""; 90 attrib econds_1 length=$1 label=""; 91 attrib enicon_1 length=$4 label=""; 92 attrib enifla_1 length=$1 label=""; 93 attrib econdp_2 length=3 label=""; 94 attrib econds_2 length=$1 label=""; 95 attrib enicon_2 length=$4 label=""; 96 attrib enifla_2 length=$1 label=""; 97 attrib econdp_3 length=3 label=""; 98 attrib econds_3 length=$1 label=""; 99 attrib enicon_3 length=$4 label=""; 100 attrib enifla_3 length=$1 label=""; 101 attrib econdp_4 length=3 label=""; 102 attrib econds_4 length=$1 label=""; 103 attrib enicon_4 length=$4 label=""; 104 attrib enifla_4 length=$1 label=""; 105 attrib econdp_5 length=3 label=""; 106 attrib econds_5 length=$1 label=""; 107 attrib enicon_5 length=$4 label=""; 108 attrib enifla_5 length=$1 label=""; 109 attrib econdp_6 length=3 label=""; 110 attrib econds_6 length=$1 label=""; 111 attrib enicon_6 length=$4 label=""; 112 attrib enifla_6 length=$1 label=""; 113 attrib econdp_7 length=3 label=""; 114 attrib econds_7 length=$1 label=""; 115 attrib enicon_7 length=$4 label=""; 116 attrib enifla_7 length=$1 label=""; 117 attrib econdp_8 length=3 label=""; 118 attrib econds_8 length=$1 label=""; 119 attrib enicon_8 length=$4 label=""; 120 attrib enifla_8 length=$1 label=""; 121 attrib econdp_9 length=3 label=""; 122 attrib econds_9 length=$1 label=""; 123 attrib enicon_9 length=$4 label=""; 124 attrib enifla_9 length=$1 label=""; 125 attrib econdp_10 length=3 label=""; 126 attrib econds_10 length=$1 label=""; 127 attrib enicon_10 length=$4 label=""; 128 attrib enifla_10 length=$1 label=""; 129 attrib econdp_11 length=3 label=""; 130 attrib econds_11 length=$1 label=""; 131 attrib enicon_11 length=$4 label=""; 132 attrib enifla_11 length=$1 label=""; 133 attrib econdp_12 length=3 label=""; 134 attrib econds_12 length=$1 label=""; 135 attrib enicon_12 length=$4 label=""; 136 attrib enifla_12 length=$1 label=""; 137 attrib econdp_13 length=3 label=""; 138 attrib econds_13 length=$1 label=""; 139 attrib enicon_13 length=$4 label=""; 140 attrib enifla_13 length=$1 label=""; 141 attrib econdp_14 length=3 label=""; 142 attrib econds_14 length=$1 label=""; 4 The SAS System 11:34 Tuesday, November 25, 2014 143 attrib enicon_14 length=$4 label=""; 144 attrib enifla_14 length=$1 label=""; 145 attrib econdp_15 length=3 label=""; 146 attrib econds_15 length=$1 label=""; 147 attrib enicon_15 length=$4 label=""; 148 attrib enifla_15 length=$1 label=""; 149 attrib econdp_16 length=3 label=""; 150 attrib econds_16 length=$1 label=""; 151 attrib enicon_16 length=$4 label=""; 152 attrib enifla_16 length=$1 label=""; 153 attrib econdp_17 length=3 label=""; 154 attrib econds_17 length=$1 label=""; 155 attrib enicon_17 length=$4 label=""; 156 attrib enifla_17 length=$1 label=""; 157 attrib econdp_18 length=3 label=""; 158 attrib econds_18 length=$1 label=""; 159 attrib enicon_18 length=$4 label=""; 160 attrib enifla_18 length=$1 label=""; 161 attrib econdp_19 length=3 label=""; 162 attrib econds_19 length=$1 label=""; 163 attrib enicon_19 length=$4 label=""; 164 attrib enifla_19 length=$1 label=""; 165 attrib econdp_20 length=3 label=""; 166 attrib econds_20 length=$1 label=""; 167 attrib enicon_20 length=$4 label=""; 168 attrib enifla_20 length=$1 label=""; 169 attrib ranum length=3 label="Number of Record-Axis Conditions"; 170 attrib record_1 length=$4 label="Condition"; 171 attrib rnifla_1 length=3 label="Nature of Injury Flag and Condition"; 172 attrib record_2 length=$4 label="Condition"; 173 attrib rnifla_2 length=3 label="Nature of Injury Flag and Condition"; 174 attrib record_3 length=$4 label="Condition"; 175 attrib rnifla_3 length=3 label="Nature of Injury Flag and Condition"; 176 attrib record_4 length=$4 label="Condition"; 177 attrib rnifla_4 length=3 label="Nature of Injury Flag and Condition"; 178 attrib record_5 length=$4 label="Condition"; 179 attrib rnifla_5 length=3 label="Nature of Injury Flag and Condition"; 180 attrib record_6 length=$4 label="Condition"; 181 attrib rnifla_6 length=3 label="Nature of Injury Flag and Condition"; 182 attrib record_7 length=$4 label="Condition"; 183 attrib rnifla_7 length=3 label="Nature of Injury Flag and Condition"; 184 attrib record_8 length=$4 label="Condition"; 185 attrib rnifla_8 length=3 label="Nature of Injury Flag and Condition"; 186 attrib record_9 length=$4 label="Condition"; 187 attrib rnifla_9 length=3 label="Nature of Injury Flag and Condition"; 188 attrib record_10 length=$4 label="Condition"; 189 attrib rnifla_10 length=3 label="Nature of Injury Flag and Condition"; 190 attrib record_11 length=$4 label="Condition"; 191 attrib rnifla_11 length=3 label="Nature of Injury Flag and Condition"; 192 attrib record_12 length=$4 label="Condition"; 193 attrib rnifla_12 length=3 label="Nature of Injury Flag and Condition"; 194 attrib record_13 length=$4 label="Condition"; 195 attrib rnifla_13 length=3 label="Nature of Injury Flag and Condition"; 196 attrib record_14 length=$4 label="Condition"; 197 attrib rnifla_14 length=3 label="Nature of Injury Flag and Condition"; 198 attrib record_15 length=$4 label="Condition"; 199 attrib rnifla_15 length=3 label="Nature of Injury Flag and Condition"; 200 attrib record_16 length=$4 label="Condition"; 5 The SAS System 11:34 Tuesday, November 25, 2014 201 attrib rnifla_16 length=3 label="Nature of Injury Flag and Condition"; 202 attrib record_17 length=$4 label="Condition"; 203 attrib rnifla_17 length=3 label="Nature of Injury Flag and Condition"; 204 attrib record_18 length=$4 label="Condition"; 205 attrib rnifla_18 length=3 label="Nature of Injury Flag and Condition"; 206 attrib record_19 length=$4 label="Condition"; 207 attrib rnifla_19 length=3 label="Nature of Injury Flag and Condition"; 208 attrib record_20 length=$4 label="Condition"; 209 attrib rnifla_20 length=3 label="Nature of Injury Flag and Condition"; 210 211 212 INPUT 213 214 @19 rectype 1. 215 @20 restatus 1. 216 @21 stateoc $2. 217 @21 countyoc $5. 218 @26 region 1. 219 @27 divstoc 2. 220 @29 exstatoc $2. 221 @31 staters $2. 222 @31 countyrs $5. 223 @36 cityrs $3. 224 @39 popsize $1. 225 @40 metro $1. 226 @41 regnres 1. 227 @42 divstres 2. 228 @44 exstares $2. 229 @46 pmsares $3. 230 @49 popsizoc 1. 231 @50 popsizrs $1. 232 @51 popmsa $1. 233 @52 educ 2. 234 @54 educr 1. 235 @55 monthdth 2. 236 @59 sex 1. 237 @60 race 2. 238 @62 racer3 1. 239 @63 racer2 1. 240 @64 age 3. 241 @67 ager52 2. 242 @69 ager27 2. 243 @71 ager12 2. 244 @73 ager22 2. 245 @75 placdth 1. 246 @77 marstat 1. 247 @78 statbth 2. 248 @80 hispanic 2. 249 @82 hspanicr 1. 250 @83 weekday 1. 251 @85 industry 3. 252 @88 occup 3. 253 @91 ucr52 3. 254 @97 fipscity $5. 255 @115 year 4. 256 @119 fipssto $2. 257 @119 fipsctyo $5. 258 @124 fipsstr $2. 6 The SAS System 11:34 Tuesday, November 25, 2014 259 @124 fipsctyr $5. 260 @129 fipspmsa $4. 261 @134 fipscmsa $2. 262 @136 injwork 1. 263 @137 raceimp 1. 264 @138 ageflag 1. 265 @141 accident 1. 266 @142 ucod $4. 267 @146 ucr282 5. 268 @151 ucr72 3. 269 @154 ucr61 3. 270 @157 ucr34 3. 271 @160 eanum 2. 272 @162 econdp_1 1. 273 @163 econds_1 $1. 274 @164 enicon_1 $4. 275 @168 enifla_1 $1. 276 @169 econdp_2 1. 277 @170 econds_2 $1. 278 @171 enicon_2 $4. 279 @175 enifla_2 $1. 280 @176 econdp_3 1. 281 @177 econds_3 $1. 282 @178 enicon_3 $4. 283 @182 enifla_3 $1. 284 @183 econdp_4 1. 285 @184 econds_4 $1. 286 @185 enicon_4 $4. 287 @189 enifla_4 $1. 288 @190 econdp_5 1. 289 @191 econds_5 $1. 290 @192 enicon_5 $4. 291 @196 enifla_5 $1. 292 @197 econdp_6 1. 293 @198 econds_6 $1. 294 @199 enicon_6 $4. 295 @203 enifla_6 $1. 296 @204 econdp_7 1. 297 @205 econds_7 $1. 298 @206 enicon_7 $4. 299 @210 enifla_7 $1. 300 @211 econdp_8 1. 301 @212 econds_8 $1. 302 @213 enicon_8 $4. 303 @217 enifla_8 $1. 304 @218 econdp_9 1. 305 @219 econds_9 $1. 306 @220 enicon_9 $4. 307 @224 enifla_9 $1. 308 @225 econdp_10 1. 309 @226 econds_10 $1. 310 @227 enicon_10 $4. 311 @231 enifla_10 $1. 312 @232 econdp_11 1. 313 @233 econds_11 $1. 314 @234 enicon_11 $4. 315 @238 enifla_11 $1. 316 @239 econdp_12 1. 7 The SAS System 11:34 Tuesday, November 25, 2014 317 @240 econds_12 $1. 318 @241 enicon_12 $4. 319 @245 enifla_12 $1. 320 @246 econdp_13 1. 321 @247 econds_13 $1. 322 @248 enicon_13 $4. 323 @252 enifla_13 $1. 324 @253 econdp_14 1. 325 @254 econds_14 $1. 326 @255 enicon_14 $4. 327 @259 enifla_14 $1. 328 @260 econdp_15 1. 329 @261 econds_15 $1. 330 @262 enicon_15 $4. 331 @266 enifla_15 $1. 332 @267 econdp_16 1. 333 @268 econds_16 $1. 334 @269 enicon_16 $4. 335 @273 enifla_16 $1. 336 @274 econdp_17 1. 337 @275 econds_17 $1. 338 @276 enicon_17 $4. 339 @280 enifla_17 $1. 340 @281 econdp_18 1. 341 @282 econds_18 $1. 342 @283 enicon_18 $4. 343 @287 enifla_18 $1. 344 @288 econdp_19 1. 345 @289 econds_19 $1. 346 @290 enicon_19 $4. 347 @294 enifla_19 $1. 348 @295 econdp_20 1. 349 @296 econds_20 $1. 350 @297 enicon_20 $4. 351 @301 enifla_20 $1. 352 @338 ranum 2. 353 @341 record_1 $4. 354 @345 rnifla_1 1. 355 @346 record_2 $4. 356 @350 rnifla_2 1. 357 @351 record_3 $4. 358 @355 rnifla_3 1. 359 @356 record_4 $4. 360 @360 rnifla_4 1. 361 @361 record_5 $4. 362 @365 rnifla_5 1. 363 @366 record_6 $4. 364 @370 rnifla_6 1. 365 @371 record_7 $4. 366 @375 rnifla_7 1. 367 @376 record_8 $4. 368 @380 rnifla_8 1. 369 @381 record_9 $4. 370 @385 rnifla_9 1. 371 @386 record_10 $4. 372 @390 rnifla_10 1. 373 @391 record_11 $4. 374 @395 rnifla_11 1. 8 The SAS System 11:34 Tuesday, November 25, 2014 375 @396 record_12 $4. 376 @400 rnifla_12 1. 377 @401 record_13 $4. 378 @405 rnifla_13 1. 379 @406 record_14 $4. 380 @410 rnifla_14 1. 381 @411 record_15 $4. 382 @415 rnifla_15 1. 383 @416 record_16 $4. 384 @420 rnifla_16 1. 385 @421 record_17 $4. 386 @425 rnifla_17 1. 387 @426 record_18 $4. 388 @430 rnifla_18 1. 389 @431 record_19 $4. 390 @435 rnifla_19 1. 391 @436 record_20 $4. 392 @440 rnifla_20 1. 393 ; 394 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1998/mort1998us.zip " NOTE: 2340708 records were read from the infile DATAFILE. The minimum record length was 441. The maximum record length was 441. NOTE: The data set LIBRARY.MORT1998 has 2340708 observations and 179 variables. NOTE: DATA statement used (Total process time): real time 23.78 seconds cpu time 16.04 seconds 395 proc print data=&dataset. (obs=6); 396 NOTE: There were 6 observations read from the data set LIBRARY.MORT1998. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.02 seconds 397 proc contents data=&dataset.; 398 399 400 ** Copyright 2014 shared by the National Bureau of Economic Research and Jean Roth ; 401 ** 402 ** National Bureau of Economic Research. ; 403 ** 1050 Massachusetts Avenue ; 404 ** Cambridge, MA 02138 ; 405 ** jroth@nber.org ; 406 ** 407 ** This program and all programs referenced in it are free software. You ; 408 ** can redistribute the program or modify it under the terms of the GNU ; 409 ** General Public License as published by the Free Software Foundation; ; 410 ** either version 2 of the License, or (at your option) any later version. ; 411 ** 9 The SAS System 11:34 Tuesday, November 25, 2014 412 ** This program is distributed in the hope that it will be useful, ; 413 ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; 414 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; 415 ** GNU General Public License for more details. ; 416 ** 417 ** You should have received a copy of the GNU General Public License ; 418 ** along with this program -- if not, write to the Free Software ; 419 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; 420 ** USA. ; 421 NOTE: The PROCEDURE CONTENTS printed pages 3-6. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.00 seconds cpu time 0.01 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 24.08 seconds cpu time 16.09 seconds