1 The SAS System 10:39 Tuesday, December 3, 1996 NOTE: Copyright (c) 1989-1995 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 6.11 TS020 Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, Site 0001177014. This message is contained in the SAS news file, and is presented upon initialization. Edit the files "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: AUTOEXEC processing beginning; file is /disk/usr37/sas611/autoexec.sas. NOTE: SAS initialization used: real time 1.89 seconds cpu time 0.29 seconds NOTE: AUTOEXEC processing completed. 1 2 options symbolgen; SYMBOLGEN: Macro variable SYSPARM resolves to 92 3 title " Extended Mare-Winship Format for 19&SYSPARM "; 4 * mwx.sas; 5 * requires year argument: sas mwx -sysparm YY 6 * Convert 1988 - 1993 March CPS to Mare-Winship format; 7 * Program by Christine Carol. 1 April 1996 ; 8 * missing: ; 9 * x62 Normal Fulltime Job ; 10 * x109 - x113 Type [A-E] income ; 11 * Missing variables all zeroes ; 12 13 options nocenter ps=79; 14 filename raw SYMBOLGEN: Macro variable SYSPARM resolves to 92 14 pipe "zcat /home/data/cps/cpsmar&SYSPARM..raw.Z"; 15 filename out SYMBOLGEN: Macro variable SYSPARM resolves to 92 15 pipe "compress >../cpsmw&SYSPARM..raw.Z"; 16 data; 17 length cr $1;cr=byte(13); 18 *infile raw lrecl=656; 19 infile raw lrecl=1024; 20 input rectype $1 @; 21 retain x1-x129 0; 22 retain x1 0; 23 retain x2 0; 24 retain x3 0; 25 retain x10 0; 26 retain year .; 27 28 if rectype eq '1' then do; 29 30 x1=x1+1; x2=0; x10=0; 31 32 input 33 34 @30 x5 1. 35 @28 year 1. 36 @29 x6 1. 37 @40 x18 1. 38 @58 x19 1. 39 @278 x21 1. 40 @278 x22 1. 41 @23 x23 2. 42 @21 x24 2. 43 @39 x25 1. 44 @57 x28 1. 45 @40 x29 2. 46 @40 x30 2. 47 @248 x31 8. 48 @287 x104 8.; 49 end; 2 The SAS System 10:39 Tuesday, December 3, 1996 50 51 if rectype eq '2' then do; 52 53 x2=x2+1; x3=0; 54 x10=x10+1; 55 56 input 57 58 @7 x12 2. 59 @205 x16 8. 60 @9 x17 1. 61 @32 x92 5. 62 @37 x93 1. 63 @233 x103 8. 64 @25 x122 1. 65 @27 x123 1. 66 @29 x125 1.; 67 end; 68 69 if rectype eq '3' then do; 70 71 x3=x3+1; 72 73 input 74 75 @31 x14 1. 76 @302 x32 1. 77 @15 x33 2. 78 @420 x34 1. 79 @100 x35 1. 80 @109 x36 1. 81 @24 x37 1. 82 @103 x38 3. 83 @106 x39 3. 84 @165 x40 1. 85 @145 x41 1. 86 @32 x44 1. 87 @31 x45 1. 88 @263 x46 5. 89 @198 x47 1. 90 @149 x48 1. 91 @22 x49 2. 92 @76 x50 2. 93 @37 x51 2. 94 @34 x52 1. 95 @35 x53 2. 96 @102 x54 1. 97 @112 x55 1. 98 @167 x56 1. 99 @99 x57 1. 100 @175 x58 1. 101 @74 x59 1. 102 @17 x60 1. 103 @256 x61 6. 104 @149 x63 1. 105 @86 x64 1. 106 @39 x65 1. 107 @46 x66 2. 108 @448 x67 8. 109 @440 x68 8. 110 @26 x69 1. 111 @305 x70 5. 112 @301 x71 1. 113 @25 x72 1. 114 @85 x73 1. 115 @170 x74 1. 116 @13 x75 2. 117 @20 x76 1. 118 @275 x78 1. 119 @21 x79 1. 120 @243 x80 6. 121 @97 x81 2. 122 @199 x83 1. 123 @176 x84 2. 124 @200 x85 1. 125 @171 x86 2. 126 @80 x88 2. 3 The SAS System 10:39 Tuesday, December 3, 1996 127 @96 x89 1. 128 @85 x90 1. 129 @202 x94 1. 130 @27 x95 2. 131 @190 x96 3. 132 @193 x98 3. 133 @178 x99 1. 134 @66 x107 8. 135 @50 x108 8. 136 @393 x114 5. 137 @399 x115 5. 138 @305 x116 5. 139 @297 x117 4.; 140 end; 141 if year le 8 then x4 = year + 90; else x4 = year+80; /* Dec 96 by drf */ 142 if x75 gt 9 then x75=0; /* single character output fields */ 143 if x95 eq 10 then x95=0; 144 145 file out lrecl=387; 146 if rectype eq '3' then do; output; put 147 x1 1-6 x2 7-9 x3 10-12 x4 13-14 x5 15 148 x6 16 x7 17-21 x8 22-24 x9 25-26 x10 27-32 149 x11 34 x12 35-36 x13 37 x14 39 x15 40-41 150 x16 42-51 x17 52 x18 53-54 x19 55 x20 56-61 151 x21 62 x22 63 x23 66-67 x24 68-69 x25 71 152 x26 72-73 x27 74-75 x28 77 x29 78-79 x30 80-81 153 x31 82-91 x32 92 x33 93-95 x34 96 x35 97 154 x36 98 x37 99 x38 100-102 x39 103-105 x40 106 155 x41 107 x42 108 x43 110 x44 112 x45 114 156 x46 115-121 x47 122 x48 123 x49 124-125 x50 126-127 157 x51 128-129 x52 131 x53 132-133 x54 134 x55 135 158 x56 136 x57 137 x58 138 x59 139 x60 140 159 x61 141-147 x62 148 x63 149 x64 150 x65 151 160 x66 152-153 x67 154-161 x68 162-169 x69 170 x70 171-177 161 x71 178 x72 179 x73 180 x74 181 x75 182 162 x76 183 x77 184 x78 185 x79 186 x80 187-193 163 x81 195-196 x82 197-198 x83 200 x84 201-202 x85 204 164 x86 205-206 x87 208 x88 209-210 x89 211 x90 212 165 x91 213-218 x92 219-224 x93 225 x94 226 x95 228 166 x96 229-231 x97 232 x98 233-235 x99 236 x100 237 167 x101 238-242 x102 243-247 x103 248-259 x104 260-270 x105 271-275 168 x106 276-280 x107 281-292 x108 292-303 x109 304-310 x110 311-317 169 x111 318-324 x112 325-331 x113 332-338 x114 339-345 x115 346-352 170 x116 353-359 x117 360-366 x118 367-370 x119 371-374 x120 375-376 171 x121 377-378 x122 379 x123 380 x124 381 x125 382 172 x126 383 x127 384 x128 385 x129 386 173 cr 387 174 ; 175 end; 176 run; NOTE: The infile RAW is: Pipe command="zcat /home/data/cps/cpsmar92.raw.Z" NOTE: The file OUT is: Pipe command="compress >../cpsmw92.raw.Z" NOTE: 295884 records were read from the infile RAW. The minimum record length was 705. The maximum record length was 705. NOTE: 155796 records were written to the file OUT. The minimum record length was 387. The maximum record length was 387. NOTE: The data set WORK.DATA1 has 155796 observations and 132 variables. NOTE: DATA statement used: real time 9:27.73 cpu time 4:56.92 177 proc freq ;table x4;run; NOTE: The PROCEDURE FREQ printed page 1. NOTE: PROCEDURE FREQ used: real time 1:09.56 cpu time 15.27 seconds 4 The SAS System 10:39 Tuesday, December 3, 1996 177 endsas; NOTE: The SAS System used: real time 10:39.60 cpu time 5:12.55 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414