*options obs=100 ; options nocenter ; **------------------------------------------------ ; ** by Jean Roth Tue Jun 24 09:49:27 EDT 2014 ** This program reads the 1968 NCHS Natality Detail 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/natality/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/natality/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/DVS/natality/Nat1968.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.natl1968; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=3 label="Data year"; attrib rectype length=3 label="Record type"; attrib restatus length=3 label="Resident status"; attrib stateres length=$2 label="NCHS State of Residence"; attrib cntyres length=$5 label="NCHS County of Residence"; attrib cityres length=$3 label="NCHS City of Residence"; attrib citrspop length=$1 label="Population size - place of residence"; attrib smsares length=$3 label="Standard Metropolitan Statistical Area SMSA of residence"; attrib metrores length=$1 label="Met/Nonmet county of residence"; attrib frace length=3 label="Race of Father"; attrib mrace length=3 label="Race of Mother"; attrib crace length=3 label="Race of Child"; attrib crace2 length=3 label="Race of Child Recode"; attrib crace3 length=3 label="Race of Child Recode"; attrib csex length=3 label="Sex of Child"; attrib birmon length=3 label="Month of birth"; attrib dmage length=3 label="Age of Mother"; attrib mage36 length=3 label="Age of Mother recode 36"; attrib mage8 length=3 label="Age of Mother recode 8"; attrib mage12 length=3 label="Age of Mother recode 12"; attrib dlivord length=3 label="Detail Live birth order"; attrib livord9 length=3 label="Live birth order Recode 9"; attrib livord3 length=3 label="Live birth order Recode 3"; attrib birattnd length=3 label="Attendant at birth"; attrib dgestat length=3 label="Gestation"; attrib gestat10 length=3 label="Gestation Recode 10 (0-9)"; attrib dbirwt length=4 label="Birthweight"; attrib birwt12 length=3 label="Birthweight Recode 12"; attrib birwt3 length=3 label="Birthweight Recode 3"; attrib dlegit length=3 label="Legitimacy"; attrib dplural length=3 label="Plurality"; attrib plural2 length=3 label="Plurality recode 2"; attrib statenat length=$2 label="NCHS State of Occurence"; attrib cntynat length=$5 label="NCHS County of Occurence"; INPUT @1 datayear 1. @11 rectype 1. @12 restatus 1. @13 stateres $2. @13 cntyres $5. @18 cityres $3. @21 citrspop $1. @22 smsares $3. @25 metrores $1. @26 frace 1. @27 mrace 1. @28 crace 1. @29 crace2 1. @30 crace3 1. @31 csex 1. @32 birmon 2. @38 dmage 2. @40 mage36 2. @42 mage8 1. @43 mage12 2. @47 dlivord 2. @49 livord9 1. @50 livord3 1. @58 birattnd 1. @59 dgestat 2. @61 gestat10 1. @62 dbirwt 4. @66 birwt12 2. @68 birwt3 1. @69 dlegit 1. @70 dplural 1. @71 plural2 1. @74 statenat $2. @74 cntynat $5. ; 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. ;