*options obs=100 ; options nocenter ; **------------------------------------------------ ; ** by Jean Roth Mon Jul 14 15:15:28 EDT 2014 ** This program reads the 1968 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/1968/"; * 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/1968/mort1968us.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.mort1968; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=3 label=""; attrib shipno length=$2 label=""; attrib reparea length=3 label=""; attrib rectype length=3 label=""; attrib restatus length=3 label=""; attrib countyrs length=$5 label=""; attrib staters length=$2 label=""; attrib cityrs length=$3 label=""; attrib popsize length=$1 label=""; attrib smsares length=$3 label=""; attrib metro length=$1 label=""; attrib stateoc length=$2 label=""; attrib countyoc length=$5 label=""; attrib monthdth length=3 label=""; attrib sex length=3 label=""; attrib race length=3 label=""; attrib racer2 length=3 label=""; attrib racer3 length=3 label=""; attrib age length=3 label=""; attrib ager12 length=3 label=""; attrib ager27 length=3 label=""; attrib ager22 length=3 label=""; attrib divstres length=3 label=""; attrib divstoc length=3 label=""; attrib autopsy length=3 label=""; attrib ucod length=$4 label=""; attrib ucr281 length=4 label=""; attrib ucr69 length=3 label=""; attrib ucr65 length=3 label=""; attrib ucr34 length=3 label=""; attrib seqnum length=5 label=""; attrib eanum length=3 label=""; attrib entity1 length=$8 label=""; attrib econdp_1 length=3 label=""; attrib econds_1 length=$2 label=""; attrib enicon_1 length=$4 label=""; attrib eniflag1 length=3 label=""; attrib entity2 length=$8 label=""; attrib econdp_2 length=3 label=""; attrib econds_2 length=$2 label=""; attrib enicon_2 length=$4 label=""; attrib eniflag2 length=3 label=""; attrib entity3 length=$8 label=""; attrib econdp_3 length=3 label=""; attrib econds_3 length=$2 label=""; attrib enicon_3 length=$4 label=""; attrib eniflag3 length=3 label=""; attrib entity4 length=$8 label=""; attrib econdp_4 length=3 label=""; attrib econds_4 length=$2 label=""; attrib enicon_4 length=$4 label=""; attrib eniflag4 length=3 label=""; attrib entity5 length=$8 label=""; attrib econdp_5 length=3 label=""; attrib econds_5 length=$2 label=""; attrib enicon_5 length=$4 label=""; attrib eniflag5 length=3 label=""; attrib entity6 length=$8 label=""; attrib econdp_6 length=3 label=""; attrib econds_6 length=$2 label=""; attrib enicon_6 length=$4 label=""; attrib eniflag6 length=3 label=""; attrib entity7 length=$8 label=""; attrib econdp_7 length=3 label=""; attrib econds_7 length=$2 label=""; attrib enicon_7 length=$4 label=""; attrib eniflag7 length=3 label=""; attrib entity8 length=$8 label=""; attrib econdp_8 length=3 label=""; attrib econds_8 length=$2 label=""; attrib enicon_8 length=$4 label=""; attrib eniflag8 length=3 label=""; attrib entity9 length=$8 label=""; attrib econdp_9 length=3 label=""; attrib econds_9 length=$2 label=""; attrib enicon_9 length=$4 label=""; attrib eniflag9 length=3 label=""; attrib entity10 length=$8 label=""; attrib econdp_10 length=3 label=""; attrib econds_10 length=$2 label=""; attrib enicon_10 length=$4 label=""; attrib eniflag10 length=3 label=""; attrib entity11 length=$8 label=""; attrib econdp_11 length=3 label=""; attrib econds_11 length=$2 label=""; attrib enicon_11 length=$4 label=""; attrib eniflag11 length=3 label=""; attrib entity12 length=$8 label=""; attrib econdp_12 length=3 label=""; attrib econds_12 length=$2 label=""; attrib enicon_12 length=$4 label=""; attrib eniflag12 length=3 label=""; attrib entity13 length=$8 label=""; attrib econdp_13 length=3 label=""; attrib econds_13 length=$2 label=""; attrib enicon_13 length=$4 label=""; attrib eniflag13 length=3 label=""; attrib entity14 length=$8 label=""; attrib econdp_14 length=3 label=""; attrib econds_14 length=$2 label=""; attrib enicon_14 length=$4 label=""; attrib eniflag14 length=3 label=""; attrib ranum length=3 label=""; attrib record_1 length=$5 label=""; attrib rnifla_1 length=3 label=""; attrib record_2 length=$5 label=""; attrib rnifla_2 length=3 label=""; attrib record_3 length=$5 label=""; attrib rnifla_3 length=3 label=""; attrib record_4 length=$5 label=""; attrib rnifla_4 length=3 label=""; attrib record_5 length=$5 label=""; attrib rnifla_5 length=3 label=""; attrib record_6 length=$5 label=""; attrib rnifla_6 length=3 label=""; attrib record_7 length=$5 label=""; attrib rnifla_7 length=3 label=""; attrib record_8 length=$5 label=""; attrib rnifla_8 length=3 label=""; attrib record_9 length=$5 label=""; attrib rnifla_9 length=3 label=""; attrib record_10 length=$5 label=""; attrib rnifla_10 length=3 label=""; attrib record_11 length=$5 label=""; attrib rnifla_11 length=3 label=""; attrib record_12 length=$5 label=""; attrib rnifla_12 length=3 label=""; attrib record_13 length=$5 label=""; attrib rnifla_13 length=3 label=""; attrib record_14 length=$5 label=""; attrib rnifla_14 length=3 label=""; INPUT @1 datayear 1. @2 shipno $2. @4 reparea 1. @11 rectype 1. @12 restatus 1. @13 countyrs $5. @13 staters $2. @18 cityrs $3. @21 popsize $1. @22 smsares $3. @25 metro $1. @26 stateoc $2. @26 countyoc $5. @31 monthdth 2. @35 sex 1. @36 race 1. @37 racer2 1. @38 racer3 1. @39 age 3. @42 ager12 2. @44 ager27 2. @46 ager22 2. @48 divstres 2. @50 divstoc 2. @52 autopsy 1. @60 ucod $4. @64 ucr281 5. @69 ucr69 3. @72 ucr65 3. @75 ucr34 3. @92 seqnum 7. @99 eanum 2. @101 entity1 $8. @101 econdp_1 1. @102 econds_1 $2. @104 enicon_1 $4. @108 eniflag1 1. @109 entity2 $8. @109 econdp_2 1. @110 econds_2 $2. @112 enicon_2 $4. @116 eniflag2 1. @117 entity3 $8. @117 econdp_3 1. @118 econds_3 $2. @120 enicon_3 $4. @124 eniflag3 1. @125 entity4 $8. @125 econdp_4 1. @126 econds_4 $2. @128 enicon_4 $4. @132 eniflag4 1. @133 entity5 $8. @133 econdp_5 1. @134 econds_5 $2. @136 enicon_5 $4. @140 eniflag5 1. @141 entity6 $8. @141 econdp_6 1. @142 econds_6 $2. @144 enicon_6 $4. @148 eniflag6 1. @149 entity7 $8. @149 econdp_7 1. @150 econds_7 $2. @152 enicon_7 $4. @156 eniflag7 1. @157 entity8 $8. @157 econdp_8 1. @158 econds_8 $2. @160 enicon_8 $4. @164 eniflag8 1. @165 entity9 $8. @165 econdp_9 1. @166 econds_9 $2. @168 enicon_9 $4. @172 eniflag9 1. @173 entity10 $8. @173 econdp_10 1. @174 econds_10 $2. @176 enicon_10 $4. @180 eniflag10 1. @181 entity11 $8. @181 econdp_11 1. @182 econds_11 $2. @184 enicon_11 $4. @188 eniflag11 1. @189 entity12 $8. @189 econdp_12 1. @190 econds_12 $2. @192 enicon_12 $4. @196 eniflag12 1. @197 entity13 $8. @197 econdp_13 1. @198 econds_13 $2. @200 enicon_13 $4. @204 eniflag13 1. @205 entity14 $8. @205 econdp_14 1. @206 econds_14 $2. @208 enicon_14 $4. @212 eniflag14 1. @213 ranum 2. @215 record_1 $5. @219 rnifla_1 1. @220 record_2 $5. @224 rnifla_2 1. @225 record_3 $5. @229 rnifla_3 1. @230 record_4 $5. @234 rnifla_4 1. @235 record_5 $5. @239 rnifla_5 1. @240 record_6 $5. @244 rnifla_6 1. @245 record_7 $5. @249 rnifla_7 1. @250 record_8 $5. @254 rnifla_8 1. @255 record_9 $5. @259 rnifla_9 1. @260 record_10 $5. @264 rnifla_10 1. @265 record_11 $5. @269 rnifla_11 1. @270 record_12 $5. @274 rnifla_12 1. @275 record_13 $5. @279 rnifla_13 1. @280 record_14 $5. @284 rnifla_14 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. ;