*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Wed Nov 19 11:15:17 EST 2008 This program reads the 1987 *U.S. Denominator Linked Birth Infant Death Birth Cohort 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 "bzcat /homes/data/lbid/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/DVS/cohortlinkedus/LinkCO87USden.dat.bz2 "; * The following line should contain the name of the SAS dataset ; %let dataset = library.linkco1987us_den; DATA &dataset ; INFILE datafile LRECL = 20000 ; attrib matchs length=3 label="Match Status"; attrib datayear length=4 label="Year of Birth"; attrib rectype length=3 label="Record type"; attrib resstatb length=3 label="Resident Status - Birth"; attrib regnoccb length=3 label="Region of Occurrence - Birth"; attrib censtatebo length=3 label="State of Occurrence - Birth (1960 Census State Code)"; attrib estatebo length=3 label="Expanded State of Occurrence - Birth"; attrib divoccb length=3 label="Division of Occurrence - Birth"; attrib bostate length=4 label="State of Occurrence - Birth (NCHS Codes)"; attrib cntyoccb length=$5 label="NCHS County of Occurence - Birth"; attrib regnresb length=3 label="Region of Residence - Birth"; attrib divresb length=3 label="Division of Residence - Birth"; attrib censtatebr length=3 label="State of Residence - Birth (1960 Census State Code)"; attrib estatebr length=3 label="Expanded State of Residence - Birth"; attrib brstate length=3 label="State of Residence - Birth (NCHS Codes)"; attrib cntyresb length=$5 label="NCHS County of Residence - Birth"; attrib cityresb length=$3 label="City of Residence (NCHS Codes) - Birth"; attrib crace length=3 label="Race of Child"; attrib crace3 length=3 label="Race of Child Recode 3"; attrib csex length=3 label="Sex of Child"; attrib dgestat length=3 label="Gestation"; attrib gestat10 length=3 label="Gestation Recode 10"; attrib dbirwt length=4 label="Birthweight"; attrib birwt14 length=3 label="Birthweight Recode 14"; attrib birwt3 length=3 label="Birthweight Recode 3"; attrib dplural length=3 label="Plurality"; attrib omaps length=3 label="One Minute Apgar Score"; attrib fmaps length=3 label="Five Minute Apgar Score"; attrib origm length=3 label="Origin or Descent of Mother"; attrib mrace length=3 label="Race of Mother"; attrib dmage length=3 label="Age of Mother"; attrib mage12 length=3 label="Age of Mother recode 12"; attrib dmeduc length=3 label="Education of Mother Detail"; attrib meduc6 length=3 label="Education of Mother Recode 6"; attrib dmar length=3 label="Marital Status"; attrib mplbir length=3 label="Mother's Place of Birth"; attrib origf length=3 label="Origin or Descent of Father"; attrib frace length=3 label="Race of Father"; attrib dfage length=3 label="Age of Father"; attrib dfeduc length=3 label="Education of Father"; attrib disllb length=3 label="Interval since last live birth"; attrib outcome length=3 label="Outcome of Last Pregnancy"; attrib dterm length=3 label="Detail Interval Since Termination of Last Pregnancy"; attrib mpcb length=$2 label="Detail Month Prenatal Care began"; attrib mpcb6 length=3 label="Month Prenatal Care began Recode 6"; attrib nprevis length=3 label="Total Number of Prenatal Visits"; attrib dtotord length=3 label="Total birth order"; attrib totord9 length=3 label="Total birth order recode 9"; attrib dlivord length=3 label="Detail Live birth order"; attrib livord9 length=3 label="Live birth order Recode 9"; attrib pldel length=3 label="Place of Delivery"; attrib birattnd length=3 label="Attendant at birth"; INPUT @1 matchs 1. @2 datayear 4. @10 rectype 1. @11 resstatb 1. @12 regnoccb 1. @13 censtatebo 2. @15 estatebo 2. @13 divoccb 1. @17 bostate 5. @17 cntyoccb $5. @22 regnresb 1. @23 divresb 1. @23 censtatebr 2. @25 estatebr 2. @27 brstate 2. @27 cntyresb $5. @32 cityresb $3. @36 crace 1. @37 crace3 1. @38 csex 1. @39 dgestat 2. @41 gestat10 2. @43 dbirwt 4. @47 birwt14 2. @49 birwt3 1. @50 dplural 1. @51 omaps 2. @53 fmaps 2. @55 origm 2. @57 mrace 1. @58 dmage 2. @60 mage12 2. @62 dmeduc 2. @64 meduc6 2. @65 dmar 1. @66 mplbir 2. @68 origf 2. @70 frace 1. @71 dfage 2. @73 dfeduc 2. @75 disllb 3. @76 outcome 1. @77 dterm 3. @78 mpcb $2. @80 mpcb6 1. @81 nprevis 2. @83 dtotord 2. @85 totord9 1. @86 dlivord 2. @88 livord9 1. @89 pldel 1. @90 birattnd 1. ; proc print data=&dataset. (obs=6); proc contents data=&dataset.; /* Copyright 2008 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. */