1 The SAS System 16:25 Tuesday, October 22, 2002 NOTE: Copyright (c) 1989-1996 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 6.12 TS020 Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, Site 0001177014. This sas license runs from Aug 15, 2002 to Aug 15, 2003 with a grace period up till Sep 15, 2003. NOTE: AUTOEXEC processing beginning; file is /usr/sunos/local/sas612/autoexec.sas. NOTE: SAS initialization used: real time 0.120 seconds cpu time 0.047 seconds NOTE: AUTOEXEC processing completed. 1 2 /*------------------------------------------------------------------------------------*/ 3 /*by Jean Roth Wed Mar 28 14:51:28 EST 2001 4 Please report errors to jroth@nber.org 5 Make two changes: 6 (1) specify the output file location in the 'libname' statement 7 (2) specify the input file name/location & year in the 'filename' statement 8 Other changes may be user and platform specific. */ 9 /*------------------------------------------------------------------------------------*/ 10 11 12 *options obs=100; 13 options compress=yes; 14 *change compress=no if using a conversion package such as stat/transfer; 15 options formdlim = " "; 16 17 libname out '/tmp/'; NOTE: Libref OUT was successfully assigned as follows: Engine: V612 Physical Name: /tmp 18 /* Note: some value labels are longer than 32 characters */ 19 PROC FORMAT; 20 ; 21 VALUE P19L (default=32) 22 0 = "invalid code [1964-67, 1972]" 23 16 = "Connecticut" 24 19 = "ME, MA, NH, RI, VT" 25 21 = "New York" 26 22 = "New Jersey" 27 23 = "Pennsylvania" 28 31 = "Ohio" 29 32 = "Indiana" 30 33 = "Illinois" 31 39 = "Michigan, Wisconsin" 32 49 = "IA, KS, MN, MO, NE, ND, SD" 33 53 = "Washington, D. C." 34 57 = "DE, MD, WV, VA" 35 58 = "Georgia, NC, SC" 36 59 = "Florida" 37 67 = "Kentucky, Tennessee" 38 69 = "Alabama, Mississippi" 39 72 = "Texas" 40 79 = "Arkansas, Louisiana, Oklahoma" 41 89 = "AZ, CO, ID, MT, NV, NM, UT, WY" 42 92 = "California" 43 99 = "Alaska, Hawaii, Oregon, Washington" 44 ; NOTE: Format P19L has been output. 45 46 filename raw pipe "zcat /home/data/mare_winship/cpsmw81.Z "; NOTE: PROCEDURE FORMAT used: real time 0.090 seconds cpu time 0.010 seconds 47 data temp; 2 The SAS System 16:25 Tuesday, October 22, 2002 48 infile raw lrecl = 386 missover ; 49 50 INPUT 51 52 @77 smsasta 1. 53 @78 state 2. 54 @80 state1 2. 55 ; 56 57 LABEL 58 smsasta = "SMSA Status" 59 state = "State" 60 state1 = "STATE-I" 61 ; 62 63 FORMAT 64 state1 P19L. 65 ; 66 *proc print data=temp (obs=6); NOTE: The infile RAW is: Pipe command="zcat /home/data/mare_winship/cpsmw81.Z " NOTE: 163595 records were read from the infile RAW. The minimum record length was 288. The maximum record length was 386. One or more lines were truncated. NOTE: The data set WORK.TEMP has 163595 observations and 3 variables. NOTE: Compressing data set WORK.TEMP increased size by 1.86 percent. Compressed is 494 pages; un-compressed would require 485 pages. NOTE: DATA statement used: real time 20.930 seconds cpu time 4.232 seconds 67 proc freq data=temp; 68 tables state state1; 69 *proc contents data=temp; NOTE: The PROCEDURE FREQ printed pages 1-2. NOTE: PROCEDURE FREQ used: real time 0.900 seconds cpu time 0.440 seconds NOTE: The SAS System used: real time 22.050 seconds cpu time 4.734 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414