1 The SAS System 12:01 Thursday, June 7, 2012 NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.3 (TS1M0) Licensed to NATIONAL BUREAU OF ECONOMIC RESEARCH, Site 70111350. NOTE: This session is executing on the Linux 2.6.32-38-server (LIN X64) platform. You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.13 seconds cpu time 0.03 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 **------------------------------------------------; 5 ** by Jean Roth Thu Jun 7 12:01:41 EDT 2012 6 ** This program reads the 2008 SIPP Wave 9 Topical Module Research Data File ; 7 ** Report errors to jroth@nber.org ; 8 ** A value of -1 (or -1/# of implied decimals) indicates 'Not in Universe' ; 9 ** This program is distributed under the GNU GPL. ; 10 ** See end of this file and 11 ** http://www.gnu.org/licenses/ for details. ; 12 **-----------------------------------------------; 13 14 * The following line should contain the directory 15 where the SAS file is to be stored ; 16 17 libname library "/homes/data/sipp/2008"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/sipp/2008 18 19 * The following line should contain 20 the complete path and name of the raw data file. 21 On a PC, use backslashes in paths as in C:\ ; 22 23 FILENAME datafile pipe "unzip -p /homes/data/sipp/2008/rw08w9.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 2 The SAS System 12:01 Thursday, June 7, 2012 27 %let dataset = sipprw08w9 ; 28 29 DATA library.&dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 33 ** ------------------------------------------------ ; 34 ** The following variable names have been changed, ; 35 ** if necessary: '$' to 'd', '-' to '_', '%' to 'p' ; 36 ** ----------------------------------------------- ; 37 38 attrib ssuid length=$12 label="SU: Sample Unit Identifier"; 39 attrib spanel length=4 label="SU: Sample Code - Indicates Panel Year"; 40 attrib swave length=3 label="SU: Wave of data collection"; 41 attrib srefmon length=3 label="SU: Reference month of this record"; 42 attrib epppnum length=$4 label="PE: Person number"; 43 attrib repwgt1 length=8 label="WW: Person first replicate weight"; 44 45 46 INPUT 47 48 @1 ssuid $12. 49 @13 spanel 4. 50 @17 swave 2. 51 @19 srefmon 1. 52 @20 epppnum $4. 53 @24 repwgt1 10.4 54 ; 55 56 **------------------------------------------------; 57 ** The PROC FORMAT statement will store the formats ; 58 ** in a sas data set called fsipprw08w9 ; 59 ** To use the stored formats in a subsequent program, ; 60 ** use code like the following; 61 62 ** proc format cntlin=library.fspprw08w9; 63 ** PROC freq; 64 ** tables pesex ; 65 ** format pesex P135L.; 66 67 ** For more information, consult PROC FORMAT in the SAS Procedures Guide ; 68 **-----------------------------------------------; 69 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/sipp/2008/rw08w9.zip " NOTE: 329121 records were read from the infile DATAFILE. The minimum record length was 1223. The maximum record length was 1223. NOTE: The data set LIBRARY.SIPPRW08W9 has 329121 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 4.10 seconds cpu time 1.34 seconds 70 PROC FORMAT cntlout=library.fspprw08w9; 71 3 The SAS System 12:01 Thursday, June 7, 2012 72 ; 73 VALUE spanel (default=32) 74 2008 = "Panel Year" 75 ; NOTE: Format SPANEL has been output. 76 VALUE srefmon (default=32) 77 1 = "First Reference month" 78 2 = "Second Reference month" 79 3 = "Third Reference month" 80 4 = "Fourth Reference month" 81 ; NOTE: Format SREFMON has been output. 82 NOTE: The data set LIBRARY.FSPPRW08W9 has 5 observations and 21 variables. NOTE: PROCEDURE FORMAT used (Total process time): real time 0.07 seconds cpu time 0.01 seconds 83 proc print data=library.sipprw08w9 (obs=6); 84 85 86 FORMAT 87 spanel spanel. 88 srefmon srefmon. 89 ; NOTE: There were 6 observations read from the data set LIBRARY.SIPPRW08W9. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.05 seconds cpu time 0.02 seconds 90 proc contents data=library.sipprw08w9; 91 92 ** Copyright 2012 shared by the National Bureau of Economic Research and Jean Roth ; 93 94 ** National Bureau of Economic Research. ; 95 ** 1050 Massachusetts Avenue ; 96 ** Cambridge, MA 02138 ; 97 ** jroth@nber.org ; 98 99 ** This program and all programs referenced in it are free software. You ; 100 ** can redistribute the program or modify it under the terms of the GNU ; 101 ** General Public License as published by the Free Software Foundation; 102 ** either version 2 of the License, or (at your option) any later version. ; 103 104 ** This program is distributed in the hope that it will be useful, ; 105 ** but WITHOUT ANY WARRANTY, without even the implied warranty of ; 106 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; 107 ** GNU General Public License for more details. ; 108 109 ** You should have received a copy of the GNU General Public License ; 110 ** along with this program, if not, write to the Free Software ; 111 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. ; NOTE: The PROCEDURE CONTENTS printed page 2. 4 The SAS System 12:01 Thursday, June 7, 2012 NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.01 seconds cpu time 0.01 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 4.41 seconds cpu time 1.41 seconds