*options obs=100 ; options nocenter ; **------------------------------------------------ ; ** by Jean Roth Mon Jul 14 16:44:48 EDT 2014 ** This program reads the 1999 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/1999/"; * 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/1999/mort1999us.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.mort1999; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib rectype length=3 label="Record Type"; attrib restatus length=3 label="Resident Status"; attrib stateoc length=$2 label="State of Occurrence"; attrib countyoc length=$5 label="County of Occurrence"; attrib region length=3 label="Region"; attrib divstoc length=3 label="Division and State Subcode of Occurrence"; attrib exstatoc length=$2 label="Expanded State of Occurrence Code"; attrib staters length=$2 label="State of Residence"; attrib countyrs length=$5 label="County of Residence"; attrib cityrs length=$3 label="City of Residence"; attrib popsize length=$1 label="Population Size of City of Residence"; attrib metro length=$1 label="Metropolitan - Nonmetropolitan County of Residence"; attrib regnres length=3 label="Region"; attrib divstres length=3 label="Division and State Subcode of Residence"; attrib exstares length=$2 label="Expanded State of Residence Code"; attrib pmsares length=$3 label="NCHS PMSA/MSA of Residence"; attrib popsizoc length=3 label="Population Size of County of Occurrence"; attrib popsizrs length=$1 label="Population Size of County of Residence"; attrib popmsa length=$1 label="PMSA/MSA Population Size"; attrib educ length=3 label="Education"; attrib educr length=3 label="Education recode"; attrib monthdth length=3 label="Month of Death"; attrib sex length=3 label="Sex"; attrib race length=3 label="Detail Race"; attrib racer3 length=3 label="Race Recode 3"; attrib racer2 length=3 label="Race Recode 2"; attrib age length=3 label="Detail Age"; attrib ager52 length=3 label="Age Recode 52"; attrib ager27 length=3 label="Age Recode 27"; attrib ager12 length=3 label="Age Recode 12"; attrib ager22 length=3 label="Infant Age Recode 22"; attrib placdth length=3 label="Place of Death and Decedent's Status"; attrib marstat length=3 label="Marital Status"; attrib statbth length=3 label="State of Birth"; attrib hispanic length=3 label="Hispanic Origin"; attrib hspanicr length=3 label="Hispanic Origin/Race Recode"; attrib weekday length=3 label="Day of Week of Death"; attrib industry length=3 label="Kind of Business or Industry"; attrib occup length=3 label="Usual Occupation"; attrib ucr52 length=3 label="52 Cause Recode"; attrib fipscity length=$5 label="Place (city) of Residence (FIPS)"; attrib year length=4 label="Current Data Year"; attrib fipssto length=$2 label="State of Occurrence (FIPS)"; attrib fipsctyo length=$5 label="County of Occurrence (FIPS)"; attrib fipsstr length=$2 label="State of Residence (FIPS)"; attrib fipsctyr length=$5 label="County of Residence (FIPS)"; attrib fipspmsa length=$4 label="PMSA/MSA of Residence (FIPS)"; attrib fipscmsa length=$2 label="CMSA of Residence (FIPS)"; attrib injwork length=3 label="Injury at Work"; attrib raceimp length=3 label="Race Imputation Flag"; attrib ageflag length=3 label="Age Substitution Flag"; attrib mandeath length=3 label="Manner of death"; attrib activity length=3 label="Activity code"; attrib injury length=3 label="Place of Injury for Causes W00-Y34 except Y06.- and Y07.-"; attrib ucod length=$4 label="ICD Code (10th Revision)"; attrib ucr358 length=3 label="358 Cause Recode"; attrib ucr113 length=3 label="113 Cause Recode"; attrib ucr130 length=3 label="130 Cause Recode"; attrib ucr39 length=3 label="39 Cause Recode"; attrib eanum length=3 label="Number of Entity-Axis Conditions"; attrib econdp_1 length=3 label=""; attrib econds_1 length=$1 label=""; attrib enicon_1 length=$4 label=""; attrib econdp_2 length=3 label=""; attrib econds_2 length=$1 label=""; attrib enicon_2 length=$4 label=""; attrib econdp_3 length=3 label=""; attrib econds_3 length=$1 label=""; attrib enicon_3 length=$4 label=""; attrib econdp_4 length=3 label=""; attrib econds_4 length=$1 label=""; attrib enicon_4 length=$4 label=""; attrib econdp_5 length=3 label=""; attrib econds_5 length=$1 label=""; attrib enicon_5 length=$4 label=""; attrib econdp_6 length=3 label=""; attrib econds_6 length=$1 label=""; attrib enicon_6 length=$4 label=""; attrib econdp_7 length=3 label=""; attrib econds_7 length=$1 label=""; attrib enicon_7 length=$4 label=""; attrib econdp_8 length=3 label=""; attrib econds_8 length=$1 label=""; attrib enicon_8 length=$4 label=""; attrib econdp_9 length=3 label=""; attrib econds_9 length=$1 label=""; attrib enicon_9 length=$4 label=""; attrib econdp_10 length=3 label=""; attrib econds_10 length=$1 label=""; attrib enicon_10 length=$4 label=""; attrib econdp_11 length=3 label=""; attrib econds_11 length=$1 label=""; attrib enicon_11 length=$4 label=""; attrib econdp_12 length=3 label=""; attrib econds_12 length=$1 label=""; attrib enicon_12 length=$4 label=""; attrib econdp_13 length=3 label=""; attrib econds_13 length=$1 label=""; attrib enicon_13 length=$4 label=""; attrib econdp_14 length=3 label=""; attrib econds_14 length=$1 label=""; attrib enicon_14 length=$4 label=""; attrib econdp_15 length=3 label=""; attrib econds_15 length=$1 label=""; attrib enicon_15 length=$4 label=""; attrib econdp_16 length=3 label=""; attrib econds_16 length=$1 label=""; attrib enicon_16 length=$4 label=""; attrib econdp_17 length=3 label=""; attrib econds_17 length=$1 label=""; attrib enicon_17 length=$4 label=""; attrib econdp_18 length=3 label=""; attrib econds_18 length=$1 label=""; attrib enicon_18 length=$4 label=""; attrib econdp_19 length=3 label=""; attrib econds_19 length=$1 label=""; attrib enicon_19 length=$4 label=""; attrib econdp_20 length=3 label=""; attrib econds_20 length=$1 label=""; attrib enicon_20 length=$4 label=""; attrib ranum length=3 label="Number of Record-Axis Conditions"; attrib record_1 length=$4 label="Condition"; attrib record_2 length=$4 label="Condition"; attrib record_3 length=$4 label="Condition"; attrib record_4 length=$4 label="Condition"; attrib record_5 length=$4 label="Condition"; attrib record_6 length=$4 label="Condition"; attrib record_7 length=$4 label="Condition"; attrib record_8 length=$4 label="Condition"; attrib record_9 length=$4 label="Condition"; attrib record_10 length=$4 label="Condition"; attrib record_11 length=$4 label="Condition"; attrib record_12 length=$4 label="Condition"; attrib record_13 length=$4 label="Condition"; attrib record_14 length=$4 label="Condition"; attrib record_15 length=$4 label="Condition"; attrib record_16 length=$4 label="Condition"; attrib record_17 length=$4 label="Condition"; attrib record_18 length=$4 label="Condition"; attrib record_19 length=$4 label="Condition"; attrib record_20 length=$4 label="Condition"; INPUT @19 rectype 1. @20 restatus 1. @21 stateoc $2. @21 countyoc $5. @26 region 1. @27 divstoc 2. @29 exstatoc $2. @31 staters $2. @31 countyrs $5. @36 cityrs $3. @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 statbth 2. @80 hispanic 2. @82 hspanicr 1. @83 weekday 1. @85 industry 3. @88 occup 3. @91 ucr52 3. @97 fipscity $5. @115 year 4. @119 fipssto $2. @119 fipsctyo $5. @124 fipsstr $2. @124 fipsctyr $5. @129 fipspmsa $4. @134 fipscmsa $2. @136 injwork 1. @137 raceimp 1. @138 ageflag 1. @139 mandeath 1. @140 activity 1. @141 injury 1. @142 ucod $4. @146 ucr358 3. @151 ucr113 3. @154 ucr130 3. @157 ucr39 2. @160 eanum 2. @162 econdp_1 1. @163 econds_1 $1. @164 enicon_1 $4. @169 econdp_2 1. @170 econds_2 $1. @171 enicon_2 $4. @176 econdp_3 1. @177 econds_3 $1. @178 enicon_3 $4. @183 econdp_4 1. @184 econds_4 $1. @185 enicon_4 $4. @190 econdp_5 1. @191 econds_5 $1. @192 enicon_5 $4. @197 econdp_6 1. @198 econds_6 $1. @199 enicon_6 $4. @204 econdp_7 1. @205 econds_7 $1. @206 enicon_7 $4. @211 econdp_8 1. @212 econds_8 $1. @213 enicon_8 $4. @218 econdp_9 1. @219 econds_9 $1. @220 enicon_9 $4. @225 econdp_10 1. @226 econds_10 $1. @227 enicon_10 $4. @232 econdp_11 1. @233 econds_11 $1. @234 enicon_11 $4. @239 econdp_12 1. @240 econds_12 $1. @241 enicon_12 $4. @246 econdp_13 1. @247 econds_13 $1. @248 enicon_13 $4. @253 econdp_14 1. @254 econds_14 $1. @255 enicon_14 $4. @260 econdp_15 1. @261 econds_15 $1. @262 enicon_15 $4. @267 econdp_16 1. @268 econds_16 $1. @269 enicon_16 $4. @274 econdp_17 1. @275 econds_17 $1. @276 enicon_17 $4. @281 econdp_18 1. @282 econds_18 $1. @283 enicon_18 $4. @288 econdp_19 1. @289 econds_19 $1. @290 enicon_19 $4. @295 econdp_20 1. @296 econds_20 $1. @297 enicon_20 $4. @338 ranum 2. @341 record_1 $4. @346 record_2 $4. @351 record_3 $4. @356 record_4 $4. @361 record_5 $4. @366 record_6 $4. @371 record_7 $4. @376 record_8 $4. @381 record_9 $4. @386 record_10 $4. @391 record_11 $4. @396 record_12 $4. @401 record_13 $4. @406 record_14 $4. @411 record_15 $4. @416 record_16 $4. @421 record_17 $4. @426 record_18 $4. @431 record_19 $4. @436 record_20 $4. ; 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. ;