*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:45:36 EDT 2007 This program reads the 2005 National Health Interview Survey 2005 samchild 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/nhis/ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NHIS/2005/samchild.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2005_samchild ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; attrib rectype length=3 label=""; attrib srvy_yr length=4 label=""; attrib hhx length=$6 label=""; attrib intv_qrt length=3 label=""; attrib assignwk length=3 label=""; attrib fmx length=$2 label=""; attrib fpx length=$2 label=""; attrib wtia_sc length=4 label=""; attrib wtfa_sc length=4 label=""; attrib region length=3 label=""; attrib stratum length=3 label=""; attrib psu length=3 label=""; attrib sex length=3 label=""; attrib hispan_i length=3 label=""; attrib racerpi2 length=3 label=""; attrib mracrpi2 length=3 label=""; attrib mracbpi2 length=3 label=""; attrib age_p length=3 label=""; attrib csrespno length=$2 label=""; attrib csreltiv length=3 label=""; attrib bwgtlb length=3 label=""; attrib bwgtoz length=3 label=""; attrib bwgtmgr length=4 label=""; attrib amr1 length=3 label=""; attrib aodd1 length=3 label=""; attrib add2 length=3 label=""; attrib amr2 length=3 label=""; attrib aodd2 length=3 label=""; attrib condl1 length=3 label=""; attrib condl2 length=3 label=""; attrib condl3 length=3 label=""; attrib condl4 length=3 label=""; attrib condl5 length=3 label=""; attrib condl6 length=3 label=""; attrib condl7 length=3 label=""; attrib condl8 length=3 label=""; attrib condl9 length=3 label=""; attrib condl10 length=3 label=""; attrib cpox length=3 label=""; attrib cpox12mo length=3 label=""; attrib cashmev length=3 label=""; attrib casstill length=3 label=""; attrib cashyr length=3 label=""; attrib casmeryr length=3 label=""; attrib hayf1 length=3 label=""; attrib rallg1 length=3 label=""; attrib dallg1 length=3 label=""; attrib sallg1 length=3 label=""; attrib diarh1 length=3 label=""; attrib anemia1 length=3 label=""; attrib earinf1 length=3 label=""; attrib seize1 length=3 label=""; attrib hayf2 length=3 label=""; attrib rallg2 length=3 label=""; attrib dallg2 length=3 label=""; attrib sallg2 length=3 label=""; attrib diarh2 length=3 label=""; attrib anemia2 length=3 label=""; attrib fhead length=3 label=""; attrib earinf2 length=3 label=""; attrib seize2 length=3 label=""; attrib stutter length=3 label=""; attrib chstatyr length=3 label=""; attrib schdayr1 length=3 label=""; attrib ccold2w length=3 label=""; attrib cintil2w length=3 label=""; attrib chearst length=3 label=""; attrib cvision length=3 label=""; attrib cblind length=3 label=""; attrib ihspeq length=3 label=""; attrib ihmob length=3 label=""; attrib ihmobyr length=3 label=""; attrib probrx length=3 label=""; attrib learnd length=3 label=""; attrib cmhagm15 length=3 label=""; attrib mhiboy2 length=3 label=""; attrib cmhagf15 length=3 label=""; attrib mhigrl2 length=3 label=""; attrib cusualpl length=3 label=""; attrib cplkind length=3 label=""; attrib chcplrou length=3 label=""; attrib chcplknd length=3 label=""; attrib chcchgyr length=3 label=""; attrib chcchghi length=3 label=""; attrib chcdlyr1 length=3 label=""; attrib chcdlyr2 length=3 label=""; attrib chcdlyr3 length=3 label=""; attrib chcdlyr4 length=3 label=""; attrib chcdlyr5 length=3 label=""; attrib chcafyr length=3 label=""; attrib chcafyr1 length=3 label=""; attrib chcafyr2 length=3 label=""; attrib chcafyr3 length=3 label=""; attrib chcafyr4 length=3 label=""; attrib cdnlongr length=3 label=""; attrib chcsyr11 length=3 label=""; attrib chcsyr12 length=3 label=""; attrib chcsyr13 length=3 label=""; attrib chcsyr14 length=3 label=""; attrib chcsyr1 length=3 label=""; attrib chcsyr2 length=3 label=""; attrib chcsyr3 length=3 label=""; attrib chcsyr4 length=3 label=""; attrib chcsyr5 length=3 label=""; attrib chcsyr6 length=3 label=""; attrib chcsyr7 length=3 label=""; attrib chcsyr81 length=3 label=""; attrib chcsyr82 length=3 label=""; attrib chcsyr10 length=3 label=""; attrib chcsyrem length=3 label=""; attrib chpxyr_c length=3 label=""; attrib chernoy2 length=3 label=""; attrib chchyr length=3 label=""; attrib chchmoyr length=3 label=""; attrib chchnoy2 length=3 label=""; attrib chcnoyr2 length=3 label=""; attrib csrgyr length=3 label=""; attrib rsrgnoyr length=3 label=""; attrib cmdlongr length=3 label=""; attrib csnlamp length=3 label=""; attrib csnnum length=3 label=""; attrib cshfluyr length=3 label=""; attrib cshflu_m length=3 label=""; attrib cshflu_y length=4 label=""; attrib cspfluyr length=3 label=""; attrib cspflu_m length=3 label=""; attrib cspflu_y length=4 label=""; attrib rscl2_c2 length=3 label=""; attrib rscl2_e2 length=3 label=""; attrib rscl3_e3 length=3 label=""; attrib rscl5_p5 length=3 label=""; attrib rscl5_h5 length=3 label=""; attrib rscl6 length=3 label=""; attrib seediff length=3 label=""; attrib mrvsee length=3 label=""; attrib meddiff length=3 label=""; attrib mrvmed length=3 label=""; attrib medwhy length=3 label=""; attrib tretdiff length=3 label=""; attrib mrvtret length=3 label=""; attrib tretwhr1 length=3 label=""; attrib tretwhr2 length=3 label=""; attrib tretwhr3 length=3 label=""; attrib tretwhr4 length=3 label=""; attrib tretwhr5 length=3 label=""; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 intv_qrt 1. @14 assignwk 2. @16 fmx $2. @18 fpx $2. @20 wtia_sc 6. @26 wtfa_sc 6. @32 region 1. @33 stratum 3. @36 psu 1. @37 sex 1. @38 hispan_i 2. @40 racerpi2 2. @42 mracrpi2 2. @44 mracbpi2 2. @46 age_p 2. @48 csrespno $2. @50 csreltiv 2. @52 bwgtlb 2. @54 bwgtoz 2. @56 bwgtmgr 4. @60 amr1 1. @61 aodd1 1. @62 add2 1. @63 amr2 1. @64 aodd2 1. @65 condl1 1. @66 condl2 1. @67 condl3 1. @68 condl4 1. @69 condl5 1. @70 condl6 1. @71 condl7 1. @72 condl8 1. @73 condl9 1. @74 condl10 1. @75 cpox 1. @76 cpox12mo 1. @77 cashmev 1. @78 casstill 1. @79 cashyr 1. @80 casmeryr 1. @81 hayf1 1. @82 rallg1 1. @83 dallg1 1. @84 sallg1 1. @85 diarh1 1. @86 anemia1 1. @87 earinf1 1. @88 seize1 1. @89 hayf2 1. @90 rallg2 1. @91 dallg2 1. @92 sallg2 1. @93 diarh2 1. @94 anemia2 1. @95 fhead 1. @96 earinf2 1. @97 seize2 1. @98 stutter 1. @99 chstatyr 1. @100 schdayr1 3. @103 ccold2w 1. @104 cintil2w 1. @105 chearst 1. @106 cvision 1. @107 cblind 1. @108 ihspeq 1. @109 ihmob 1. @110 ihmobyr 1. @111 probrx 1. @112 learnd 1. @113 cmhagm15 1. @114 mhiboy2 2. @116 cmhagf15 1. @117 mhigrl2 2. @119 cusualpl 1. @120 cplkind 1. @121 chcplrou 1. @122 chcplknd 1. @123 chcchgyr 1. @124 chcchghi 1. @125 chcdlyr1 1. @126 chcdlyr2 1. @127 chcdlyr3 1. @128 chcdlyr4 1. @129 chcdlyr5 1. @130 chcafyr 1. @131 chcafyr1 1. @132 chcafyr2 1. @133 chcafyr3 1. @134 chcafyr4 1. @135 cdnlongr 1. @136 chcsyr11 1. @137 chcsyr12 1. @138 chcsyr13 1. @139 chcsyr14 1. @140 chcsyr1 1. @141 chcsyr2 1. @142 chcsyr3 1. @143 chcsyr4 1. @144 chcsyr5 1. @145 chcsyr6 1. @146 chcsyr7 1. @147 chcsyr81 1. @148 chcsyr82 1. @149 chcsyr10 1. @150 chcsyrem 1. @151 chpxyr_c 1. @152 chernoy2 2. @154 chchyr 1. @155 chchmoyr 2. @157 chchnoy2 2. @159 chcnoyr2 2. @161 csrgyr 1. @162 rsrgnoyr 2. @164 cmdlongr 1. @165 csnlamp 1. @166 csnnum 3. @169 cshfluyr 1. @170 cshflu_m 2. @172 cshflu_y 4. @176 cspfluyr 1. @177 cspflu_m 2. @179 cspflu_y 4. @183 rscl2_c2 1. @184 rscl2_e2 1. @185 rscl3_e3 1. @186 rscl5_p5 1. @187 rscl5_h5 1. @188 rscl6 1. @189 seediff 1. @190 mrvsee 1. @191 meddiff 1. @192 mrvmed 1. @193 medwhy 1. @194 tretdiff 1. @195 mrvtret 1. @196 tretwhr1 1. @197 tretwhr2 1. @198 tretwhr3 1. @199 tretwhr4 1. @200 tretwhr5 1. ; proc print data=library.nhis2005_samchild (obs=6); proc contents data=library.nhis2005_samchild; /* 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. */