/*------------------------------------------------------------------------------------*/ /*by Jean Roth Mon Jun 7 18:31:04 EDT 2004 This program reads the 1991 SIPP Type of Death Benefit Data File NOTE: This program is distributed under the GNU GPL. See end of this file and http://www.gnu.org/licenses/ for details. Please report errors to jroth@nber.org Six steps: (1) Uncomment the 'options compress=yes' statement if desired to save space (2) Uncomment 'LENGTH' statement if desired to save space (3) Specify output directories in 'libname' statements (4) Specify the input file name/location in the 'filename' statement (5) On a PC, use backslashes as in C:\ (6) Read in the compressed or uncompressed raw data file. See the 'filename' and 'INFILE' statements. Other changes may be user and platform specific. NOTE: A value of -1 (or -1/# of implied decimals) indicates 'Not in Universe' */ /*------------------------------------------------------------------------------------*/ *options obs=100; *options compress=yes; *Choose compress=yes to save space ; *Choose compress=no if converting to another package using transfer software ; *options pagesize=59 linesize=72; /*------------------------------------------------------------------------------------*/ libname library './'; *See the codebook for more detail; PROC FORMAT cntlout=library.fsp91db; /* The PROC FORMAT statement will store the formats in a sas data set called fsip91db To use the stored formats in a subsequent program, include something like this: proc format cntlin=library.fsp91db; PROC freq; tables pesex ; format pesex P135L.; For more information, consult the SAS Procedures Guide section of PROC FORMAT */ ; VALUE TOBD90L (default=32) 0 = "Not in sample in January of 1991." 1 = "All retired workers exlduding dually e" /* ntitled females */ 2 = "Disabled workers" 3 = "Wife (excludes males receiving a spous" /* e benefit) */ 4 = "Dually entitled wife ( excludes males " /* dually entitled males) */ 5 = "Widow benefit (excludes males receivin" /* g benefit as a widower) */ 6 = "Dually entitled widow ( excludes males" /* dually entitled males) */ 7 = "All other" 9 = "Matched and not in current pay, matche" /* d but no MBR record */ ; VALUE SSAYOD (default=32) 0 = "No year of death identified or identif" /* ied year of death */ ; filename raw pipe "unzip -p /homes/data/sipp/1991/sipp91db.zip "; data library.sip91db; missing A; infile raw lrecl = 20000 missover ; * To read in uncompressed file, uncomment INFILE & comment filename & infile lines; * On a PC, you may need to change the direction of the slashes as in C:\; *INFILE '/homes/data/sipp/1991/sipp91db.dat' LRECL=20000 PAD END=EOF; *LENGTH SUID $9 ENTRY $2 SSAYOD 4 PANEL 4 DEFAULT=3; /*-------------------------------------------------------------------------------------*/ /* The following changes in variable names have been made, if necessary: '$' to 'd'; '-' to '_'; '%' to 'p'; Note: Variable names in SAS are not case-sensitive */ /*-------------------------------------------------------------------------------------*/ INPUT @1 SUID $9. @10 ENTRY $2. @12 PNUM $3. @15 TOBD90 2. @18 SSAYOD 4. @22 PANEL 4. ; LABEL SUID = "Sample unit identifier" ENTRY = "Entry address ID" PNUM = "Person number" TOBD90 = "Type of OASDI benefit in current payme" SSAYOD = "MBR/SSR year of death" PANEL = "SIPP panel" ; proc print data=library.sip91db (obs=6); FORMAT TOBD90 TOBD90L. SSAYOD SSAYOD. ; proc contents data=library.sip91db; /* Copyright 2004 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. */