*options obs=100 ; options nocenter ; **------------------------------------------------ ; ** by Jean Roth Mon Jul 14 16:32:50 EDT 2014 ** This program reads the 1995 NCHS Multiple Cause of Death Data Data File ; ** Report errors to jroth@nber.org ; ** This program is distributed under the GNU GPL. ; ** See end of this file and ** http://www.gnu.org/licenses/ for details. ; ** ----------------------------------------------- ; * The following line should contain the directory where the SAS file is to be stored ; libname library "/homes/data/mortality/1995/"; * The following line should contain the complete path and name of the raw data file. On a PC, use backslashes in paths as in C:\ ; FILENAME datafile pipe "unzip -p /homes/data/mortality/1995/mort1995us.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.mort1995; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=3 label=""; attrib rectype length=3 label=""; attrib restatus length=3 label=""; attrib countyoc length=$5 label=""; attrib stateoc length=$2 label=""; attrib region length=3 label=""; attrib divstoc length=$2 label=""; attrib exstatoc length=$2 label=""; attrib countyrs length=$5 label=""; attrib staters length=$2 label=""; attrib cityrs length=$5 label=""; attrib popsize length=$1 label=""; attrib metro length=$1 label=""; attrib regnres length=3 label=""; attrib divstres length=3 label=""; attrib exstares length=$2 label=""; attrib pmsares length=$3 label=""; attrib popsizoc length=3 label=""; attrib popsizrs length=$1 label=""; attrib popmsa length=$1 label=""; attrib educ length=3 label=""; attrib educr length=3 label=""; attrib monthdth length=3 label=""; attrib sex length=3 label=""; attrib race length=3 label=""; attrib racer3 length=3 label=""; attrib racer2 length=3 label=""; attrib age length=3 label=""; attrib ager52 length=3 label=""; attrib ager27 length=3 label=""; attrib ager12 length=3 label=""; attrib ager22 length=3 label=""; attrib placdth length=3 label=""; attrib marstat length=3 label=""; attrib statebth length=3 label=""; attrib hispanic length=3 label=""; attrib hspanicr length=3 label=""; attrib weekday length=3 label=""; attrib industry length=3 label=""; attrib occup length=3 label=""; attrib ucr52 length=3 label=""; attrib fipscity length=$5 label=""; attrib fipsctyo length=$5 label=""; attrib fipssto length=$2 label=""; attrib fipsctyr length=$5 label=""; attrib fipsstr length=$2 label=""; attrib fipspmsa length=$4 label=""; attrib fipscmsa length=$2 label=""; attrib injwork length=3 label=""; attrib raceimp length=3 label=""; attrib ageflag length=3 label=""; attrib accident length=3 label=""; attrib ucod length=$4 label=""; attrib ucr282 length=4 label=""; attrib ucr72 length=3 label=""; attrib ucr61 length=3 label=""; attrib ucr34 length=3 label=""; attrib eanum length=3 label=""; attrib econdp_1 length=3 label="Part/line number on certificate 1"; attrib econds_1 length=$1 label="Sequence of condition within part/line 1"; attrib enicon_1 length=$4 label="Condition code 1 (ICD 9th Revision)"; attrib eniflag_1 length=3 label="Nature of Injury Flag 1"; attrib econdp_2 length=3 label="Part/line number on certificate 2"; attrib econds_2 length=$1 label="Sequence of condition within part/line 2"; attrib enicon_2 length=$4 label="Condition code 2 (ICD 9th Revision)"; attrib eniflag_2 length=3 label="Nature of Injury Flag 2"; attrib econdp_3 length=3 label="Part/line number on certificate 3"; attrib econds_3 length=$1 label="Sequence of condition within part/line 3"; attrib enicon_3 length=$4 label="Condition code 3 (ICD 9th Revision)"; attrib eniflag_3 length=3 label="Nature of Injury Flag 3"; attrib econdp_4 length=3 label="Part/line number on certificate 4"; attrib econds_4 length=$1 label="Sequence of condition within part/line 4"; attrib enicon_4 length=$4 label="Condition code 4 (ICD 9th Revision)"; attrib eniflag_4 length=3 label="Nature of Injury Flag 4"; attrib econdp_5 length=3 label="Part/line number on certificate 5"; attrib econds_5 length=$1 label="Sequence of condition within part/line 5"; attrib enicon_5 length=$4 label="Condition code 5 (ICD 9th Revision)"; attrib eniflag_5 length=3 label="Nature of Injury Flag 5"; attrib econdp_6 length=3 label="Part/line number on certificate 6"; attrib econds_6 length=$1 label="Sequence of condition within part/line 6"; attrib enicon_6 length=$4 label="Condition code 6 (ICD 9th Revision)"; attrib eniflag_6 length=3 label="Nature of Injury Flag 6"; attrib econdp_7 length=3 label="Part/line number on certificate 7"; attrib econds_7 length=$1 label="Sequence of condition within part/line 7"; attrib enicon_7 length=$4 label="Condition code 7 (ICD 9th Revision)"; attrib eniflag_7 length=3 label="Nature of Injury Flag 7"; attrib econdp_8 length=3 label="Part/line number on certificate 8"; attrib econds_8 length=$1 label="Sequence of condition within part/line 8"; attrib enicon_8 length=$4 label="Condition code 8 (ICD 9th Revision)"; attrib eniflag_8 length=3 label="Nature of Injury Flag 8"; attrib econdp_9 length=3 label="Part/line number on certificate 9"; attrib econds_9 length=$1 label="Sequence of condition within part/line 9"; attrib enicon_9 length=$4 label="Condition code 9 (ICD 9th Revision)"; attrib eniflag_9 length=3 label="Nature of Injury Flag 9"; attrib econdp_10 length=3 label="Part/line number on certificate 10"; attrib econds_10 length=$1 label="Sequence of condition within part/line 10"; attrib enicon_10 length=$4 label="Condition code 10 (ICD 9th Revision)"; attrib eniflag_10 length=3 label="Nature of Injury Flag 10"; attrib econdp_11 length=3 label="Part/line number on certificate 11"; attrib econds_11 length=$1 label="Sequence of condition within part/line 11"; attrib enicon_11 length=$4 label="Condition code 11 (ICD 9th Revision)"; attrib eniflag_11 length=3 label="Nature of Injury Flag 11"; attrib econdp_12 length=3 label="Part/line number on certificate 12"; attrib econds_12 length=$1 label="Sequence of condition within part/line 12"; attrib enicon_12 length=$4 label="Condition code 12 (ICD 9th Revision)"; attrib eniflag_12 length=3 label="Nature of Injury Flag 12"; attrib econdp_13 length=3 label="Part/line number on certificate 13"; attrib econds_13 length=$1 label="Sequence of condition within part/line 13"; attrib enicon_13 length=$4 label="Condition code 13 (ICD 9th Revision)"; attrib eniflag_13 length=3 label="Nature of Injury Flag 13"; attrib econdp_14 length=3 label="Part/line number on certificate 14"; attrib econds_14 length=$1 label="Sequence of condition within part/line 14"; attrib enicon_14 length=$4 label="Condition code 14 (ICD 9th Revision)"; attrib eniflag_14 length=3 label="Nature of Injury Flag 14"; attrib econdp_15 length=3 label="Part/line number on certificate 15"; attrib econds_15 length=$1 label="Sequence of condition within part/line 15"; attrib enicon_15 length=$4 label="Condition code 15 (ICD 9th Revision)"; attrib eniflag_15 length=3 label="Nature of Injury Flag 15"; attrib econdp_16 length=3 label="Part/line number on certificate 16"; attrib econds_16 length=$1 label="Sequence of condition within part/line 16"; attrib enicon_16 length=$4 label="Condition code 16 (ICD 9th Revision)"; attrib eniflag_16 length=3 label="Nature of Injury Flag 16"; attrib econdp_17 length=3 label="Part/line number on certificate 17"; attrib econds_17 length=$1 label="Sequence of condition within part/line 17"; attrib enicon_17 length=$4 label="Condition code 17 (ICD 9th Revision)"; attrib eniflag_17 length=3 label="Nature of Injury Flag 17"; attrib econdp_18 length=3 label="Part/line number on certificate 18"; attrib econds_18 length=$1 label="Sequence of condition within part/line 18"; attrib enicon_18 length=$4 label="Condition code 18 (ICD 9th Revision)"; attrib eniflag_18 length=3 label="Nature of Injury Flag 18"; attrib econdp_19 length=3 label="Part/line number on certificate 19"; attrib econds_19 length=$1 label="Sequence of condition within part/line 19"; attrib enicon_19 length=$4 label="Condition code 19 (ICD 9th Revision)"; attrib eniflag_19 length=3 label="Nature of Injury Flag 19"; attrib econdp_20 length=3 label="Part/line number on certificate 20"; attrib econds_20 length=$1 label="Sequence of condition within part/line 20"; attrib enicon_20 length=$4 label="Condition code 20 (ICD 9th Revision)"; attrib eniflag_20 length=3 label="Nature of Injury Flag 20"; attrib ranum length=3 label=""; attrib record_1 length=$4 label="Record-Axis Condition Code 1 (ICD 9th Revision)"; attrib rniflag_1 length=3 label="Nature of Injury Flag 1"; attrib record_2 length=$4 label="Record-Axis Condition Code 2 (ICD 9th Revision)"; attrib rniflag_2 length=3 label="Nature of Injury Flag 2"; attrib record_3 length=$4 label="Record-Axis Condition Code 3 (ICD 9th Revision)"; attrib rniflag_3 length=3 label="Nature of Injury Flag 3"; attrib record_4 length=$4 label="Record-Axis Condition Code 4 (ICD 9th Revision)"; attrib rniflag_4 length=3 label="Nature of Injury Flag 4"; attrib record_5 length=$4 label="Record-Axis Condition Code 5 (ICD 9th Revision)"; attrib rniflag_5 length=3 label="Nature of Injury Flag 5"; attrib record_6 length=$4 label="Record-Axis Condition Code 6 (ICD 9th Revision)"; attrib rniflag_6 length=3 label="Nature of Injury Flag 6"; attrib record_7 length=$4 label="Record-Axis Condition Code 7 (ICD 9th Revision)"; attrib rniflag_7 length=3 label="Nature of Injury Flag 7"; attrib record_8 length=$4 label="Record-Axis Condition Code 8 (ICD 9th Revision)"; attrib rniflag_8 length=3 label="Nature of Injury Flag 8"; attrib record_9 length=$4 label="Record-Axis Condition Code 9 (ICD 9th Revision)"; attrib rniflag_9 length=3 label="Nature of Injury Flag 9"; attrib record_10 length=$4 label="Record-Axis Condition Code 10 (ICD 9th Revision)"; attrib rniflag_10 length=3 label="Nature of Injury Flag 10"; attrib record_11 length=$4 label="Record-Axis Condition Code 11 (ICD 9th Revision)"; attrib rniflag_11 length=3 label="Nature of Injury Flag 11"; attrib record_12 length=$4 label="Record-Axis Condition Code 12 (ICD 9th Revision)"; attrib rniflag_12 length=3 label="Nature of Injury Flag 12"; attrib record_13 length=$4 label="Record-Axis Condition Code 13 (ICD 9th Revision)"; attrib rniflag_13 length=3 label="Nature of Injury Flag 13"; attrib record_14 length=$4 label="Record-Axis Condition Code 14 (ICD 9th Revision)"; attrib rniflag_14 length=3 label="Nature of Injury Flag 14"; attrib record_15 length=$4 label="Record-Axis Condition Code 15 (ICD 9th Revision)"; attrib rniflag_15 length=3 label="Nature of Injury Flag 15"; attrib record_16 length=$4 label="Record-Axis Condition Code 16 (ICD 9th Revision)"; attrib rniflag_16 length=3 label="Nature of Injury Flag 16"; attrib record_17 length=$4 label="Record-Axis Condition Code 17 (ICD 9th Revision)"; attrib rniflag_17 length=3 label="Nature of Injury Flag 17"; attrib record_18 length=$4 label="Record-Axis Condition Code 18 (ICD 9th Revision)"; attrib rniflag_18 length=3 label="Nature of Injury Flag 18"; attrib record_19 length=$4 label="Record-Axis Condition Code 19 (ICD 9th Revision)"; attrib rniflag_19 length=3 label="Nature of Injury Flag 19"; attrib record_20 length=$4 label="Record-Axis Condition Code 20 (ICD 9th Revision)"; attrib rniflag_20 length=3 label="Nature of Injury Flag 20"; INPUT @1 datayear 2. @19 rectype 1. @20 restatus 1. @21 countyoc $5. @21 stateoc $2. @26 region 1. @27 divstoc $2. @29 exstatoc $2. @31 countyrs $5. @31 staters $2. @36 cityrs $5. @39 popsize $1. @40 metro $1. @41 regnres 1. @42 divstres 2. @44 exstares $2. @46 pmsares $3. @49 popsizoc 1. @50 popsizrs $1. @51 popmsa $1. @52 educ 2. @54 educr 1. @55 monthdth 2. @59 sex 1. @60 race 2. @62 racer3 1. @63 racer2 1. @64 age 3. @67 ager52 2. @69 ager27 2. @71 ager12 2. @73 ager22 2. @75 placdth 1. @77 marstat 1. @78 statebth 2. @80 hispanic 2. @82 hspanicr 1. @83 weekday 1. @85 industry 3. @88 occup 3. @91 ucr52 3. @97 fipscity $5. @119 fipsctyo $5. @119 fipssto $2. @124 fipsctyr $5. @124 fipsstr $2. @129 fipspmsa $4. @134 fipscmsa $2. @136 injwork 1. @137 raceimp 1. @138 ageflag 1. @141 accident 1. @142 ucod $4. @146 ucr282 5. @151 ucr72 3. @154 ucr61 3. @157 ucr34 3. @160 eanum 2. @162 econdp_1 1. @163 econds_1 $1. @164 enicon_1 $4. @168 eniflag_1 1. @169 econdp_2 1. @170 econds_2 $1. @171 enicon_2 $4. @175 eniflag_2 1. @176 econdp_3 1. @177 econds_3 $1. @178 enicon_3 $4. @182 eniflag_3 1. @183 econdp_4 1. @184 econds_4 $1. @185 enicon_4 $4. @189 eniflag_4 1. @190 econdp_5 1. @191 econds_5 $1. @192 enicon_5 $4. @196 eniflag_5 1. @197 econdp_6 1. @198 econds_6 $1. @199 enicon_6 $4. @203 eniflag_6 1. @204 econdp_7 1. @205 econds_7 $1. @206 enicon_7 $4. @210 eniflag_7 1. @211 econdp_8 1. @212 econds_8 $1. @213 enicon_8 $4. @217 eniflag_8 1. @218 econdp_9 1. @219 econds_9 $1. @220 enicon_9 $4. @224 eniflag_9 1. @225 econdp_10 1. @226 econds_10 $1. @227 enicon_10 $4. @231 eniflag_10 1. @232 econdp_11 1. @233 econds_11 $1. @234 enicon_11 $4. @238 eniflag_11 1. @239 econdp_12 1. @240 econds_12 $1. @241 enicon_12 $4. @245 eniflag_12 1. @246 econdp_13 1. @247 econds_13 $1. @248 enicon_13 $4. @252 eniflag_13 1. @253 econdp_14 1. @254 econds_14 $1. @255 enicon_14 $4. @259 eniflag_14 1. @260 econdp_15 1. @261 econds_15 $1. @262 enicon_15 $4. @266 eniflag_15 1. @267 econdp_16 1. @268 econds_16 $1. @269 enicon_16 $4. @273 eniflag_16 1. @274 econdp_17 1. @275 econds_17 $1. @276 enicon_17 $4. @280 eniflag_17 1. @281 econdp_18 1. @282 econds_18 $1. @283 enicon_18 $4. @287 eniflag_18 1. @288 econdp_19 1. @289 econds_19 $1. @290 enicon_19 $4. @294 eniflag_19 1. @295 econdp_20 1. @296 econds_20 $1. @297 enicon_20 $4. @301 eniflag_20 1. @338 ranum 2. @341 record_1 $4. @345 rniflag_1 1. @346 record_2 $4. @350 rniflag_2 1. @351 record_3 $4. @355 rniflag_3 1. @356 record_4 $4. @360 rniflag_4 1. @361 record_5 $4. @365 rniflag_5 1. @366 record_6 $4. @370 rniflag_6 1. @371 record_7 $4. @375 rniflag_7 1. @376 record_8 $4. @380 rniflag_8 1. @381 record_9 $4. @385 rniflag_9 1. @386 record_10 $4. @390 rniflag_10 1. @391 record_11 $4. @395 rniflag_11 1. @396 record_12 $4. @400 rniflag_12 1. @401 record_13 $4. @405 rniflag_13 1. @406 record_14 $4. @410 rniflag_14 1. @411 record_15 $4. @415 rniflag_15 1. @416 record_16 $4. @420 rniflag_16 1. @421 record_17 $4. @425 rniflag_17 1. @426 record_18 $4. @430 rniflag_18 1. @431 record_19 $4. @435 rniflag_19 1. @436 record_20 $4. @440 rniflag_20 1. ; proc print data=&dataset. (obs=6); proc contents data=&dataset.; ** Copyright 2014 shared by the National Bureau of Economic Research and Jean Roth ; ** ** National Bureau of Economic Research. ; ** 1050 Massachusetts Avenue ; ** Cambridge, MA 02138 ; ** jroth@nber.org ; ** ** This program and all programs referenced in it are free software. You ; ** can redistribute the program or modify it under the terms of the GNU ; ** General Public License as published by the Free Software Foundation; ; ** either version 2 of the License, or (at your option) any later version. ; ** ** This program is distributed in the hope that it will be useful, ; ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; ** GNU General Public License for more details. ; ** ** You should have received a copy of the GNU General Public License ; ** along with this program -- if not, write to the Free Software ; ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; ** USA. ;