1 The SAS System 11:31 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 3.47 seconds cpu time 0.03 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 **------------------------------------------------ ; 5 ** by Jean Roth Mon Jul 14 16:56:08 EDT 2014 6 ** This program reads the 2003 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/2003/"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/mortality/2003 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/2003/mort2003us.zip "; 23 24 * The following line should contain the name of the SAS dataset ; 25 26 %let dataset = library.mort2003; 2 The SAS System 11:31 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 exstatoc length=$2 label="Expanded State of Occurrence Code"; 36 attrib popsizoc length=3 label="Population Size of County of Occurrence"; 37 attrib staters length=$2 label="State of Residence"; 38 attrib statersr length=$2 label="State of Residence Recode"; 39 attrib countyrs length=$5 label="County of Residence"; 40 attrib cityrs length=$5 label="City of Residence (FIPS)"; 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 exstares length=$2 label="Expanded State of Residence Code"; 44 attrib pmsares length=$4 label="PMSA/MSA of Residence (FIPS)"; 45 attrib popsizrs length=$1 label="Population Size of County of Residence"; 46 attrib popmsa length=$1 label="PMSA/MSA Population Size"; 47 attrib cmsares length=3 label="CMSA of Residence (FIPS)"; 48 attrib statbth length=$2 label="State of Birth (FIPS)"; 49 attrib statbthr length=$2 label="State of Birth Recode"; 50 attrib educ89 length=3 label="Education (1989 revision)"; 51 attrib educ length=3 label="Education (2003 revision)"; 52 attrib educflag length=3 label="Education reporting flag"; 53 attrib monthdth length=3 label="Month of Death"; 54 attrib sex length=$1 label="Sex"; 55 attrib age length=4 label="Detail Age"; 56 attrib ageflag length=3 label="Age Substitution Flag"; 57 attrib ager52 length=3 label="Age Recode 52"; 58 attrib ager27 length=3 label="Age Recode 27"; 59 attrib ager12 length=3 label="Age Recode 12"; 60 attrib ager22 length=3 label="Infant Age Recode 22"; 61 attrib placdth length=3 label="Place of Death and Decedent's Status"; 62 attrib marstat length=$1 label="Marital Status"; 63 attrib weekday length=3 label="Day of Week of Death"; 64 attrib year length=4 label="Current Data Year"; 65 attrib injwork length=$1 label="Injury at Work"; 66 attrib mandeath length=3 label="Manner of death"; 67 attrib methdisp length=$1 label="Method of disposition"; 68 attrib autopsy length=$1 label="Autopsy"; 69 attrib activity length=3 label="Activity code"; 70 attrib injury length=3 label="Place of Injury for Causes W00-Y34 except Y06.- and Y07.-"; 71 attrib ucod length=$4 label="ICD Code (10th Revision)"; 72 attrib ucr358 length=3 label="358 Cause Recode"; 73 attrib ucr113 length=3 label="113 Cause Recode"; 74 attrib ucr130 length=3 label="130 Cause Recode"; 75 attrib ucr39 length=3 label="39 Cause Recode"; 76 attrib eanum length=3 label="Number of Entity-Axis Conditions"; 77 attrib econdp_1 length=3 label="Part/line number on certificate"; 78 attrib econds_1 length=3 label="Sequence of condition within part/line"; 79 attrib enicon_1 length=$4 label="Condition code"; 80 attrib econdp_2 length=3 label="Part/line number on certificate"; 81 attrib econds_2 length=3 label="Sequence of condition within part/line"; 82 attrib enicon_2 length=$4 label="Condition code"; 83 attrib econdp_3 length=3 label="Part/line number on certificate"; 84 attrib econds_3 length=3 label="Sequence of condition within part/line"; 3 The SAS System 11:31 Tuesday, November 25, 2014 85 attrib enicon_3 length=$4 label="Condition code"; 86 attrib econdp_4 length=3 label="Part/line number on certificate"; 87 attrib econds_4 length=3 label="Sequence of condition within part/line"; 88 attrib enicon_4 length=$4 label="Condition code"; 89 attrib econdp_5 length=3 label="Part/line number on certificate"; 90 attrib econds_5 length=3 label="Sequence of condition within part/line"; 91 attrib enicon_5 length=$4 label="Condition code"; 92 attrib econdp_6 length=3 label="Part/line number on certificate"; 93 attrib econds_6 length=3 label="Sequence of condition within part/line"; 94 attrib enicon_6 length=$4 label="Condition code"; 95 attrib econdp_7 length=3 label="Part/line number on certificate"; 96 attrib econds_7 length=3 label="Sequence of condition within part/line"; 97 attrib enicon_7 length=$4 label="Condition code"; 98 attrib econdp_8 length=3 label="Part/line number on certificate"; 99 attrib econds_8 length=3 label="Sequence of condition within part/line"; 100 attrib enicon_8 length=$4 label="Condition code"; 101 attrib econdp_9 length=3 label="Part/line number on certificate"; 102 attrib econds_9 length=3 label="Sequence of condition within part/line"; 103 attrib enicon_9 length=$4 label="Condition code"; 104 attrib econdp_10 length=3 label="Part/line number on certificate"; 105 attrib econds_10 length=3 label="Sequence of condition within part/line"; 106 attrib enicon_10 length=$4 label="Condition code"; 107 attrib econdp_11 length=3 label="Part/line number on certificate"; 108 attrib econds_11 length=3 label="Sequence of condition within part/line"; 109 attrib enicon_11 length=$4 label="Condition code"; 110 attrib econdp_12 length=3 label="Part/line number on certificate"; 111 attrib econds_12 length=3 label="Sequence of condition within part/line"; 112 attrib enicon_12 length=$4 label="Condition code"; 113 attrib econdp_13 length=3 label="Part/line number on certificate"; 114 attrib econds_13 length=3 label="Sequence of condition within part/line"; 115 attrib enicon_13 length=$4 label="Condition code"; 116 attrib econdp_14 length=3 label="Part/line number on certificate"; 117 attrib econds_14 length=3 label="Sequence of condition within part/line"; 118 attrib enicon_14 length=$4 label="Condition code"; 119 attrib econdp_15 length=3 label="Part/line number on certificate"; 120 attrib econds_15 length=3 label="Sequence of condition within part/line"; 121 attrib enicon_15 length=$4 label="Condition code"; 122 attrib econdp_16 length=3 label="Part/line number on certificate"; 123 attrib econds_16 length=3 label="Sequence of condition within part/line"; 124 attrib enicon_16 length=$4 label="Condition code"; 125 attrib econdp_17 length=3 label="Part/line number on certificate"; 126 attrib econds_17 length=3 label="Sequence of condition within part/line"; 127 attrib enicon_17 length=$4 label="Condition code"; 128 attrib econdp_18 length=3 label="Part/line number on certificate"; 129 attrib econds_18 length=3 label="Sequence of condition within part/line"; 130 attrib enicon_18 length=$4 label="Condition code"; 131 attrib econdp_19 length=3 label="Part/line number on certificate"; 132 attrib econds_19 length=3 label="Sequence of condition within part/line"; 133 attrib enicon_19 length=$4 label="Condition code"; 134 attrib econdp_20 length=3 label="Part/line number on certificate"; 135 attrib econds_20 length=3 label="Sequence of condition within part/line"; 136 attrib enicon_20 length=$4 label="Condition code"; 137 attrib ranum length=3 label="Number of Record-Axis Conditions"; 138 attrib record_1 length=$4 label="Condition"; 139 attrib record_2 length=$4 label="Condition"; 140 attrib record_3 length=$4 label="Condition"; 141 attrib record_4 length=$4 label="Condition"; 142 attrib record_5 length=$4 label="Condition"; 4 The SAS System 11:31 Tuesday, November 25, 2014 143 attrib record_6 length=$4 label="Condition"; 144 attrib record_7 length=$4 label="Condition"; 145 attrib record_8 length=$4 label="Condition"; 146 attrib record_9 length=$4 label="Condition"; 147 attrib record_10 length=$4 label="Condition"; 148 attrib record_11 length=$4 label="Condition"; 149 attrib record_12 length=$4 label="Condition"; 150 attrib record_13 length=$4 label="Condition"; 151 attrib record_14 length=$4 label="Condition"; 152 attrib record_15 length=$4 label="Condition"; 153 attrib record_16 length=$4 label="Condition"; 154 attrib record_17 length=$4 label="Condition"; 155 attrib record_18 length=$4 label="Condition"; 156 attrib record_19 length=$4 label="Condition"; 157 attrib record_20 length=$4 label="Condition"; 158 attrib rnifla_20 length=3 label="Nature of Injury Flag and Condition"; 159 attrib race length=3 label="Detail Race"; 160 attrib brace length=3 label="Bridged Race"; 161 attrib raceimp length=3 label="Race Imputation Flag"; 162 attrib racer3 length=3 label="Race Recode 3"; 163 attrib racer2 length=3 label="Race Recode 2"; 164 attrib hispanic length=3 label="Hispanic Origin"; 165 attrib hspanicr length=3 label="Hispanic Origin/Race Recode"; 166 167 168 INPUT 169 170 @19 rectype 1. 171 @20 restatus 1. 172 @21 stateoc $2. 173 @21 countyoc $5. 174 @26 exstatoc $2. 175 @28 popsizoc 1. 176 @29 staters $2. 177 @33 statersr $2. 178 @33 countyrs $5. 179 @38 cityrs $5. 180 @43 popsize $1. 181 @44 metro $1. 182 @45 exstares $2. 183 @47 pmsares $4. 184 @51 popsizrs $1. 185 @52 popmsa $1. 186 @53 cmsares 2. 187 @55 statbth $2. 188 @59 statbthr $2. 189 @61 educ89 2. 190 @63 educ 1. 191 @64 educflag 1. 192 @65 monthdth 2. 193 @69 sex $1. 194 @70 age 4. 195 @74 ageflag 1. 196 @75 ager52 2. 197 @77 ager27 2. 198 @79 ager12 2. 199 @81 ager22 2. 200 @83 placdth 1. 5 The SAS System 11:31 Tuesday, November 25, 2014 201 @84 marstat $1. 202 @85 weekday 1. 203 @102 year 4. 204 @106 injwork $1. 205 @107 mandeath 1. 206 @108 methdisp $1. 207 @109 autopsy $1. 208 @144 activity 1. 209 @145 injury 1. 210 @146 ucod $4. 211 @150 ucr358 3. 212 @154 ucr113 3. 213 @157 ucr130 3. 214 @160 ucr39 2. 215 @163 eanum 2. 216 @165 econdp_1 1. 217 @166 econds_1 1. 218 @167 enicon_1 $4. 219 @172 econdp_2 1. 220 @173 econds_2 1. 221 @174 enicon_2 $4. 222 @179 econdp_3 1. 223 @180 econds_3 1. 224 @181 enicon_3 $4. 225 @186 econdp_4 1. 226 @187 econds_4 1. 227 @188 enicon_4 $4. 228 @193 econdp_5 1. 229 @194 econds_5 1. 230 @195 enicon_5 $4. 231 @200 econdp_6 1. 232 @201 econds_6 1. 233 @202 enicon_6 $4. 234 @207 econdp_7 1. 235 @208 econds_7 1. 236 @209 enicon_7 $4. 237 @214 econdp_8 1. 238 @215 econds_8 1. 239 @216 enicon_8 $4. 240 @221 econdp_9 1. 241 @222 econds_9 1. 242 @223 enicon_9 $4. 243 @228 econdp_10 1. 244 @229 econds_10 1. 245 @230 enicon_10 $4. 246 @235 econdp_11 1. 247 @236 econds_11 1. 248 @237 enicon_11 $4. 249 @242 econdp_12 1. 250 @243 econds_12 1. 251 @244 enicon_12 $4. 252 @249 econdp_13 1. 253 @250 econds_13 1. 254 @251 enicon_13 $4. 255 @256 econdp_14 1. 256 @257 econds_14 1. 257 @258 enicon_14 $4. 258 @263 econdp_15 1. 6 The SAS System 11:31 Tuesday, November 25, 2014 259 @264 econds_15 1. 260 @265 enicon_15 $4. 261 @270 econdp_16 1. 262 @271 econds_16 1. 263 @272 enicon_16 $4. 264 @277 econdp_17 1. 265 @278 econds_17 1. 266 @279 enicon_17 $4. 267 @284 econdp_18 1. 268 @285 econds_18 1. 269 @286 enicon_18 $4. 270 @291 econdp_19 1. 271 @292 econds_19 1. 272 @293 enicon_19 $4. 273 @298 econdp_20 1. 274 @299 econds_20 1. 275 @300 enicon_20 $4. 276 @341 ranum 2. 277 @344 record_1 $4. 278 @349 record_2 $4. 279 @354 record_3 $4. 280 @359 record_4 $4. 281 @364 record_5 $4. 282 @369 record_6 $4. 283 @374 record_7 $4. 284 @379 record_8 $4. 285 @384 record_9 $4. 286 @389 record_10 $4. 287 @394 record_11 $4. 288 @399 record_12 $4. 289 @404 record_13 $4. 290 @409 record_14 $4. 291 @414 record_15 $4. 292 @419 record_16 $4. 293 @424 record_17 $4. 294 @429 record_18 $4. 295 @434 record_19 $4. 296 @439 record_20 $4. 297 @440 rnifla_20 1. 298 @445 race 2. 299 @447 brace 1. 300 @448 raceimp 1. 301 @449 racer3 1. 302 @450 racer2 1. 303 @484 hispanic 3. 304 @488 hspanicr 1. 305 ; 306 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/2003/mort2003us.zip " NOTE: 2452154 records were read from the infile DATAFILE. The minimum record length was 489. The maximum record length was 489. NOTE: The data set LIBRARY.MORT2003 has 2452154 observations and 135 variables. NOTE: DATA statement used (Total process time): real time 26.60 seconds 7 The SAS System 11:31 Tuesday, November 25, 2014 cpu time 15.33 seconds 307 proc print data=&dataset. (obs=6); 308 NOTE: There were 6 observations read from the data set LIBRARY.MORT2003. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.03 seconds 309 proc contents data=&dataset.; 310 311 312 ** Copyright 2014 shared by the National Bureau of Economic Research and Jean Roth ; 313 ** 314 ** National Bureau of Economic Research. ; 315 ** 1050 Massachusetts Avenue ; 316 ** Cambridge, MA 02138 ; 317 ** jroth@nber.org ; 318 ** 319 ** This program and all programs referenced in it are free software. You ; 320 ** can redistribute the program or modify it under the terms of the GNU ; 321 ** General Public License as published by the Free Software Foundation; ; 322 ** either version 2 of the License, or (at your option) any later version. ; 323 ** 324 ** This program is distributed in the hope that it will be useful, ; 325 ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; 326 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; 327 ** GNU General Public License for more details. ; 328 ** 329 ** You should have received a copy of the GNU General Public License ; 330 ** along with this program -- if not, write to the Free Software ; 331 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; 332 ** USA. ; 333 NOTE: The PROCEDURE CONTENTS printed pages 2-5. NOTE: PROCEDURE CONTENTS used (Total process time): real time 4.06 seconds cpu time 0.00 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 34.27 seconds cpu time 15.39 seconds