1 The SAS System 16:23 Thursday, June 16, 2011 NOTE: Unable to open SASUSER.REGSTRY. WORK.REGSTRY will be opened instead. NOTE: All registry changes will be lost at the end of the session. WARNING: Unable to copy SASUSER registry to WORK registry. Because of this, you will not see registry customizations during this session. 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.10 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.25 seconds cpu time 0.05 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Tue Jan 23 15:20:41 EST 2007 6 This program reads the 1962 NCHS Multiple Cause of Death Data Data File 7 8 Report errors to jroth@nber.org 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 "./"; NOTE: Libref LIBRARY was successfully assigned as follows: 2 The SAS System 16:23 Thursday, June 16, 2011 Engine: V9 Physical Name: /disk/nber10/SCCS/mortality/1959-1967 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/mortality/1959-1967/mort1962.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = mort1962 ; 28 29 DATA library.&dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 attrib datayear length=4 label=""; 33 attrib monthdth length=3 label=""; 34 attrib daydth length=3 label=""; 35 attrib rectype length=3 label=""; 36 attrib restatus length=3 label=""; 37 attrib cityflag length=3 label=""; 38 attrib region length=3 label=""; 39 attrib divstoc length=3 label=""; 40 attrib exstatoc length=3 label=""; 41 attrib stateoc length=3 label=""; 42 attrib countyoc length=$5 label=""; 43 attrib regnres length=3 label=""; 44 attrib divstres length=3 label=""; 45 attrib exstares length=3 label=""; 46 attrib staters length=$2 label=""; 47 attrib countyrs length=$5 label=""; 48 attrib cityrs length=$3 label=""; 49 attrib popsize length=$1 label=""; 50 attrib metro length=$1 label=""; 51 attrib smsares length=$3 label=""; 52 attrib race length=3 label=""; 53 attrib racer3 length=3 label=""; 54 attrib racer2 length=3 label=""; 55 attrib racer6 length=3 label=""; 56 attrib sex length=3 label=""; 57 attrib age length=3 label=""; 58 attrib ager12 length=3 label=""; 59 attrib ager27 length=3 label=""; 60 attrib ager22 length=3 label=""; 61 attrib ager14 length=3 label=""; 62 attrib stbirth length=3 label=""; 63 attrib nativity length=3 label=""; 64 attrib mnative length=3 label=""; 65 attrib fnative length=3 label=""; 66 attrib sexdup length=3 label=""; 67 attrib accident length=3 label=""; 68 attrib ucod length=$4 label=""; 69 attrib ucod4 length=$1 label=""; 70 attrib ccr258 length=3 label=""; 71 attrib ucr258s length=3 label=""; 72 attrib ccr60 length=3 label=""; 73 attrib ccr55 length=3 label=""; 3 The SAS System 16:23 Thursday, June 16, 2011 74 attrib cdcflag length=3 label=""; 75 attrib fdaflag length=3 label=""; 76 attrib whoflag length=3 label=""; 77 attrib ucr258 length=3 label=""; 78 attrib ucr60 length=3 label=""; 79 attrib ucr33 length=3 label=""; 80 attrib reparea length=3 label=""; 81 attrib shipno length=$2 label=""; 82 83 84 INPUT 85 86 @1 datayear 4. 87 @5 monthdth 2. 88 @7 daydth 2. 89 @9 rectype 1. 90 @10 restatus 1. 91 @11 cityflag 1. 92 @13 region 1. 93 @14 divstoc 2. 94 @16 exstatoc 2. 95 @18 stateoc 2. 96 @18 countyoc $5. 97 @24 regnres 1. 98 @25 divstres 2. 99 @27 exstares 2. 100 @29 staters $2. 101 @29 countyrs $5. 102 @34 cityrs $3. 103 @37 popsize $1. 104 @38 metro $1. 105 @39 smsares $3. 106 @42 race 2. 107 @44 racer3 1. 108 @45 racer2 1. 109 @46 racer6 1. 110 @47 sex 1. 111 @48 age 3. 112 @51 ager12 2. 113 @53 ager27 2. 114 @55 ager22 2. 115 @57 ager14 2. 116 @60 stbirth 2. 117 @62 nativity 2. 118 @64 mnative 2. 119 @66 fnative 2. 120 @70 sexdup 1. 121 @71 accident 1. 122 @72 ucod $4. 123 @76 ucod4 $1. 124 @77 ccr258 3. 125 @80 ucr258s 1. 126 @81 ccr60 2. 127 @83 ccr55 2. 128 @88 cdcflag 1. 129 @89 fdaflag 1. 130 @90 whoflag 1. 131 @91 ucr258 3. 4 The SAS System 16:23 Thursday, June 16, 2011 132 @94 ucr60 2. 133 @96 ucr33 2. 134 @98 reparea 1. 135 @105 shipno $2. 136 ; 137 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1959-1967/mort1962.zip " NOTE: 1756720 records were read from the infile DATAFILE. The minimum record length was 107. The maximum record length was 107. NOTE: The data set LIBRARY.MORT1962 has 1756720 observations and 50 variables. NOTE: DATA statement used (Total process time): real time 34.46 seconds cpu time 15.13 seconds 138 proc print data=library.mort1962 (obs=6); 139 NOTE: There were 6 observations read from the data set LIBRARY.MORT1962. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.04 seconds cpu time 0.02 seconds 140 proc contents data=library.mort1962; 141 142 /* 143 Copyright 2007 shared by the National Bureau of Economic Research and Jean Roth 144 145 National Bureau of Economic Research. 146 1050 Massachusetts Avenue 147 Cambridge, MA 02138 148 jroth@nber.org 149 150 This program and all programs referenced in it are free software. You 151 can redistribute the program or modify it under the terms of the GNU 152 General Public License as published by the Free Software Foundation; 153 either version 2 of the License, or (at your option) any later version. 154 155 This program is distributed in the hope that it will be useful, 156 but WITHOUT ANY WARRANTY; without even the implied warranty of 157 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 158 GNU General Public License for more details. 159 160 You should have received a copy of the GNU General Public License 161 along with this program; if not, write to the Free Software 162 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 163 USA. 164 */ NOTE: The PROCEDURE CONTENTS printed pages 2-3. NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.02 seconds cpu time 0.01 seconds 5 The SAS System 16:23 Thursday, June 16, 2011 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 34.83 seconds cpu time 15.23 seconds