1 The SAS System 16:05 Thursday, June 16, 2011 NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened instead. NOTE: All registry changes will be lost at the end of the session. WARNING: Unable to copy SASUSER registry to WORK registry. Because of this, you will not see registry customizations during this session. 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.19 seconds cpu time 0.06 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Wed Aug 29 12:37:04 EDT 2007 6 This program reads the 2004 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 "."; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 2 The SAS System 16:05 Thursday, June 16, 2011 Physical Name: /disk/nber10/SCCS/mortality/2004/data 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/2004/data/mort2004.zip "; 23 24 * The following line should contain the name of the SAS dataset ; 25 26 %let dataset = mort2004 ; 27 28 DATA library.&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 (FIPS)"; 34 attrib countyoc length=3 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 (FIPS)"; 38 attrib statersr length=$2 label="State of Residence Recode"; 39 attrib countyrs length=$3 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"; 3 The SAS System 16:05 Thursday, June 16, 2011 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"; 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"; 4 The SAS System 16:05 Thursday, June 16, 2011 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"; 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 race length=3 label="Detail Race"; 159 attrib brace length=3 label="Bridged Race"; 160 attrib raceimp length=3 label="Race Imputation Flag"; 161 attrib racer3 length=3 label="Race Recode 3"; 162 attrib racer5 length=3 label="Race Recode 5"; 163 attrib hispanic length=3 label="Hispanic Origin"; 164 attrib hspanicr length=3 label="Hispanic Origin/Race Recode"; 165 166 167 INPUT 168 169 @19 rectype 1. 170 @20 restatus 1. 171 @21 stateoc $2. 172 @23 countyoc 3. 173 @26 exstatoc $2. 174 @28 popsizoc 1. 175 @29 staters $2. 176 @33 statersr $2. 177 @35 countyrs $3. 178 @38 cityrs $5. 179 @43 popsize $1. 180 @44 metro $1. 181 @45 exstares $2. 182 @47 pmsares $4. 183 @51 popsizrs $1. 184 @52 popmsa $1. 185 @53 cmsares 2. 186 @55 statbth $2. 187 @59 statbthr $2. 188 @61 educ89 2. 189 @63 educ 1. 5 The SAS System 16:05 Thursday, June 16, 2011 190 @64 educflag 1. 191 @65 monthdth 2. 192 @69 sex $1. 193 @70 age 4. 194 @74 ageflag 1. 195 @75 ager52 2. 196 @77 ager27 2. 197 @79 ager12 2. 198 @81 ager22 2. 199 @83 placdth 1. 200 @84 marstat $1. 201 @85 weekday 1. 202 @102 year 4. 203 @106 injwork $1. 204 @107 mandeath 1. 205 @108 methdisp $1. 206 @109 autopsy $1. 207 @144 activity 1. 208 @145 injury 1. 209 @146 ucod $4. 210 @150 ucr358 3. 211 @154 ucr113 3. 212 @157 ucr130 3. 213 @160 ucr39 2. 214 @163 eanum 2. 215 @165 econdp_1 1. 216 @166 econds_1 1. 217 @167 enicon_1 $4. 218 @172 econdp_2 1. 219 @173 econds_2 1. 220 @174 enicon_2 $4. 221 @179 econdp_3 1. 222 @180 econds_3 1. 223 @181 enicon_3 $4. 224 @186 econdp_4 1. 225 @187 econds_4 1. 226 @188 enicon_4 $4. 227 @193 econdp_5 1. 228 @194 econds_5 1. 229 @195 enicon_5 $4. 230 @200 econdp_6 1. 231 @201 econds_6 1. 232 @202 enicon_6 $4. 233 @207 econdp_7 1. 234 @208 econds_7 1. 235 @209 enicon_7 $4. 236 @214 econdp_8 1. 237 @215 econds_8 1. 238 @216 enicon_8 $4. 239 @221 econdp_9 1. 240 @222 econds_9 1. 241 @223 enicon_9 $4. 242 @228 econdp_10 1. 243 @229 econds_10 1. 244 @230 enicon_10 $4. 245 @235 econdp_11 1. 246 @236 econds_11 1. 247 @237 enicon_11 $4. 6 The SAS System 16:05 Thursday, June 16, 2011 248 @242 econdp_12 1. 249 @243 econds_12 1. 250 @244 enicon_12 $4. 251 @249 econdp_13 1. 252 @250 econds_13 1. 253 @251 enicon_13 $4. 254 @256 econdp_14 1. 255 @257 econds_14 1. 256 @258 enicon_14 $4. 257 @263 econdp_15 1. 258 @264 econds_15 1. 259 @265 enicon_15 $4. 260 @270 econdp_16 1. 261 @271 econds_16 1. 262 @272 enicon_16 $4. 263 @277 econdp_17 1. 264 @278 econds_17 1. 265 @279 enicon_17 $4. 266 @284 econdp_18 1. 267 @285 econds_18 1. 268 @286 enicon_18 $4. 269 @291 econdp_19 1. 270 @292 econds_19 1. 271 @293 enicon_19 $4. 272 @298 econdp_20 1. 273 @299 econds_20 1. 274 @300 enicon_20 $4. 275 @341 ranum 2. 276 @344 record_1 $4. 277 @349 record_2 $4. 278 @354 record_3 $4. 279 @359 record_4 $4. 280 @364 record_5 $4. 281 @369 record_6 $4. 282 @374 record_7 $4. 283 @379 record_8 $4. 284 @384 record_9 $4. 285 @389 record_10 $4. 286 @394 record_11 $4. 287 @399 record_12 $4. 288 @404 record_13 $4. 289 @409 record_14 $4. 290 @414 record_15 $4. 291 @419 record_16 $4. 292 @424 record_17 $4. 293 @429 record_18 $4. 294 @434 record_19 $4. 295 @439 record_20 $4. 296 @445 race 2. 297 @447 brace 1. 298 @448 raceimp 1. 299 @449 racer3 1. 300 @450 racer5 1. 301 @484 hispanic 3. 302 @488 hspanicr 1. 303 ; 304 7 The SAS System 16:05 Thursday, June 16, 2011 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/2004/data/mort2004.zip " NOTE: 2401400 records were read from the infile DATAFILE. The minimum record length was 489. The maximum record length was 489. NOTE: The data set LIBRARY.MORT2004 has 2401400 observations and 134 variables. NOTE: DATA statement used (Total process time): real time 50.39 seconds cpu time 36.48 seconds 305 proc print data=library.mort2004 (obs=6); 306 NOTE: There were 6 observations read from the data set LIBRARY.MORT2004. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.05 seconds cpu time 0.03 seconds 307 proc contents data=library.mort2004; 308 309 /* 310 Copyright 2007 shared by the National Bureau of Economic Research and Jean Roth 311 312 National Bureau of Economic Research. 313 1050 Massachusetts Avenue 314 Cambridge, MA 02138 315 jroth@nber.org 316 317 This program and all programs referenced in it are free software. You 318 can redistribute the program or modify it under the terms of the GNU 319 General Public License as published by the Free Software Foundation; 320 either version 2 of the License, or (at your option) any later version. 321 322 This program is distributed in the hope that it will be useful, 323 but WITHOUT ANY WARRANTY; without even the implied warranty of 324 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 325 GNU General Public License for more details. 326 327 You should have received a copy of the GNU General Public License 328 along with this program; if not, write to the Free Software 329 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 330 USA. 331 */ NOTE: The PROCEDURE CONTENTS printed pages 2-5. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.02 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 50.69 seconds cpu time 36.58 seconds