*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:45:55 EDT 2007 This program reads the 2006 National Health Interview Survey 2006 injverbt 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/injverbt.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2006_injverbt ; 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 fpx length=$2 label=""; attrib ipepno length=$2 label=""; attrib iphow length=$300 label=""; attrib ijbodyos length=$100 label=""; attrib ijtyp1os length=$100 label=""; attrib ijtyp2os length=$100 label=""; attrib ijtyp3os length=$100 label=""; attrib ijtyp4os length=$100 label=""; attrib ipothos length=$100 label=""; attrib ppoisos length=3 label=""; attrib ipwhatot length=3 label=""; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 fmx $2. @15 fpx $2. @17 ipepno $2. @19 iphow $300. @319 ijbodyos $100. @419 ijtyp1os $100. @519 ijtyp2os $100. @619 ijtyp3os $100. @719 ijtyp4os $100. @819 ipothos $100. @919 -101 ppoisos -918. @1019 -11 ipwhatot -1018. ; proc print data=library.nhis2006_injverbt (obs=6); proc contents data=library.nhis2006_injverbt; /* 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. */