1 The SAS System 11:33 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.18 seconds cpu time 0.02 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 **------------------------------------------------ ; 5 ** by Jean Roth Mon Jul 14 16:47:41 EDT 2014 6 ** This program reads the 2000 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/2000/"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/mortality/2000 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/2000/mort2000us.zip "; 23 24 * The following line should contain the name of the SAS dataset ; 25 26 %let dataset = library.mort2000; 2 The SAS System 11:33 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=$2 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 fipscity length=$5 label="Place (city) of Residence (FIPS)"; 69 attrib year length=4 label="Current Data Year"; 70 attrib fipssto length=$2 label="State of Occurrence (FIPS)"; 71 attrib fipsctyo length=$5 label="County of Occurrence (FIPS)"; 72 attrib fipsstr length=$2 label="State of Residence (FIPS)"; 73 attrib fipsctyr length=$5 label="County of Residence (FIPS)"; 74 attrib fipspmsa length=$4 label="PMSA/MSA of Residence (FIPS)"; 75 attrib fipscmsa length=$2 label="CMSA of Residence (FIPS)"; 76 attrib injwork length=3 label="Injury at Work"; 77 attrib raceimp length=3 label="Race Imputation Flag"; 78 attrib ageflag length=3 label="Age Substitution Flag"; 79 attrib mandeath length=3 label="Manner of death"; 80 attrib activity length=3 label="Activity code"; 81 attrib injury length=3 label="Place of Injury for Causes W00-Y34 except Y06.- and Y07.-"; 82 attrib ucod length=$4 label="ICD Code (10th Revision)"; 83 attrib ucr358 length=3 label="358 Cause Recode"; 84 attrib ucr113 length=3 label="113 Cause Recode"; 3 The SAS System 11:33 Tuesday, November 25, 2014 85 attrib ucr130 length=3 label="130 Cause Recode"; 86 attrib ucr39 length=3 label="39 Cause Recode"; 87 attrib eanum length=3 label="Number of Entity-Axis Conditions"; 88 attrib econdp_1 length=3 label=""; 89 attrib econds_1 length=$1 label=""; 90 attrib enicon_1 length=$4 label=""; 91 attrib econdp_2 length=3 label=""; 92 attrib econds_2 length=$1 label=""; 93 attrib enicon_2 length=$4 label=""; 94 attrib econdp_3 length=3 label=""; 95 attrib econds_3 length=$1 label=""; 96 attrib enicon_3 length=$4 label=""; 97 attrib econdp_4 length=3 label=""; 98 attrib econds_4 length=$1 label=""; 99 attrib enicon_4 length=$4 label=""; 100 attrib econdp_5 length=3 label=""; 101 attrib econds_5 length=$1 label=""; 102 attrib enicon_5 length=$4 label=""; 103 attrib econdp_6 length=3 label=""; 104 attrib econds_6 length=$1 label=""; 105 attrib enicon_6 length=$4 label=""; 106 attrib econdp_7 length=3 label=""; 107 attrib econds_7 length=$1 label=""; 108 attrib enicon_7 length=$4 label=""; 109 attrib econdp_8 length=3 label=""; 110 attrib econds_8 length=$1 label=""; 111 attrib enicon_8 length=$4 label=""; 112 attrib econdp_9 length=3 label=""; 113 attrib econds_9 length=$1 label=""; 114 attrib enicon_9 length=$4 label=""; 115 attrib econdp_10 length=3 label=""; 116 attrib econds_10 length=$1 label=""; 117 attrib enicon_10 length=$4 label=""; 118 attrib econdp_11 length=3 label=""; 119 attrib econds_11 length=$1 label=""; 120 attrib enicon_11 length=$4 label=""; 121 attrib econdp_12 length=3 label=""; 122 attrib econds_12 length=$1 label=""; 123 attrib enicon_12 length=$4 label=""; 124 attrib econdp_13 length=3 label=""; 125 attrib econds_13 length=$1 label=""; 126 attrib enicon_13 length=$4 label=""; 127 attrib econdp_14 length=3 label=""; 128 attrib econds_14 length=$1 label=""; 129 attrib enicon_14 length=$4 label=""; 130 attrib econdp_15 length=3 label=""; 131 attrib econds_15 length=$1 label=""; 132 attrib enicon_15 length=$4 label=""; 133 attrib econdp_16 length=3 label=""; 134 attrib econds_16 length=$1 label=""; 135 attrib enicon_16 length=$4 label=""; 136 attrib econdp_17 length=3 label=""; 137 attrib econds_17 length=$1 label=""; 138 attrib enicon_17 length=$4 label=""; 139 attrib econdp_18 length=3 label=""; 140 attrib econds_18 length=$1 label=""; 141 attrib enicon_18 length=$4 label=""; 142 attrib econdp_19 length=3 label=""; 4 The SAS System 11:33 Tuesday, November 25, 2014 143 attrib econds_19 length=$1 label=""; 144 attrib enicon_19 length=$4 label=""; 145 attrib econdp_20 length=3 label=""; 146 attrib econds_20 length=$1 label=""; 147 attrib enicon_20 length=$4 label=""; 148 attrib ranum length=3 label="Number of Record-Axis Conditions"; 149 attrib record_1 length=$4 label="Condition"; 150 attrib rnifla_1 length=3 label="Nature of Injury Flag and Condition"; 151 attrib record_2 length=$4 label="Condition"; 152 attrib rnifla_2 length=3 label="Nature of Injury Flag and Condition"; 153 attrib record_3 length=$4 label="Condition"; 154 attrib rnifla_3 length=3 label="Nature of Injury Flag and Condition"; 155 attrib record_4 length=$4 label="Condition"; 156 attrib rnifla_4 length=3 label="Nature of Injury Flag and Condition"; 157 attrib record_5 length=$4 label="Condition"; 158 attrib rnifla_5 length=3 label="Nature of Injury Flag and Condition"; 159 attrib record_6 length=$4 label="Condition"; 160 attrib rnifla_6 length=3 label="Nature of Injury Flag and Condition"; 161 attrib record_7 length=$4 label="Condition"; 162 attrib rnifla_7 length=3 label="Nature of Injury Flag and Condition"; 163 attrib record_8 length=$4 label="Condition"; 164 attrib rnifla_8 length=3 label="Nature of Injury Flag and Condition"; 165 attrib record_9 length=$4 label="Condition"; 166 attrib rnifla_9 length=3 label="Nature of Injury Flag and Condition"; 167 attrib record_10 length=$4 label="Condition"; 168 attrib rnifla_10 length=3 label="Nature of Injury Flag and Condition"; 169 attrib record_11 length=$4 label="Condition"; 170 attrib rnifla_11 length=3 label="Nature of Injury Flag and Condition"; 171 attrib record_12 length=$4 label="Condition"; 172 attrib rnifla_12 length=3 label="Nature of Injury Flag and Condition"; 173 attrib record_13 length=$4 label="Condition"; 174 attrib rnifla_13 length=3 label="Nature of Injury Flag and Condition"; 175 attrib record_14 length=$4 label="Condition"; 176 attrib rnifla_14 length=3 label="Nature of Injury Flag and Condition"; 177 attrib record_15 length=$4 label="Condition"; 178 attrib rnifla_15 length=3 label="Nature of Injury Flag and Condition"; 179 attrib record_16 length=$4 label="Condition"; 180 attrib rnifla_16 length=3 label="Nature of Injury Flag and Condition"; 181 attrib record_17 length=$4 label="Condition"; 182 attrib rnifla_17 length=3 label="Nature of Injury Flag and Condition"; 183 attrib record_18 length=$4 label="Condition"; 184 attrib rnifla_18 length=3 label="Nature of Injury Flag and Condition"; 185 attrib record_19 length=$4 label="Condition"; 186 attrib rnifla_19 length=3 label="Nature of Injury Flag and Condition"; 187 attrib record_20 length=$4 label="Condition"; 188 attrib rnifla_20 length=3 label="Nature of Injury Flag and Condition"; 189 190 191 INPUT 192 193 @19 rectype 1. 194 @20 restatus 1. 195 @21 stateoc $2. 196 @21 countyoc $5. 197 @26 region 1. 198 @27 divstoc $2. 199 @29 exstatoc $2. 200 @31 staters $2. 5 The SAS System 11:33 Tuesday, November 25, 2014 201 @31 countyrs $5. 202 @36 cityrs $3. 203 @39 popsize $1. 204 @40 metro $1. 205 @41 regnres 1. 206 @42 divstres 2. 207 @44 exstares $2. 208 @46 pmsares $3. 209 @49 popsizoc 1. 210 @50 popsizrs $1. 211 @51 popmsa $1. 212 @52 educ 2. 213 @54 educr 1. 214 @55 monthdth 2. 215 @59 sex 1. 216 @60 race 2. 217 @62 racer3 1. 218 @63 racer2 1. 219 @64 age 3. 220 @67 ager52 2. 221 @69 ager27 2. 222 @71 ager12 2. 223 @73 ager22 2. 224 @75 placdth 1. 225 @77 marstat 1. 226 @78 statbth 2. 227 @80 hispanic 2. 228 @82 hspanicr 1. 229 @83 weekday 1. 230 @97 fipscity $5. 231 @115 year 4. 232 @119 fipssto $2. 233 @119 fipsctyo $5. 234 @124 fipsstr $2. 235 @124 fipsctyr $5. 236 @129 fipspmsa $4. 237 @134 fipscmsa $2. 238 @136 injwork 1. 239 @137 raceimp 1. 240 @138 ageflag 1. 241 @139 mandeath 1. 242 @140 activity 1. 243 @141 injury 1. 244 @142 ucod $4. 245 @146 ucr358 3. 246 @151 ucr113 3. 247 @154 ucr130 3. 248 @157 ucr39 2. 249 @160 eanum 2. 250 @162 econdp_1 1. 251 @163 econds_1 $1. 252 @164 enicon_1 $4. 253 @169 econdp_2 1. 254 @170 econds_2 $1. 255 @171 enicon_2 $4. 256 @176 econdp_3 1. 257 @177 econds_3 $1. 258 @178 enicon_3 $4. 6 The SAS System 11:33 Tuesday, November 25, 2014 259 @183 econdp_4 1. 260 @184 econds_4 $1. 261 @185 enicon_4 $4. 262 @190 econdp_5 1. 263 @191 econds_5 $1. 264 @192 enicon_5 $4. 265 @197 econdp_6 1. 266 @198 econds_6 $1. 267 @199 enicon_6 $4. 268 @204 econdp_7 1. 269 @205 econds_7 $1. 270 @206 enicon_7 $4. 271 @211 econdp_8 1. 272 @212 econds_8 $1. 273 @213 enicon_8 $4. 274 @218 econdp_9 1. 275 @219 econds_9 $1. 276 @220 enicon_9 $4. 277 @225 econdp_10 1. 278 @226 econds_10 $1. 279 @227 enicon_10 $4. 280 @232 econdp_11 1. 281 @233 econds_11 $1. 282 @234 enicon_11 $4. 283 @239 econdp_12 1. 284 @240 econds_12 $1. 285 @241 enicon_12 $4. 286 @246 econdp_13 1. 287 @247 econds_13 $1. 288 @248 enicon_13 $4. 289 @253 econdp_14 1. 290 @254 econds_14 $1. 291 @255 enicon_14 $4. 292 @260 econdp_15 1. 293 @261 econds_15 $1. 294 @262 enicon_15 $4. 295 @267 econdp_16 1. 296 @268 econds_16 $1. 297 @269 enicon_16 $4. 298 @274 econdp_17 1. 299 @275 econds_17 $1. 300 @276 enicon_17 $4. 301 @281 econdp_18 1. 302 @282 econds_18 $1. 303 @283 enicon_18 $4. 304 @288 econdp_19 1. 305 @289 econds_19 $1. 306 @290 enicon_19 $4. 307 @295 econdp_20 1. 308 @296 econds_20 $1. 309 @297 enicon_20 $4. 310 @338 ranum 2. 311 @341 record_1 $4. 312 @345 rnifla_1 1. 313 @346 record_2 $4. 314 @350 rnifla_2 1. 315 @351 record_3 $4. 316 @355 rnifla_3 1. 7 The SAS System 11:33 Tuesday, November 25, 2014 317 @356 record_4 $4. 318 @360 rnifla_4 1. 319 @361 record_5 $4. 320 @365 rnifla_5 1. 321 @366 record_6 $4. 322 @370 rnifla_6 1. 323 @371 record_7 $4. 324 @375 rnifla_7 1. 325 @376 record_8 $4. 326 @380 rnifla_8 1. 327 @381 record_9 $4. 328 @385 rnifla_9 1. 329 @386 record_10 $4. 330 @390 rnifla_10 1. 331 @391 record_11 $4. 332 @395 rnifla_11 1. 333 @396 record_12 $4. 334 @400 rnifla_12 1. 335 @401 record_13 $4. 336 @405 rnifla_13 1. 337 @406 record_14 $4. 338 @410 rnifla_14 1. 339 @411 record_15 $4. 340 @415 rnifla_15 1. 341 @416 record_16 $4. 342 @420 rnifla_16 1. 343 @421 record_17 $4. 344 @425 rnifla_17 1. 345 @426 record_18 $4. 346 @430 rnifla_18 1. 347 @431 record_19 $4. 348 @435 rnifla_19 1. 349 @436 record_20 $4. 350 @440 rnifla_20 1. 351 ; 352 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/2000/mort2000us.zip " NOTE: 2407193 records were read from the infile DATAFILE. The minimum record length was 441. The maximum record length was 441. NOTE: The data set LIBRARY.MORT2000 has 2407193 observations and 158 variables. NOTE: DATA statement used (Total process time): real time 40.41 seconds cpu time 15.38 seconds 353 proc print data=&dataset. (obs=6); 354 NOTE: There were 6 observations read from the data set LIBRARY.MORT2000. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.01 seconds 8 The SAS System 11:33 Tuesday, November 25, 2014 355 proc contents data=&dataset.; 356 357 358 ** Copyright 2014 shared by the National Bureau of Economic Research and Jean Roth ; 359 ** 360 ** National Bureau of Economic Research. ; 361 ** 1050 Massachusetts Avenue ; 362 ** Cambridge, MA 02138 ; 363 ** jroth@nber.org ; 364 ** 365 ** This program and all programs referenced in it are free software. You ; 366 ** can redistribute the program or modify it under the terms of the GNU ; 367 ** General Public License as published by the Free Software Foundation; ; 368 ** either version 2 of the License, or (at your option) any later version. ; 369 ** 370 ** This program is distributed in the hope that it will be useful, ; 371 ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; 372 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; 373 ** GNU General Public License for more details. ; 374 ** 375 ** You should have received a copy of the GNU General Public License ; 376 ** along with this program -- if not, write to the Free Software ; 377 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; 378 ** USA. ; 379 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 40.65 seconds cpu time 15.42 seconds