*options obs=100 ; options nocenter ; /*------------------------------------------------ by Jean Roth Mon Jul 2 15:45:51 EDT 2007 This program reads the 2006 National Health Interview Survey 2006 injpoiep 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/injpoiep.exe "; * The following line should contain the name of the SAS dataset ; %let dataset = nhis2006_injpoiep ; 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 wtfa length=4 label=""; attrib ipdatem length=3 label=""; attrib ipdatey length=4 label=""; attrib ipdateno length=3 label=""; attrib ipdatetp length=3 label=""; attrib ipdatemt length=3 label=""; attrib rpckdmr length=3 label=""; attrib rpd length=3 label=""; attrib bietd length=3 label=""; attrib eietd length=3 label=""; attrib edipbr length=3 label=""; attrib impmeth length=3 label=""; attrib mumon length=3 label=""; attrib muyear length=4 label=""; attrib etflg length=3 label=""; attrib beiflg length=3 label=""; attrib icaus length=3 label=""; attrib ecaus length=3 label=""; attrib ijbody1 length=3 label=""; attrib ijbody2 length=3 label=""; attrib ijbody3 length=3 label=""; attrib ijbody4 length=3 label=""; attrib ijtype1a length=3 label=""; attrib ijtype1b length=3 label=""; attrib ijtype2a length=3 label=""; attrib ijtype2b length=3 label=""; attrib ijtype3a length=3 label=""; attrib ijtype3b length=3 label=""; attrib ijtype4a length=3 label=""; attrib ijtype4b length=3 label=""; attrib ppcc length=3 label=""; attrib ipev length=3 label=""; attrib iper length=3 label=""; attrib ipdo length=3 label=""; attrib ippchcp length=3 label=""; attrib ipoth length=3 label=""; attrib iphosp length=3 label=""; attrib ipihno length=3 label=""; attrib imtraf length=3 label=""; attrib imvwho length=3 label=""; attrib imvtyp length=3 label=""; attrib isbelt length=3 label=""; attrib ihelmt length=3 label=""; attrib ifall1 length=3 label=""; attrib ifall2 length=3 label=""; attrib ifallwhy length=3 label=""; attrib ppois length=3 label=""; attrib ipwhat1 length=3 label=""; attrib ipwhat2 length=3 label=""; attrib ipwher1 length=3 label=""; attrib ipwher2 length=3 label=""; attrib ipemp length=3 label=""; attrib ipwkls length=3 label=""; attrib ipstu length=3 label=""; attrib ipscls length=3 label=""; attrib icd9_1 length=$5 label=""; attrib icd9_2 length=$5 label=""; attrib icd9_3 length=$5 label=""; attrib icd9_4 length=$5 label=""; attrib icd9_5 length=$5 label=""; attrib icd9_6 length=$5 label=""; attrib icd9_7 length=$5 label=""; attrib icd9_8 length=$5 label=""; attrib ecode_1 length=$5 label=""; attrib ecode_2 length=$5 label=""; attrib ecode_3 length=$5 label=""; INPUT @1 rectype 2. @3 srvy_yr 4. @7 hhx $6. @13 fmx $2. @15 fpx $2. @17 ipepno $2. @19 wtfa 6. @25 ipdatem 2. @27 ipdatey 4. @31 ipdateno 3. @34 ipdatetp 1. @35 ipdatemt 1. @36 rpckdmr 3. @39 rpd 3. @42 bietd 3. @45 eietd 3. @48 edipbr 1. @49 impmeth 1. @50 mumon 2. @52 muyear 4. @56 etflg 1. @57 beiflg 1. @58 icaus 2. @60 ecaus 2. @62 ijbody1 2. @64 ijbody2 2. @66 ijbody3 2. @68 ijbody4 2. @70 ijtype1a 2. @72 ijtype1b 2. @74 ijtype2a 2. @76 ijtype2b 2. @78 ijtype3a 2. @80 ijtype3b 2. @82 ijtype4a 2. @84 ijtype4b 2. @86 ppcc 1. @87 ipev 1. @88 iper 1. @89 ipdo 1. @90 ippchcp 1. @91 ipoth 1. @92 iphosp 1. @93 ipihno 2. @95 imtraf 1. @96 imvwho 1. @97 imvtyp 2. @99 isbelt 1. @100 ihelmt 1. @101 ifall1 2. @103 ifall2 2. @105 ifallwhy 1. @106 ppois 1. @107 ipwhat1 2. @109 ipwhat2 2. @111 ipwher1 2. @113 ipwher2 2. @115 ipemp 1. @116 ipwkls 1. @117 ipstu 1. @118 ipscls 1. @119 icd9_1 $5. @124 icd9_2 $5. @129 icd9_3 $5. @134 icd9_4 $5. @139 icd9_5 $5. @144 icd9_6 $5. @149 icd9_7 $5. @154 icd9_8 $5. @159 ecode_1 $5. @164 ecode_2 $5. @169 ecode_3 $5. ; proc print data=library.nhis2006_injpoiep (obs=6); proc contents data=library.nhis2006_injpoiep; /* 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. */