*options obs=100 ; options nocenter ; **------------------------------------------------; ** by Jean Roth Fri Apr 5 11:25:56 EDT 2013 ** This program reads the 2008 SIPP7 Core Longitudnal 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/lgtwgt2008w7.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = sipplgtwgt2008w7 ; DATA library.&dataset ; INFILE datafile LRECL = 20000 ; ** ------------------------------------------------ ; ** The following variable names have been changed, ; ** if necessary: '$' to 'd', '-' to '_', '%' to 'p' ; ** ----------------------------------------------- ; attrib lgtkey length=$8 label="PE: Person longitudinal key"; attrib spanel length=4 label="SU: Sample Code - Indicates Panel Year"; attrib ssuid length=$12 label="SU: Sample Unit Identifier"; attrib epppnum length=$4 label="PE: Person number"; attrib lgtpn1wt length=8 label="WW: Longitudinal Panel Weight"; attrib lgtpn2wt length=8 label="WW: Longitudinal Panel Weight"; attrib lgtpn3wt length=8 label="WW: Longitudinal Panel Weight"; attrib lgtpn4wt length=8 label="WW: Longitudinal Panel Weight"; attrib lgtpn5wt length=8 label="WW: Longitudinal Panel Weight"; attrib lgtcy1wt length=8 label="WW: Longitudinal First Calendar Year Weight"; attrib lgtcy2wt length=8 label="WW: Longitudinal Second Calendar Year Weight"; attrib lgtcy3wt length=8 label="WW: Longitudinal Third Calendar Year Weight"; attrib lgtcy4wt length=8 label="WW: Longitudinal Fourth Calendar Year Weight"; attrib lgtcy5wt length=8 label="WW: Longitudinal Fifth Calendar Year Weight"; INPUT @1 lgtkey $8. @9 spanel 4. @13 ssuid $12. @25 epppnum $4. @29 lgtpn1wt 10.4 @39 lgtpn2wt 10.4 @49 lgtpn3wt 10.4 @59 lgtpn4wt 10.4 @69 lgtpn5wt 10.4 @79 lgtcy1wt 10.4 @89 lgtcy2wt 10.4 @99 lgtcy3wt 10.4 @109 lgtcy4wt 10.4 @119 lgtcy5wt 10.4 ; **------------------------------------------------; ** The PROC FORMAT statement will store the formats ; ** in a sas data set called fsipplgtwgt2008w7 ; ** To use the stored formats in a subsequent program, ; ** use code like the following; ** proc format cntlin=library.fspplgtwgt2008w7; ** PROC freq; ** tables pesex ; ** format pesex P135L.; ** For more information, consult PROC FORMAT in the SAS Procedures Guide ; **-----------------------------------------------; PROC FORMAT cntlout=library.fspplgtwgt2008w7; ; VALUE spanel (default=32) 2008 = "Panel Year" ; proc print data=library.sipplgtwgt2008w7 (obs=6); FORMAT spanel spanel. ; proc contents data=library.sipplgtwgt2008w7; run; ** Copyright 2013 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. ;