1 The SAS System 15:20 Tuesday, November 25, 2014 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 70111351. NOTE: This session is executing on the Linux 2.6.32-431.29.2.el6.x86_64 (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 2.39 seconds cpu time 0.01 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 **------------------------------------------------ ; 5 ** by Jean Roth Mon Jul 14 15:42:28 EDT 2014 6 ** This program reads the 1980 NCHS Multiple Cause of Death Data Data File ; 7 ** Report errors to jroth@nber.org ; 8 ** This program is distributed under the GNU GPL. ; 9 ** See end of this file and 10 ** http://www.gnu.org/licenses/ for details. ; 11 ** ----------------------------------------------- ; 12 13 * The following line should contain the directory 14 where the SAS file is to be stored ; 15 16 libname library "/homes/data/mortality/1980/"; NOTE: Libref LIBRARY was successfully assigned as follows: Engine: V9 Physical Name: /homes/data/mortality/1980 17 18 * The following line should contain 19 the complete path and name of the raw data file. 20 On a PC, use backslashes in paths as in C:\ ; 21 22 FILENAME datafile pipe "unzip -p /homes/data/mortality/1980/mort1980us.zip "; 23 24 * The following line should contain the name of the SAS dataset ; 25 26 %let dataset = library.mort1980; 2 The SAS System 15:20 Tuesday, November 25, 2014 27 28 DATA &dataset ; 29 30 INFILE datafile LRECL = 20000 missover ; 31 attrib datayear length=3 label=""; 32 attrib reparea length=3 label=""; 33 attrib shipno length=$2 label=""; 34 attrib rectype length=3 label=""; 35 attrib restatus length=3 label=""; 36 attrib countyoc length=$5 label=""; 37 attrib stateoc length=$2 label=""; 38 attrib region length=3 label=""; 39 attrib divstoc length=$2 label=""; 40 attrib exstatoc length=$2 label=""; 41 attrib countyrs length=$5 label=""; 42 attrib staters length=$2 label=""; 43 attrib cityrs length=$3 label=""; 44 attrib popsize length=$1 label=""; 45 attrib metro length=$1 label=""; 46 attrib regnres length=3 label=""; 47 attrib divstres length=3 label=""; 48 attrib exstares length=$2 label=""; 49 attrib smsares length=$3 label=""; 50 attrib monthdth length=3 label=""; 51 attrib daydth length=3 label=""; 52 attrib sex length=3 label=""; 53 attrib race length=3 label=""; 54 attrib racer3 length=3 label=""; 55 attrib racer2 length=3 label=""; 56 attrib age length=3 label=""; 57 attrib ager52 length=3 label=""; 58 attrib ager27 length=3 label=""; 59 attrib ager12 length=3 label=""; 60 attrib ager22 length=3 label=""; 61 attrib hospstat length=3 label=""; 62 attrib marstat length=3 label=""; 63 attrib statebth length=3 label=""; 64 attrib autopsy length=3 label=""; 65 attrib fipssmsa length=$4 label="FIPS SMSA code"; 66 attrib accident length=3 label=""; 67 attrib ucod length=$4 label=""; 68 attrib ucr282 length=4 label=""; 69 attrib ucr72 length=3 label=""; 70 attrib ucr61 length=3 label=""; 71 attrib ucr34 length=3 label=""; 72 attrib eanum length=3 label=""; 73 attrib entity1 length=$7 label=""; 74 attrib econdp_1 length=3 label=""; 75 attrib econds_1 length=$1 label=""; 76 attrib enicon_1 length=$4 label=""; 77 attrib eniflag1 length=3 label=""; 78 attrib entity2 length=$7 label=""; 79 attrib econdp_2 length=3 label=""; 80 attrib econds_2 length=$1 label=""; 81 attrib enicon_2 length=$4 label=""; 82 attrib eniflag2 length=3 label=""; 83 attrib entity3 length=$7 label=""; 84 attrib econdp_3 length=3 label=""; 3 The SAS System 15:20 Tuesday, November 25, 2014 85 attrib econds_3 length=$1 label=""; 86 attrib enicon_3 length=$4 label=""; 87 attrib eniflag3 length=3 label=""; 88 attrib entity4 length=$7 label=""; 89 attrib econdp_4 length=3 label=""; 90 attrib econds_4 length=$1 label=""; 91 attrib enicon_4 length=$4 label=""; 92 attrib eniflag4 length=3 label=""; 93 attrib entity5 length=$7 label=""; 94 attrib econdp_5 length=3 label=""; 95 attrib econds_5 length=$1 label=""; 96 attrib enicon_5 length=$4 label=""; 97 attrib eniflag5 length=3 label=""; 98 attrib entity6 length=$7 label=""; 99 attrib econdp_6 length=3 label=""; 100 attrib econds_6 length=$1 label=""; 101 attrib enicon_6 length=$4 label=""; 102 attrib eniflag6 length=3 label=""; 103 attrib entity7 length=$7 label=""; 104 attrib econdp_7 length=3 label=""; 105 attrib econds_7 length=$1 label=""; 106 attrib enicon_7 length=$4 label=""; 107 attrib eniflag7 length=3 label=""; 108 attrib entity8 length=$7 label=""; 109 attrib econdp_8 length=3 label=""; 110 attrib econds_8 length=$1 label=""; 111 attrib enicon_8 length=$4 label=""; 112 attrib eniflag8 length=3 label=""; 113 attrib entity9 length=$7 label=""; 114 attrib econdp_9 length=3 label=""; 115 attrib econds_9 length=$1 label=""; 116 attrib enicon_9 length=$4 label=""; 117 attrib eniflag9 length=3 label=""; 118 attrib entity10 length=$7 label=""; 119 attrib econdp_10 length=3 label=""; 120 attrib econds_10 length=$1 label=""; 121 attrib enicon_10 length=$4 label=""; 122 attrib eniflag10 length=3 label=""; 123 attrib entity11 length=$7 label=""; 124 attrib econdp_11 length=3 label=""; 125 attrib econds_11 length=$1 label=""; 126 attrib enicon_11 length=$4 label=""; 127 attrib eniflag11 length=3 label=""; 128 attrib entity12 length=$7 label=""; 129 attrib econdp_12 length=3 label=""; 130 attrib econds_12 length=$1 label=""; 131 attrib enicon_12 length=$4 label=""; 132 attrib eniflag12 length=3 label=""; 133 attrib entity13 length=$7 label=""; 134 attrib econdp_13 length=3 label=""; 135 attrib econds_13 length=$1 label=""; 136 attrib enicon_13 length=$4 label=""; 137 attrib eniflag13 length=3 label=""; 138 attrib entity14 length=$7 label=""; 139 attrib econdp_14 length=3 label=""; 140 attrib econds_14 length=$1 label=""; 141 attrib enicon_14 length=$4 label=""; 142 attrib eniflag14 length=3 label=""; 4 The SAS System 15:20 Tuesday, November 25, 2014 143 attrib entity15 length=$7 label=""; 144 attrib econdp_15 length=3 label=""; 145 attrib econds_15 length=$1 label=""; 146 attrib enicon_15 length=$4 label=""; 147 attrib eniflag15 length=3 label=""; 148 attrib entity16 length=$7 label=""; 149 attrib econdp_16 length=3 label=""; 150 attrib econds_16 length=$1 label=""; 151 attrib enicon_16 length=$4 label=""; 152 attrib eniflag16 length=3 label=""; 153 attrib entity17 length=$7 label=""; 154 attrib econdp_17 length=3 label=""; 155 attrib econds_17 length=$1 label=""; 156 attrib enicon_17 length=$4 label=""; 157 attrib eniflag17 length=3 label=""; 158 attrib entity18 length=$7 label=""; 159 attrib econdp_18 length=3 label=""; 160 attrib econds_18 length=$1 label=""; 161 attrib enicon_18 length=$4 label=""; 162 attrib eniflag18 length=3 label=""; 163 attrib entity19 length=$7 label=""; 164 attrib econdp_19 length=3 label=""; 165 attrib econds_19 length=$1 label=""; 166 attrib enicon_19 length=$4 label=""; 167 attrib eniflag19 length=3 label=""; 168 attrib entity20 length=$7 label=""; 169 attrib econdp_20 length=3 label=""; 170 attrib econds_20 length=$1 label=""; 171 attrib enicon_20 length=$4 label=""; 172 attrib eniflag20 length=3 label=""; 173 attrib ranum length=3 label=""; 174 attrib record_1 length=$5 label=""; 175 attrib rnifla_1 length=3 label=""; 176 attrib record_2 length=$5 label=""; 177 attrib rnifla_2 length=3 label=""; 178 attrib record_3 length=$5 label=""; 179 attrib rnifla_3 length=3 label=""; 180 attrib record_4 length=$5 label=""; 181 attrib rnifla_4 length=3 label=""; 182 attrib record_5 length=$5 label=""; 183 attrib rnifla_5 length=3 label=""; 184 attrib record_6 length=$5 label=""; 185 attrib rnifla_6 length=3 label=""; 186 attrib record_7 length=$5 label=""; 187 attrib rnifla_7 length=3 label=""; 188 attrib record_8 length=$5 label=""; 189 attrib rnifla_8 length=3 label=""; 190 attrib record_9 length=$5 label=""; 191 attrib rnifla_9 length=3 label=""; 192 attrib record_10 length=$5 label=""; 193 attrib rnifla_10 length=3 label=""; 194 attrib record_11 length=$5 label=""; 195 attrib rnifla_11 length=3 label=""; 196 attrib record_12 length=$5 label=""; 197 attrib rnifla_12 length=3 label=""; 198 attrib record_13 length=$5 label=""; 199 attrib rnifla_13 length=3 label=""; 200 attrib record_14 length=$5 label=""; 5 The SAS System 15:20 Tuesday, November 25, 2014 201 attrib rnifla_14 length=3 label=""; 202 attrib record_15 length=$5 label=""; 203 attrib rnifla_15 length=3 label=""; 204 attrib record_16 length=$5 label=""; 205 attrib rnifla_16 length=3 label=""; 206 attrib record_17 length=$5 label=""; 207 attrib rnifla_17 length=3 label=""; 208 attrib record_18 length=$5 label=""; 209 attrib rnifla_18 length=3 label=""; 210 attrib record_19 length=$5 label=""; 211 attrib rnifla_19 length=3 label=""; 212 attrib record_20 length=$5 label=""; 213 attrib rnifla_20 length=3 label=""; 214 215 216 INPUT 217 218 @1 datayear 2. 219 @3 reparea 1. 220 @10 shipno $2. 221 @19 rectype 1. 222 @20 restatus 1. 223 @21 countyoc $5. 224 @21 stateoc $2. 225 @26 region 1. 226 @27 divstoc $2. 227 @29 exstatoc $2. 228 @31 countyrs $5. 229 @31 staters $2. 230 @36 cityrs $3. 231 @39 popsize $1. 232 @40 metro $1. 233 @41 regnres 1. 234 @42 divstres 2. 235 @44 exstares $2. 236 @46 smsares $3. 237 @55 monthdth 2. 238 @57 daydth 2. 239 @59 sex 1. 240 @60 race 2. 241 @62 racer3 1. 242 @63 racer2 1. 243 @64 age 3. 244 @67 ager52 2. 245 @69 ager27 2. 246 @71 ager12 2. 247 @73 ager22 2. 248 @75 hospstat 1. 249 @77 marstat 1. 250 @78 statebth 2. 251 @84 autopsy 1. 252 @129 fipssmsa $4. 253 @141 accident 1. 254 @142 ucod $4. 255 @146 ucr282 5. 256 @151 ucr72 3. 257 @154 ucr61 3. 258 @157 ucr34 3. 6 The SAS System 15:20 Tuesday, November 25, 2014 259 @160 eanum 2. 260 @162 entity1 $7. 261 @162 econdp_1 1. 262 @163 econds_1 $1. 263 @164 enicon_1 $4. 264 @168 eniflag1 1. 265 @169 entity2 $7. 266 @169 econdp_2 1. 267 @170 econds_2 $1. 268 @171 enicon_2 $4. 269 @175 eniflag2 1. 270 @176 entity3 $7. 271 @176 econdp_3 1. 272 @177 econds_3 $1. 273 @178 enicon_3 $4. 274 @182 eniflag3 1. 275 @183 entity4 $7. 276 @183 econdp_4 1. 277 @184 econds_4 $1. 278 @185 enicon_4 $4. 279 @189 eniflag4 1. 280 @190 entity5 $7. 281 @190 econdp_5 1. 282 @191 econds_5 $1. 283 @192 enicon_5 $4. 284 @196 eniflag5 1. 285 @197 entity6 $7. 286 @197 econdp_6 1. 287 @198 econds_6 $1. 288 @199 enicon_6 $4. 289 @203 eniflag6 1. 290 @204 entity7 $7. 291 @204 econdp_7 1. 292 @205 econds_7 $1. 293 @206 enicon_7 $4. 294 @210 eniflag7 1. 295 @211 entity8 $7. 296 @211 econdp_8 1. 297 @212 econds_8 $1. 298 @213 enicon_8 $4. 299 @217 eniflag8 1. 300 @218 entity9 $7. 301 @218 econdp_9 1. 302 @219 econds_9 $1. 303 @220 enicon_9 $4. 304 @224 eniflag9 1. 305 @225 entity10 $7. 306 @225 econdp_10 1. 307 @226 econds_10 $1. 308 @227 enicon_10 $4. 309 @231 eniflag10 1. 310 @232 entity11 $7. 311 @232 econdp_11 1. 312 @233 econds_11 $1. 313 @234 enicon_11 $4. 314 @238 eniflag11 1. 315 @239 entity12 $7. 316 @239 econdp_12 1. 7 The SAS System 15:20 Tuesday, November 25, 2014 317 @240 econds_12 $1. 318 @241 enicon_12 $4. 319 @245 eniflag12 1. 320 @246 entity13 $7. 321 @246 econdp_13 1. 322 @247 econds_13 $1. 323 @248 enicon_13 $4. 324 @252 eniflag13 1. 325 @253 entity14 $7. 326 @253 econdp_14 1. 327 @254 econds_14 $1. 328 @255 enicon_14 $4. 329 @259 eniflag14 1. 330 @260 entity15 $7. 331 @260 econdp_15 1. 332 @261 econds_15 $1. 333 @262 enicon_15 $4. 334 @266 eniflag15 1. 335 @267 entity16 $7. 336 @267 econdp_16 1. 337 @268 econds_16 $1. 338 @269 enicon_16 $4. 339 @273 eniflag16 1. 340 @274 entity17 $7. 341 @274 econdp_17 1. 342 @275 econds_17 $1. 343 @276 enicon_17 $4. 344 @280 eniflag17 1. 345 @281 entity18 $7. 346 @281 econdp_18 1. 347 @282 econds_18 $1. 348 @283 enicon_18 $4. 349 @287 eniflag18 1. 350 @288 entity19 $7. 351 @288 econdp_19 1. 352 @289 econds_19 $1. 353 @290 enicon_19 $4. 354 @294 eniflag19 1. 355 @295 entity20 $7. 356 @295 econdp_20 1. 357 @296 econds_20 $1. 358 @297 enicon_20 $4. 359 @301 eniflag20 1. 360 @338 ranum 2. 361 @341 record_1 $5. 362 @345 rnifla_1 1. 363 @346 record_2 $5. 364 @350 rnifla_2 1. 365 @351 record_3 $5. 366 @355 rnifla_3 1. 367 @356 record_4 $5. 368 @360 rnifla_4 1. 369 @361 record_5 $5. 370 @365 rnifla_5 1. 371 @366 record_6 $5. 372 @370 rnifla_6 1. 373 @371 record_7 $5. 374 @375 rnifla_7 1. 8 The SAS System 15:20 Tuesday, November 25, 2014 375 @376 record_8 $5. 376 @380 rnifla_8 1. 377 @381 record_9 $5. 378 @385 rnifla_9 1. 379 @386 record_10 $5. 380 @390 rnifla_10 1. 381 @391 record_11 $5. 382 @395 rnifla_11 1. 383 @396 record_12 $5. 384 @400 rnifla_12 1. 385 @401 record_13 $5. 386 @405 rnifla_13 1. 387 @406 record_14 $5. 388 @410 rnifla_14 1. 389 @411 record_15 $5. 390 @415 rnifla_15 1. 391 @416 record_16 $5. 392 @420 rnifla_16 1. 393 @421 record_17 $5. 394 @425 rnifla_17 1. 395 @426 record_18 $5. 396 @430 rnifla_18 1. 397 @431 record_19 $5. 398 @435 rnifla_19 1. 399 @436 record_20 $5. 400 @440 rnifla_20 1. 401 ; 402 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1980/mort1980us.zip " NOTE: 1993137 records were read from the infile DATAFILE. The minimum record length was 340. The maximum record length was 421. NOTE: The data set LIBRARY.MORT1980 has 1993137 observations and 183 variables. NOTE: DATA statement used (Total process time): real time 26.25 seconds cpu time 14.01 seconds 403 proc print data=&dataset. (obs=6); 404 NOTE: There were 6 observations read from the data set LIBRARY.MORT1980. NOTE: The PROCEDURE PRINT printed pages 1-2. NOTE: PROCEDURE PRINT used (Total process time): real time 2.74 seconds cpu time 0.03 seconds 405 proc contents data=&dataset.; 406 407 408 ** Copyright 2014 shared by the National Bureau of Economic Research and Jean Roth ; 409 ** 410 ** National Bureau of Economic Research. ; 411 ** 1050 Massachusetts Avenue ; 9 The SAS System 15:20 Tuesday, November 25, 2014 412 ** Cambridge, MA 02138 ; 413 ** jroth@nber.org ; 414 ** 415 ** This program and all programs referenced in it are free software. You ; 416 ** can redistribute the program or modify it under the terms of the GNU ; 417 ** General Public License as published by the Free Software Foundation; ; 418 ** either version 2 of the License, or (at your option) any later version. ; 419 ** 420 ** This program is distributed in the hope that it will be useful, ; 421 ** but WITHOUT ANY WARRANTY -- without even the implied warranty of ; 422 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; 423 ** GNU General Public License for more details. ; 424 ** 425 ** You should have received a copy of the GNU General Public License ; 426 ** along with this program -- if not, write to the Free Software ; 427 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ; 428 ** USA. ; 429 NOTE: The PROCEDURE CONTENTS printed pages 3-7. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.44 seconds cpu time 0.00 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 32.13 seconds cpu time 14.05 seconds