*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Tue Jan 23 15:20:58 EST 2007 This program reads the 1965 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 "./"; * 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/1959-1967/mort1965.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = mort1965 ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=4 label=""; attrib monthdth length=3 label=""; attrib daydth length=3 label=""; attrib rectype length=3 label=""; attrib restatus length=3 label=""; attrib region length=3 label=""; attrib divstoc length=3 label=""; attrib exstatoc length=3 label=""; attrib stateoc length=3 label=""; attrib countyoc length=$5 label=""; attrib regnres length=3 label=""; attrib divstres length=3 label=""; attrib exstares length=3 label=""; attrib staters length=$2 label=""; attrib countyrs length=$5 label=""; attrib cityrs length=$3 label=""; attrib popsize length=$1 label=""; attrib metro length=$1 label=""; attrib smsares length=$3 label=""; attrib race length=3 label=""; attrib racer3 length=3 label=""; attrib racer2 length=3 label=""; attrib racer6 length=3 label=""; attrib sex length=3 label=""; attrib age length=3 label=""; attrib ager12 length=3 label=""; attrib ager27 length=3 label=""; attrib ager22 length=3 label=""; attrib ager14 length=3 label=""; attrib foreign length=3 label=""; attrib sexdup length=3 label=""; attrib accident length=3 label=""; attrib ucod length=$4 label=""; attrib ucod4 length=$1 label=""; attrib ccr258 length=3 label=""; attrib ucr258s length=3 label=""; attrib ccr60 length=3 label=""; attrib ccr55 length=3 label=""; attrib cdcflag length=3 label=""; attrib whoflag length=3 label=""; attrib ucr258 length=3 label=""; attrib ucr60 length=3 label=""; attrib ucr33 length=3 label=""; attrib reparea length=3 label=""; attrib shipno length=$2 label=""; INPUT @1 datayear 4. @5 monthdth 2. @7 daydth 2. @9 rectype 1. @10 restatus 1. @13 region 1. @14 divstoc 2. @16 exstatoc 2. @18 stateoc 2. @18 countyoc $5. @24 regnres 1. @25 divstres 2. @27 exstares 2. @29 staters $2. @29 countyrs $5. @34 cityrs $3. @37 popsize $1. @38 metro $1. @39 smsares $3. @42 race 2. @44 racer3 1. @45 racer2 1. @46 racer6 1. @47 sex 1. @48 age 3. @51 ager12 2. @53 ager27 2. @55 ager22 2. @57 ager14 2. @68 foreign 1. @70 sexdup 1. @71 accident 1. @72 ucod $4. @76 ucod4 $1. @77 ccr258 3. @80 ucr258s 1. @81 ccr60 2. @83 ccr55 2. @88 cdcflag 2. @90 whoflag 1. @91 ucr258 3. @94 ucr60 2. @96 ucr33 2. @98 reparea 1. @105 shipno $2. ; proc print data=library.mort1965 (obs=6); proc contents data=library.mort1965; /* Copyright 2007 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. */