*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Wed Nov 19 11:15:18 EST 2008 This program reads the 1987 *U.S. Numerator 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/LinkCO87USnum.dat.bz2 "; * The following line should contain the name of the SAS dataset ; %let dataset = library.linkco1987us_num; 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 censtatebo length=3 label="State of Occurrence - Birth (1960 Census State Code)"; attrib regnoccb length=3 label="Region of Occurrence - Birth"; 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"; attrib dthyr length=4 label="Year of Death"; attrib rectyped length=3 label="Record type"; attrib resstatd length=3 label="Resident Status - Death"; attrib regnoccd length=3 label="Region of Occurrence - Death"; attrib divoccd length=3 label="Division of Occurrence - Death"; attrib censtatedo length=3 label="State of Occurrence - Death (1960 Census State Code)"; attrib estatedo length=3 label="Expanded State of Occurrence - Death"; attrib dostate length=3 label="State of Occurrence - Death (NCHS Codes)"; attrib cntyoccd length=$5 label="NCHS County of Occurence - Death"; attrib regnresd length=3 label="Region of Residence - Death"; attrib divresd length=3 label="Division of Residence - Death"; attrib censtatedr length=3 label="State of Residence - Death (1960 Census State Code)"; attrib estatedr length=3 label="Expanded State of Residence - Death"; attrib drstate length=3 label="State of Residence - Death (NCHS Codes)"; attrib cntyresd length=$5 label="County of Residence - Death (NCHS Codes)"; attrib cityresd length=$3 label="City of Residence - NCHS Codes - Death "; attrib ager5 length=3 label="Infant Age Recode 5"; attrib ager76 length=3 label="Infant Age Recode 76"; attrib ager38 length=3 label="Infant Age Recode 38"; attrib hospd length=3 label="Hospital and Patient Status"; attrib autopsy length=3 label="Autopsy Performed"; attrib accidpl length=3 label="Place of Accident for Causes E850-E869 and E880-E928"; attrib ucod length=$4 label="ICD Code (9th Revision)"; attrib ucodr61 length=3 label="61 Infant Cause Recode"; attrib eanum length=3 label="Number of Entity-Axis Conditions"; attrib econdp_1 length=3 label="Part/line number on certificate 1"; attrib econds_1 length=$1 label="Sequence of condition within part/line 1"; attrib enicon_1 length=$4 label="Condition code 1 (ICD 9th Revision)"; attrib eniflag_1 length=3 label="Nature of Injury Flag 1"; attrib econdp_2 length=3 label="Part/line number on certificate 2"; attrib econds_2 length=$1 label="Sequence of condition within part/line 2"; attrib enicon_2 length=$4 label="Condition code 2 (ICD 9th Revision)"; attrib eniflag_2 length=3 label="Nature of Injury Flag 2"; attrib econdp_3 length=3 label="Part/line number on certificate 3"; attrib econds_3 length=$1 label="Sequence of condition within part/line 3"; attrib enicon_3 length=$4 label="Condition code 3 (ICD 9th Revision)"; attrib eniflag_3 length=3 label="Nature of Injury Flag 3"; attrib econdp_4 length=3 label="Part/line number on certificate 4"; attrib econds_4 length=$1 label="Sequence of condition within part/line 4"; attrib enicon_4 length=$4 label="Condition code 4 (ICD 9th Revision)"; attrib eniflag_4 length=3 label="Nature of Injury Flag 4"; attrib econdp_5 length=3 label="Part/line number on certificate 5"; attrib econds_5 length=$1 label="Sequence of condition within part/line 5"; attrib enicon_5 length=$4 label="Condition code 5 (ICD 9th Revision)"; attrib eniflag_5 length=3 label="Nature of Injury Flag 5"; attrib econdp_6 length=3 label="Part/line number on certificate 6"; attrib econds_6 length=$1 label="Sequence of condition within part/line 6"; attrib enicon_6 length=$4 label="Condition code 6 (ICD 9th Revision)"; attrib eniflag_6 length=3 label="Nature of Injury Flag 6"; attrib econdp_7 length=3 label="Part/line number on certificate 7"; attrib econds_7 length=$1 label="Sequence of condition within part/line 7"; attrib enicon_7 length=$4 label="Condition code 7 (ICD 9th Revision)"; attrib eniflag_7 length=3 label="Nature of Injury Flag 7"; attrib econdp_8 length=3 label="Part/line number on certificate 8"; attrib econds_8 length=$1 label="Sequence of condition within part/line 8"; attrib enicon_8 length=$4 label="Condition code 8 (ICD 9th Revision)"; attrib eniflag_8 length=3 label="Nature of Injury Flag 8"; attrib econdp_9 length=3 label="Part/line number on certificate 9"; attrib econds_9 length=$1 label="Sequence of condition within part/line 9"; attrib enicon_9 length=$4 label="Condition code 9 (ICD 9th Revision)"; attrib eniflag_9 length=3 label="Nature of Injury Flag 9"; attrib econdp_10 length=3 label="Part/line number on certificate 10"; attrib econds_10 length=$1 label="Sequence of condition within part/line 10"; attrib enicon_10 length=$4 label="Condition code 10 (ICD 9th Revision)"; attrib eniflag_10 length=3 label="Nature of Injury Flag 10"; attrib econdp_11 length=3 label="Part/line number on certificate 11"; attrib econds_11 length=$1 label="Sequence of condition within part/line 11"; attrib enicon_11 length=$4 label="Condition code 11 (ICD 9th Revision)"; attrib eniflag_11 length=3 label="Nature of Injury Flag 11"; attrib econdp_12 length=3 label="Part/line number on certificate 12"; attrib econds_12 length=$1 label="Sequence of condition within part/line 12"; attrib enicon_12 length=$4 label="Condition code 12 (ICD 9th Revision)"; attrib eniflag_12 length=3 label="Nature of Injury Flag 12"; attrib econdp_13 length=3 label="Part/line number on certificate 13"; attrib econds_13 length=$1 label="Sequence of condition within part/line 13"; attrib enicon_13 length=$4 label="Condition code 13 (ICD 9th Revision)"; attrib eniflag_13 length=3 label="Nature of Injury Flag 13"; attrib econdp_14 length=3 label="Part/line number on certificate 14"; attrib econds_14 length=$1 label="Sequence of condition within part/line 14"; attrib enicon_14 length=$4 label="Condition code 14 (ICD 9th Revision)"; attrib eniflag_14 length=3 label="Nature of Injury Flag 14"; attrib econdp_15 length=3 label="Part/line number on certificate 15"; attrib econds_15 length=$1 label="Sequence of condition within part/line 15"; attrib enicon_15 length=$4 label="Condition code 15 (ICD 9th Revision)"; attrib eniflag_15 length=3 label="Nature of Injury Flag 15"; attrib econdp_16 length=3 label="Part/line number on certificate 16"; attrib econds_16 length=$1 label="Sequence of condition within part/line 16"; attrib enicon_16 length=$4 label="Condition code 16 (ICD 9th Revision)"; attrib eniflag_16 length=3 label="Nature of Injury Flag 16"; attrib econdp_17 length=3 label="Part/line number on certificate 17"; attrib econds_17 length=$1 label="Sequence of condition within part/line 17"; attrib enicon_17 length=$4 label="Condition code 17 (ICD 9th Revision)"; attrib eniflag_17 length=3 label="Nature of Injury Flag 17"; attrib econdp_18 length=3 label="Part/line number on certificate 18"; attrib econds_18 length=$1 label="Sequence of condition within part/line 18"; attrib enicon_18 length=$4 label="Condition code 18 (ICD 9th Revision)"; attrib eniflag_18 length=3 label="Nature of Injury Flag 18"; attrib econdp_19 length=3 label="Part/line number on certificate 19"; attrib econds_19 length=$1 label="Sequence of condition within part/line 19"; attrib enicon_19 length=$4 label="Condition code 19 (ICD 9th Revision)"; attrib eniflag_19 length=3 label="Nature of Injury Flag 19"; attrib econdp_20 length=3 label="Part/line number on certificate 20"; attrib econds_20 length=$1 label="Sequence of condition within part/line 20"; attrib enicon_20 length=$4 label="Condition code 20 (ICD 9th Revision)"; attrib eniflag_20 length=3 label="Nature of Injury Flag 20"; attrib ranum length=3 label="Number of Record-Axis Conditions"; attrib record_1 length=$4 label="Record-Axis Condition Code 1 (ICD 9th Revision)"; attrib rniflag_1 length=3 label="Nature of Injury Flag"; attrib record_2 length=$4 label="Record-Axis Condition Code 2 (ICD 9th Revision)"; attrib rniflag_2 length=3 label="Nature of Injury Flag"; attrib record_3 length=$4 label="Record-Axis Condition Code 3 (ICD 9th Revision)"; attrib rniflag_3 length=3 label="Nature of Injury Flag"; attrib record_4 length=$4 label="Record-Axis Condition Code 4 (ICD 9th Revision)"; attrib rniflag_4 length=3 label="Nature of Injury Flag"; attrib record_5 length=$4 label="Record-Axis Condition Code 5 (ICD 9th Revision)"; attrib rniflag_5 length=3 label="Nature of Injury Flag"; attrib record_6 length=$4 label="Record-Axis Condition Code 6 (ICD 9th Revision)"; attrib rniflag_6 length=3 label="Nature of Injury Flag"; attrib record_7 length=$4 label="Record-Axis Condition Code 7 (ICD 9th Revision)"; attrib rniflag_7 length=3 label="Nature of Injury Flag"; attrib record_8 length=$4 label="Record-Axis Condition Code 8 (ICD 9th Revision)"; attrib rniflag_8 length=3 label="Nature of Injury Flag"; attrib record_9 length=$4 label="Record-Axis Condition Code 9 (ICD 9th Revision)"; attrib rniflag_9 length=3 label="Nature of Injury Flag"; attrib record_10 length=$4 label="Record-Axis Condition Code 10 (ICD 9th Revision)"; attrib rniflag_10 length=3 label="Nature of Injury Flag"; attrib record_11 length=$4 label="Record-Axis Condition Code 11 (ICD 9th Revision)"; attrib rniflag_11 length=3 label="Nature of Injury Flag"; attrib record_12 length=$4 label="Record-Axis Condition Code 12 (ICD 9th Revision)"; attrib rniflag_12 length=3 label="Nature of Injury Flag"; attrib record_13 length=$4 label="Record-Axis Condition Code 13 (ICD 9th Revision)"; attrib rniflag_13 length=3 label="Nature of Injury Flag"; attrib record_14 length=$4 label="Record-Axis Condition Code 14 (ICD 9th Revision)"; attrib rniflag_14 length=3 label="Nature of Injury Flag"; attrib record_15 length=$4 label="Record-Axis Condition Code 15 (ICD 9th Revision)"; attrib rniflag_15 length=3 label="Nature of Injury Flag"; attrib record_16 length=$4 label="Record-Axis Condition Code 16 (ICD 9th Revision)"; attrib rniflag_16 length=3 label="Nature of Injury Flag"; attrib record_17 length=$4 label="Record-Axis Condition Code 17 (ICD 9th Revision)"; attrib rniflag_17 length=3 label="Nature of Injury Flag"; attrib record_18 length=$4 label="Record-Axis Condition Code 18 (ICD 9th Revision)"; attrib rniflag_18 length=3 label="Nature of Injury Flag"; attrib record_19 length=$4 label="Record-Axis Condition Code 19 (ICD 9th Revision)"; attrib rniflag_19 length=3 label="Nature of Injury Flag"; attrib record_20 length=$4 label="Record-Axis Condition Code 20 (ICD 9th Revision)"; attrib rniflag_20 length=3 label="Nature of Injury Flag"; INPUT @1 matchs 1. @2 datayear 4. @10 rectype 1. @11 resstatb 1. @13 censtatebo 2. @12 regnoccb 1. @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. @194 dthyr 4. @198 rectyped 1. @199 resstatd 1. @200 regnoccd 1. @201 divoccd 1. @201 censtatedo 2. @203 estatedo 2. @205 dostate 2. @205 cntyoccd $5. @210 regnresd 1. @211 divresd 1. @211 censtatedr 2. @213 estatedr 2. @215 drstate 2. @215 cntyresd $5. @220 cityresd $3. @223 ager5 1. @224 ager76 2. @226 ager38 2. @228 hospd 1. @229 autopsy 1. @230 accidpl 1. @231 ucod $4. @235 ucodr61 2. @238 eanum 2. @240 econdp_1 1. @241 econds_1 $1. @242 enicon_1 $4. @246 eniflag_1 1. @247 econdp_2 1. @248 econds_2 $1. @249 enicon_2 $4. @253 eniflag_2 1. @254 econdp_3 1. @255 econds_3 $1. @256 enicon_3 $4. @260 eniflag_3 1. @261 econdp_4 1. @262 econds_4 $1. @263 enicon_4 $4. @267 eniflag_4 1. @268 econdp_5 1. @269 econds_5 $1. @270 enicon_5 $4. @274 eniflag_5 1. @275 econdp_6 1. @276 econds_6 $1. @277 enicon_6 $4. @281 eniflag_6 1. @282 econdp_7 1. @283 econds_7 $1. @284 enicon_7 $4. @288 eniflag_7 1. @289 econdp_8 1. @290 econds_8 $1. @291 enicon_8 $4. @295 eniflag_8 1. @296 econdp_9 1. @297 econds_9 $1. @298 enicon_9 $4. @302 eniflag_9 1. @303 econdp_10 1. @304 econds_10 $1. @305 enicon_10 $4. @309 eniflag_10 1. @310 econdp_11 1. @311 econds_11 $1. @312 enicon_11 $4. @316 eniflag_11 1. @317 econdp_12 1. @318 econds_12 $1. @319 enicon_12 $4. @323 eniflag_12 1. @324 econdp_13 1. @325 econds_13 $1. @326 enicon_13 $4. @330 eniflag_13 1. @331 econdp_14 1. @332 econds_14 $1. @333 enicon_14 $4. @337 eniflag_14 1. @338 econdp_15 1. @339 econds_15 $1. @340 enicon_15 $4. @344 eniflag_15 1. @345 econdp_16 1. @346 econds_16 $1. @347 enicon_16 $4. @351 eniflag_16 1. @352 econdp_17 1. @353 econds_17 $1. @354 enicon_17 $4. @358 eniflag_17 1. @359 econdp_18 1. @360 econds_18 $1. @361 enicon_18 $4. @365 eniflag_18 1. @366 econdp_19 1. @367 econds_19 $1. @368 enicon_19 $4. @372 eniflag_19 1. @373 econdp_20 1. @374 econds_20 $1. @375 enicon_20 $4. @379 eniflag_20 1. @380 ranum 2. @382 record_1 $4. @386 rniflag_1 1. @387 record_2 $4. @391 rniflag_2 1. @392 record_3 $4. @396 rniflag_3 1. @397 record_4 $4. @401 rniflag_4 1. @402 record_5 $4. @406 rniflag_5 1. @407 record_6 $4. @411 rniflag_6 1. @412 record_7 $4. @416 rniflag_7 1. @417 record_8 $4. @421 rniflag_8 1. @422 record_9 $4. @426 rniflag_9 1. @427 record_10 $4. @431 rniflag_10 1. @432 record_11 $4. @436 rniflag_11 1. @437 record_12 $4. @441 rniflag_12 1. @442 record_13 $4. @446 rniflag_13 1. @447 record_14 $4. @451 rniflag_14 1. @452 record_15 $4. @456 rniflag_15 1. @457 record_16 $4. @461 rniflag_16 1. @462 record_17 $4. @466 rniflag_17 1. @467 record_18 $4. @471 rniflag_18 1. @472 record_19 $4. @476 rniflag_19 1. @477 record_20 $4. @481 rniflag_20 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. */