*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Thu Nov 8 16:52:35 EST 2007 This program reads the 1975 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 "."; * 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/Nat1975.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = library.natl1975; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib datayear length=3 label="Data year"; attrib shipnum length=$2 label="Shipment number"; attrib reparea length=$1 label="Reporting Area"; attrib rectype length=3 label="Record type"; attrib restatus length=3 label="Resident status"; attrib stateres length=3 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 divres length=3 label="Division of residence"; attrib stsubres length=3 label="State Subcode of Residence"; attrib statenat length=3 label="NCHS State of Occurence"; attrib cntynat length=4 label="NCHS County of Occurence"; attrib divocc length=3 label="Division of occurrence"; attrib stsubocc length=3 label="State Subcode of occurrence"; attrib csex length=3 label="Sex of Child"; attrib birattnd length=3 label="Attendant at birth"; 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 crace3 length=3 label="Race of Child Recode"; attrib dmage length=3 label="Age of Mother"; attrib mage36 length=3 label="Age of Mother recode 36"; attrib mage15 length=3 label="Age of Mother recode 15"; attrib mage12 length=3 label="Age of Mother recode 12"; attrib mage8 length=3 label="Age of Mother recode 8"; attrib mage7 length=3 label="Age of Mother recode 7"; attrib mage6 length=3 label="Age of Mother recode 6"; attrib nlbnl length=3 label="Born alive"; attrib nlbnd length=3 label="Born alive"; attrib nlbd length=3 label="Number of children born dead ( fetal deaths )"; attrib dtotord length=3 label="Total birth order"; attrib totord9 length=3 label="Total birth order recode"; attrib dlivord length=3 label="Detail Live birth order"; attrib livord9 length=3 label="Live birth order Recode 9"; attrib livord8 length=3 label="Live birth order Recode 8"; attrib livord7 length=3 label="Live birth order Recode 7"; attrib livord6 length=3 label="Live birth order Recode 6"; attrib livord3 length=3 label="Live birth order Recode 3"; attrib dfage length=3 label="Age of Father"; attrib fage11 length=3 label="Age of Father Recode"; attrib dbirwt length=4 label="Birthweight"; attrib birwt12 length=3 label="Birthweight Recode 12"; attrib birwt3 length=3 label="Birthweight Recode 3"; attrib dplural length=3 label="Plurality (1975 on)"; attrib plural3 length=3 label="Plurality recode 3"; attrib plural2 length=3 label="Plurality recode 2"; attrib birmon length=3 label="Month of birth"; attrib birday length=3 label="Birth Date - Day"; attrib lmpmon length=3 label="Month Last Normal Menses Began"; attrib lmpday length=3 label="Day Last Normal Menses Began"; attrib lmpyr length=$1 label="Year Last Normal Menses Began"; attrib dgestat length=3 label="Gestation"; attrib gestat10 length=3 label="Gestation Recode 10"; attrib gestat3 length=3 label="Gestation Recode 3"; attrib dmeduc length=3 label="Education of Mother Detail"; attrib meduc14 length=3 label="Education of Mother Recode 14"; attrib meduc6 length=3 label="Education of Mother Recode 6"; attrib dfeduc length=3 label="Education of Father"; attrib feduc14 length=3 label="Education of Father Recode 14"; attrib dlegit length=3 label="Legitimacy"; attrib legit3 length=3 label="Legitimacy recode 3"; attrib monprec length=$1 label="Detail Month Prenatal Care began"; attrib mpre10 length=3 label="Month Prenatal Care began Recode 10"; attrib mpre6 length=3 label="Month Prenatal Care began Recode 6"; attrib llbmon length=3 label="Month of Last Live Birth"; attrib llbyr length=3 label="Year of Last Live Birth"; attrib disllb length=3 label="Interval since last live birth"; attrib isllb17 length=3 label="Interval since last live birth Recode 17"; attrib isllb10 length=3 label="Interval since last live birth Recode 10"; attrib isllb8 length=3 label="Interval since last live birth Recode 8"; attrib lfdmon length=3 label="Date of Last Fetal Death - Month"; attrib lfdyr length=3 label="Date of Last Fetal Death - Year"; attrib dlfd length=3 label="Detail Interval Since Last Fetal Death"; attrib dterm length=3 label="Detail Interval Since Termination of Last Pregnancy"; attrib term9 length=3 label="Interval Since Termination of Last Pregnancy Recode 9"; attrib outcome length=3 label="Outcome of Last Pregnancy"; attrib mplbir length=3 label="Mother's Place of Birth"; attrib nprevis length=3 label="Total Number of Prenatal Visits"; attrib legitstrflg length=3 label="Legitimacy (by state) flag"; attrib educstrflg length=3 label="Education of Parents (By State) flag"; attrib lmprflg length=3 label="Date of Last Normal Menses (by state) flag"; attrib monprerflg length=3 label="Month prenatal care began (by state) flag"; attrib llbrflg length=3 label="Date of Last Live Birth (by State) flag"; attrib lfdrflg length=3 label="Date of Last Fetal Death (by State) flag"; attrib legitsmsarflg length=3 label=" Legitimacy (by smsa) flag"; attrib educsmsarflg length=3 label="Education of Parents (By State) flag"; attrib congenrflg length=3 label="Congenital Malformations (by state) flag"; attrib nprevisrflg length=3 label="Total Number of Prenatal Visits (by state) flag"; attrib injuryrflg length=3 label="Birth Injuries (by state) flag (Not 1972)"; attrib legitstoflg length=3 label="Legitimacy (by state) flag"; attrib educstoflg length=3 label="Educationof Parents (by state) flag"; attrib lmpoflg length=3 label="Date of last normal menses (by state) flg"; attrib monpreoflg length=3 label="Month prenatal care began (by state)"; attrib llboflg length=3 label="Date of last live birth (by state) flag"; attrib lfdoflg length=3 label="Date of last fetal death (by state) flag"; attrib congenflg length=3 label="Congenital Malformations (by state) flag"; attrib nprevisoflg length=3 label="Total Number of Prenatal Visits (by state) flag"; attrib injuryoflg length=3 label="Birth Injuries (by state) flag (Not 1972)"; attrib attend length=3 label="Person in Attendance (Effective 1975)"; attrib recwt length=3 label="Record Weight"; attrib nprev28 length=3 label="Number of Prenatal Visits Recode"; INPUT @1 datayear 1. @2 shipnum $2. @4 reparea $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 divres 1. @26 stsubres 2. @28 statenat 2. @28 cntynat 5. @33 divocc 1. @33 stsubocc 2. @35 csex 1. @36 birattnd 1. @37 frace 1. @38 mrace 1. @39 crace 1. @40 crace3 1. @41 dmage 2. @43 mage36 2. @45 mage15 2. @47 mage12 2. @49 mage8 1. @50 mage7 1. @51 mage6 1. @52 nlbnl 2. @54 nlbnd 2. @56 nlbd 2. @58 dtotord 2. @60 totord9 1. @61 dlivord 2. @63 livord9 1. @64 livord8 1. @65 livord7 1. @66 livord6 1. @67 livord3 1. @69 dfage 2. @71 fage11 2. @73 dbirwt 4. @77 birwt12 2. @79 birwt3 1. @81 dplural 1. @82 plural3 1. @83 plural2 1. @84 birmon 2. @86 birday 2. @88 lmpmon 2. @90 lmpday 2. @92 lmpyr $1. @93 dgestat 2. @95 gestat10 2. @97 gestat3 1. @98 dmeduc 2. @100 meduc14 2. @102 meduc6 1. @103 dfeduc 2. @105 feduc14 2. @107 dlegit 1. @108 legit3 1. @109 monprec $1. @110 mpre10 2. @112 mpre6 1. @113 llbmon 2. @115 llbyr 2. @117 disllb 3. @120 isllb17 2. @122 isllb10 2. @124 isllb8 1. @125 lfdmon 2. @127 lfdyr 2. @130 dlfd 3. @133 dterm 3. @136 term9 1. @137 outcome 1. @138 mplbir 2. @140 nprevis 2. @146 legitstrflg 1. @147 educstrflg 1. @148 lmprflg 1. @149 monprerflg 1. @150 llbrflg 1. @151 lfdrflg 1. @152 legitsmsarflg 1. @153 educsmsarflg 1. @154 congenrflg 1. @155 nprevisrflg 1. @156 injuryrflg 1. @161 legitstoflg 1. @162 educstoflg 1. @163 lmpoflg 1. @164 monpreoflg 1. @165 llboflg 1. @166 lfdoflg 1. @167 congenflg 1. @168 nprevisoflg 1. @169 injuryoflg 1. @176 attend 1. @208 recwt 1. @209 nprev28 2. ; proc print data=&dataset. (obs=6); proc contents data=&dataset.; /* 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. */