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