*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:41:37 EDT 2007 This program reads the 2005 National Health Interview Survey 2005 familyxx 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/familyxx.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2005_familyxx ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; attrib rectype length=3 label=""; attrib srvy_yr length=4 label=""; attrib hhx length=$6 label=""; attrib fmx length=$2 label=""; attrib wtfa_fam length=4 label=""; attrib fint_y_p length=4 label=""; attrib fint_m_p length=3 label=""; attrib teln_flg length=3 label=""; attrib inside length=3 label=""; attrib noserv length=3 label=""; attrib howlngwk length=3 label=""; attrib telcel length=3 label=""; attrib wrkcel length=3 label=""; attrib vcelnum length=3 label=""; attrib curwrk length=3 label=""; attrib telh_flg length=3 label=""; attrib teldirc length=3 label=""; attrib rnoserv length=3 label=""; attrib rh1lngdy length=3 label=""; attrib rh2lngdy length=3 label=""; attrib flngintv length=3 label=""; attrib fm_size length=3 label=""; attrib fm_kids length=3 label=""; attrib fm_eldr length=3 label=""; attrib fm_type length=3 label=""; attrib fm_strcp length=3 label=""; attrib fm_strp length=3 label=""; attrib fm_educ1 length=3 label=""; attrib fchlmyn length=3 label=""; attrib fchlmct length=3 label=""; attrib fspedyn length=3 label=""; attrib fspedct length=3 label=""; attrib flaadlyn length=3 label=""; attrib flaadlct length=3 label=""; attrib fliadlyn length=3 label=""; attrib fliadlct length=3 label=""; attrib fwklimyn length=3 label=""; attrib fwklimct length=3 label=""; attrib fwalkyn length=3 label=""; attrib fwalkct length=3 label=""; attrib frememyn length=3 label=""; attrib frememct length=3 label=""; attrib fanylyn length=3 label=""; attrib fanylct length=3 label=""; attrib fhstatex length=3 label=""; attrib fhstatvg length=3 label=""; attrib fhstatg length=3 label=""; attrib fhstatfr length=3 label=""; attrib fhstatpr length=3 label=""; attrib fdmedyn length=3 label=""; attrib fdmedct length=3 label=""; attrib fnmedyn length=3 label=""; attrib fnmedct length=3 label=""; attrib fhospyn length=3 label=""; attrib fhospct length=3 label=""; attrib fhchmyn length=3 label=""; attrib fhchmct length=3 label=""; attrib fhcphryn length=3 label=""; attrib fhcphrct length=3 label=""; attrib fhcdvyn length=3 label=""; attrib fhcdvct length=3 label=""; attrib f10dvyn length=3 label=""; attrib f10dvct length=3 label=""; attrib fhdstct length=3 label=""; attrib fdglwct1 length=3 label=""; attrib fdglwct2 length=3 label=""; attrib fwrklwct length=3 label=""; attrib fsalyn length=3 label=""; attrib fsalct length=3 label=""; attrib fseincyn length=3 label=""; attrib fseincct length=3 label=""; attrib fssrryn length=3 label=""; attrib fssrrct length=3 label=""; attrib fpensyn length=3 label=""; attrib fpensct length=3 label=""; attrib fopensyn length=3 label=""; attrib fopensct length=3 label=""; attrib fssiyn length=3 label=""; attrib fssict length=3 label=""; attrib ftanfyn length=3 label=""; attrib ftanfct length=3 label=""; attrib fowbenyn length=3 label=""; attrib fowbenct length=3 label=""; attrib fintr1yn length=3 label=""; attrib fintr1ct length=3 label=""; attrib fdivdyn length=3 label=""; attrib fdivdct length=3 label=""; attrib fchspyn length=3 label=""; attrib fchspct length=3 label=""; attrib fincotyn length=3 label=""; attrib fincotct length=3 label=""; attrib incgrp length=3 label=""; attrib rat_cat length=3 label=""; attrib houseown length=3 label=""; attrib fgah length=3 label=""; attrib fssaplyn length=3 label=""; attrib fssaplct length=3 label=""; attrib fsdaplyn length=3 label=""; attrib fsdaplct length=3 label=""; attrib ffdstyn length=3 label=""; attrib ffdstct length=3 label=""; attrib fwicyn length=3 label=""; attrib fwicct length=3 label=""; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 fmx $2. @15 wtfa_fam 6. @21 fint_y_p 4. @25 fint_m_p 2. @27 teln_flg 1. @28 inside 1. @29 noserv 1. @30 howlngwk 2. @32 telcel 1. @33 wrkcel 2. @35 vcelnum 1. @36 curwrk 1. @37 telh_flg 1. @38 teldirc 1. @39 rnoserv 1. @40 rh1lngdy 3. @43 rh2lngdy 3. @46 flngintv 1. @47 fm_size 2. @49 fm_kids 2. @51 fm_eldr 2. @53 fm_type 1. @54 fm_strcp 2. @56 fm_strp 2. @58 fm_educ1 2. @60 fchlmyn 1. @61 fchlmct 2. @63 fspedyn 1. @64 fspedct 2. @66 flaadlyn 1. @67 flaadlct 2. @69 fliadlyn 1. @70 fliadlct 2. @72 fwklimyn 1. @73 fwklimct 2. @75 fwalkyn 1. @76 fwalkct 2. @78 frememyn 1. @79 frememct 2. @81 fanylyn 1. @82 fanylct 2. @84 fhstatex 2. @86 fhstatvg 2. @88 fhstatg 2. @90 fhstatfr 2. @92 fhstatpr 2. @94 fdmedyn 1. @95 fdmedct 2. @97 fnmedyn 1. @98 fnmedct 2. @100 fhospyn 1. @101 fhospct 2. @103 fhchmyn 1. @104 fhchmct 2. @106 fhcphryn 1. @107 fhcphrct 2. @109 fhcdvyn 1. @110 fhcdvct 2. @112 f10dvyn 1. @113 f10dvct 2. @115 fhdstct 2. @117 fdglwct1 2. @119 fdglwct2 2. @121 fwrklwct 2. @123 fsalyn 1. @124 fsalct 2. @126 fseincyn 1. @127 fseincct 2. @129 fssrryn 1. @130 fssrrct 2. @132 fpensyn 1. @133 fpensct 2. @135 fopensyn 1. @136 fopensct 2. @138 fssiyn 1. @139 fssict 2. @141 ftanfyn 1. @142 ftanfct 2. @144 fowbenyn 1. @145 fowbenct 2. @147 fintr1yn 1. @148 fintr1ct 2. @150 fdivdyn 1. @151 fdivdct 2. @153 fchspyn 1. @154 fchspct 2. @156 fincotyn 1. @157 fincotct 2. @159 incgrp 2. @161 rat_cat 2. @163 houseown 1. @164 fgah 1. @165 fssaplyn 1. @166 fssaplct 2. @168 fsdaplyn 1. @169 fsdaplct 2. @171 ffdstyn 1. @172 ffdstct 2. @174 fwicyn 1. @175 fwicct 2. ; proc print data=library.nhis2005_familyxx (obs=6); proc contents data=library.nhis2005_familyxx; /* 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. */