*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:51:04 EDT 2007 This program reads the 2004 National Health Interview Survey 2004 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/2004/familyxx.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2004_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 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_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 flngintv 1. @41 fm_size 2. @43 fm_kids 2. @45 fm_eldr 2. @47 fm_type 1. @48 fm_strp 2. @50 fm_educ1 2. @52 fchlmyn 1. @53 fchlmct 2. @55 fspedyn 1. @56 fspedct 2. @58 flaadlyn 1. @59 flaadlct 2. @61 fliadlyn 1. @62 fliadlct 2. @64 fwklimyn 1. @65 fwklimct 2. @67 fwalkyn 1. @68 fwalkct 2. @70 frememyn 1. @71 frememct 2. @73 fanylyn 1. @74 fanylct 2. @76 fhstatex 2. @78 fhstatvg 2. @80 fhstatg 2. @82 fhstatfr 2. @84 fhstatpr 2. @86 fdmedyn 1. @87 fdmedct 2. @89 fnmedyn 1. @90 fnmedct 2. @92 fhospyn 1. @93 fhospct 2. @95 fhchmyn 1. @96 fhchmct 2. @98 fhcphryn 1. @99 fhcphrct 2. @101 fhcdvyn 1. @102 fhcdvct 2. @104 f10dvyn 1. @105 f10dvct 2. @107 fhdstct 2. @109 fdglwct1 2. @111 fdglwct2 2. @113 fwrklwct 2. @115 fsalyn 1. @116 fsalct 2. @118 fseincyn 1. @119 fseincct 2. @121 fssrryn 1. @122 fssrrct 2. @124 fpensyn 1. @125 fpensct 2. @127 fopensyn 1. @128 fopensct 2. @130 fssiyn 1. @131 fssict 2. @133 ftanfyn 1. @134 ftanfct 2. @136 fowbenyn 1. @137 fowbenct 2. @139 fintr1yn 1. @140 fintr1ct 2. @142 fdivdyn 1. @143 fdivdct 2. @145 fchspyn 1. @146 fchspct 2. @148 fincotyn 1. @149 fincotct 2. @151 incgrp 2. @153 rat_cat 2. @155 houseown 1. @156 fgah 1. @157 fssaplyn 1. @158 fssaplct 2. @160 fsdaplyn 1. @161 fsdaplct 2. @163 ffdstyn 1. @164 ffdstct 2. @166 fwicyn 1. @167 fwicct 2. ; proc print data=library.nhis2004_familyxx (obs=6); proc contents data=library.nhis2004_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. */