*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:45:48 EDT 2007 This program reads the 2006 National Health Interview Survey 2006 househld 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/2006/househld.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2006_househld ; 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 wtia_hh length=4 label=""; attrib wtfa_hh length=4 label=""; attrib livqrt length=3 label=""; attrib non_intv length=3 label=""; attrib acpt_fam length=3 label=""; attrib rej_fam length=3 label=""; attrib acpt_per length=3 label=""; attrib rej_per length=3 label=""; attrib acptchld length=3 label=""; attrib region length=3 label=""; attrib strat_p length=3 label=""; attrib psu_p length=3 label=""; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 intv_qrt 1. @14 assignwk 2. @16 wtia_hh 6. @22 wtfa_hh 6. @28 livqrt 2. @30 non_intv 1. @31 acpt_fam 2. @33 rej_fam 2. @35 acpt_per 2. @37 rej_per 2. @39 acptchld 2. @41 region 1. @42 strat_p 3. @45 psu_p 2. ; proc print data=library.nhis2006_househld (obs=6); proc contents data=library.nhis2006_househld; /* 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. */