*options obs=100 ; options nocenter ; **------------------------------------------------; ** by Jean Roth Wed Sep 3 15:54:37 EDT 2014 ** This program reads the 1996 SIPP Longitudnal Weight File 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/1996"; * 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/1996/ctl_fer.zip "; * The following line should contain the name of the SAS dataset ; %let dataset = sipp1996ctl_fer ; 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 lgtpnlwt 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"; INPUT @1 lgtkey $8. @9 spanel 4. @13 ssuid $12. @25 epppnum $4. @29 lgtpnlwt 10.4 @39 lgtcy1wt 10.4 @49 lgtcy2wt 10.4 @59 lgtcy3wt 10.4 @69 lgtcy4wt 10.4 ; **------------------------------------------------; ** The PROC FORMAT statement will store the formats ; ** in a sas data set called fsipp1996ctl_fer ; ** To use the stored formats in a subsequent program, ; ** use code like the following; ** proc format cntlin=library.fspp1996ctl_fer; ** PROC freq; ** tables pesex ; ** format pesex P135L.; ** For more information, consult PROC FORMAT in the SAS Procedures Guide ; **-----------------------------------------------; PROC FORMAT cntlout=library.fspp1996ctl_fer; ; VALUE spanel (default=32) 1996 = "Panel Year" ; proc print data=library.sipp1996ctl_fer (obs=6); FORMAT spanel spanel. ; proc contents data=library.sipp1996ctl_fer; run; ** Copyright 2014 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. ;