1 The SAS System 14:17 Tuesday, November 27, 2007 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to HARVARD UNIV - SCHOOL OF PUBLIC HEALTH - T&R, Site 0001177014. NOTE: This session is executing on the SunOS 5.9 platform. NOTE: SAS 9.1.3 Service Pack 3 ----------------------------------------------------------------------- NBER NOTE: sas now defaults to sas9. sas8 or sas6 will invoke sas version 8 or 6 respectively. - 2005/10/21 ----------------------------------------------------------------------- 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.45 seconds cpu time 0.17 seconds 1 *options obs=100; 2 options nocenter; 3 /*------------------------------------------------------------------------------------*/ 4 /*by Jean Roth Tue Nov 4 11:38:34 EST 2003 5 This program reads the 1996 SIPP Wave 7 Topical Module Data File 6 NOTE: This program is distributed under the GNU GPL. See end of 7 this file and http://www.gnu.org/licenses/ for details. 8 Please report errors to jroth@nber.org 9 Six steps: 10 (1) Uncomment the 'options compress=yes' statement if desired to save space 11 (2) Uncomment 'LENGTH' statement if desired to save space 12 (3) Specify output directories in 'libname' statements 13 (4) Specify the input file name/location in the 'filename' statement 14 (5) On a PC, use backslashes as in C:\ 15 (6) Read in the compressed or uncompressed raw data file. See the 16 'filename' and 'INFILE' statements. 17 Other changes may be user and platform specific. 18 NOTE: A value of -1 (or -1/# of implied decimals) indicates 'Not in Universe' */ 19 /*------------------------------------------------------------------------------------*/ 20 21 *options obs=100; 22 *options compress=yes; 23 *Choose compress=yes to save space ; 2 The SAS System 14:17 Tuesday, November 27, 2007 24 *Choose compress=no if converting to another package using transfer software ; 25 *options pagesize=59 linesize=72; 26 27 /*------------------------------------------------------------------------------------*/ 28 29 30 libname library './'; NOTE: Directory for library LIBRARY contains files of mixed engine types. NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /disk/nber10/SCCS/sipp/1996 31 32 *See the codebook for more detail; 33 PROC FORMAT cntlout=library.fsp96t7; 34 35 /* 36 The PROC FORMAT statement will store the formats in a sas data set called fsip96t7 37 To use the stored formats in a subsequent program, include something like this: 38 39 proc format cntlin=library.fsp96t7; 40 PROC freq; 41 tables pesex ; 42 format pesex P135L.; 43 44 For more information, consult the SAS Procedures Guide section of PROC FORMAT 45 */ 46 ; 47 VALUE RMNJBBS (default=32) 48 -1 = "Not in universe" 49 1 = "Job" 50 2 = "Business" 51 ; NOTE: Format RMNJBBS has been output. 52 53 filename raw pipe "unzip -p /homes/data/sipp/1996/sipp96t7.zip "; 54 NOTE: The data set LIBRARY.FSP96T7 has 3 observations and 21 variables. NOTE: PROCEDURE FORMAT used (Total process time): real time 0.10 seconds cpu time 0.02 seconds 55 data sip96t7; 56 57 missing A; 58 infile raw lrecl = 20000 missover ; 59 * To read in uncompressed file, uncomment INFILE & comment filename & infile lines; 60 * On a PC, you may need to change the direction of the slashes as in C:\; 61 *INFILE '/homes/data/sipp/1996/sipp96t7.dat' LRECL=20000 PAD END=EOF; 62 63 64 65 LENGTH RMNJBBS 3; 66 67 68 /*-------------------------------------------------------------------------------------*/ 69 /* The following changes in variable names have been made, if necessary: 3 The SAS System 14:17 Tuesday, November 27, 2007 70 '$' to 'd'; '-' to '_'; '%' to 'p'; 71 72 Note: Variable names in SAS are not case-sensitive */ 73 74 /*-------------------------------------------------------------------------------------*/ 75 76 INPUT 77 78 @987 RMJB 2. 79 @989 RMBS 2. 80 @991 RMNJBBS 2. 81 @993 THEREMPL 2. 82 @999 TBUSTOTL 2. 83 ; 84 85 *proc freq; 86 *tables RMNJBBS; 87 *FORMAT RMNJBBS RMNJBBS.; NOTE: The infile RAW is: Pipe command="unzip -p /homes/data/sipp/1996/sipp96t7.zip " NOTE: 77995 records were read from the infile RAW. The minimum record length was 1528. The maximum record length was 1528. NOTE: The data set WORK.SIP96T7 has 77995 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 5.57 seconds cpu time 2.61 seconds 88 proc freq; 89 tables RMNJBBS; 90 where THEREMPL>-1 and RMJB>0; 91 title2 "RNMJBBS should be 1 when THEREMPL>-1"; 92 NOTE: There were 32974 observations read from the data set WORK.SIP96T7. WHERE (THEREMPL>-1) and (RMJB>0); NOTE: The PROCEDURE FREQ printed page 1. NOTE: PROCEDURE FREQ used (Total process time): real time 0.43 seconds cpu time 0.17 seconds 93 proc freq; 94 tables RMNJBBS; 95 where TBUSTOTL>-1 and RMBS>0; 96 title2 "RMNJBBS should be 2 when TBUSTOTL>-1"; 97 NOTE: There were 4526 observations read from the data set WORK.SIP96T7. WHERE (TBUSTOTL>-1) and (RMBS>0); NOTE: The PROCEDURE FREQ printed page 2. NOTE: PROCEDURE FREQ used (Total process time): real time 0.08 seconds cpu time 0.05 seconds 4 The SAS System 14:17 Tuesday, November 27, 2007 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 6.74 seconds cpu time 3.04 seconds