*options obs=100 ; options nocenter ; **------------------------------------------------; ** by Jean Roth Tue Jun 5 23:59:43 EDT 2012 ** This program reads the 2008 SIPP Wave 7 Topical Module Research Data File ; ** Report errors to jroth@nber.org ; ** A value of -1 (or -1/# of implied decimals) indicates 'Not in Universe' ; ** 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 "/homes/data/sipp/2008"; * 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/sipp/2008/rw08w7.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = sipprw08w7 ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; ** ------------------------------------------------ ; ** The following variable names have been changed, ; ** if necessary: '$' to 'd', '-' to '_', '%' to 'p' ; ** ----------------------------------------------- ; attrib ssuid length=$12 label="SU: Sample Unit Identifier"; attrib spanel length=4 label="SU: Sample Code - Indicates Panel Year"; attrib swave length=3 label="SU: Wave of data collection"; attrib srefmon length=3 label="SU: Reference month of this record"; attrib epppnum length=$4 label="PE: Person number"; attrib repwgt1 length=8 label="WW: Person first replicate weight"; INPUT @1 ssuid $12. @13 spanel 4. @17 swave 2. @19 srefmon 1. @20 epppnum $4. @24 repwgt1 10.4 ; **------------------------------------------------; ** The PROC FORMAT statement will store the formats ; ** in a sas data set called fsipprw08w7 ; ** To use the stored formats in a subsequent program, ; ** use code like the following; ** proc format cntlin=library.fspprw08w7; ** PROC freq; ** tables pesex ; ** format pesex P135L.; ** For more information, consult PROC FORMAT in the SAS Procedures Guide ; **-----------------------------------------------; PROC FORMAT cntlout=library.fspprw08w7; ; VALUE spanel (default=32) 2008 = "Panel Year" ; VALUE srefmon (default=32) 1 = "First Reference month" 2 = "Second Reference month" 3 = "Third Reference month" 4 = "Fourth Reference month" ; proc print data=library.sipprw08w7 (obs=6); FORMAT spanel spanel. srefmon srefmon. ; proc contents data=library.sipprw08w7; run; ** Copyright 2012 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. ;