1 The SAS System 15:36 Thursday, July 20, 2006 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to HARVARD SCHOOL OF PUBLIC HEALTH-INSTRUCTIONAL COMP, 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.36 seconds cpu time 0.22 seconds 1 *options obs=100 ; 2 options nocenter ; 3 4 /*------------------------------------------------ 5 by Jean Roth Fri May 12 15:38:29 EDT 2006 6 This program reads the 1999 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: Engine: V9 Physical Name: /disk/nber10/SCCS/mortality/1999/data 18 19 * The following line should contain 20 the complete path and name of the raw data file. 2 The SAS System 15:36 Thursday, July 20, 2006 21 On a PC, use backslashes in paths as in C:\ ; 22 23 FILENAME datafile pipe "unzip -p /homes/data/mortality/1999/data/mort99.zip "; 24 25 * The following line should contain the name of the SAS dataset ; 26 27 %let dataset = causes1999 ; 28 29 DATA &dataset ; 30 31 INFILE datafile LRECL = 20000 ; 32 attrib ucod length=$4 label="ICD Code (10th Revision)"; 33 attrib ucr358 length=3 label="358 Cause Recode"; 34 attrib ucr113 length=3 label="113 Cause Recode"; 35 attrib ucr130 length=3 label="130 Cause Recode"; 36 attrib ucr39 length=3 label="39 Cause Recode"; 37 38 INPUT 39 40 @142 ucod $4. 41 @146 ucr358 3. 42 @151 ucr113 3. 43 @154 ucr130 3. 44 @157 ucr39 2. 45 ; 46 47 *proc sort data=&dataset. out=library.all_cause_codes nodupkey ; 48 *by ucod ucr358 ucr113 ucr130 ucr39 ; 49 NOTE: The infile DATAFILE is: Pipe command="unzip -p /homes/data/mortality/1999/data/mort99.zip " NOTE: 2394871 records were read from the infile DATAFILE. The minimum record length was 441. The maximum record length was 441. NOTE: The data set WORK.CAUSES1999 has 2394871 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 2:18.08 cpu time 1:21.80 50 proc sort data=&dataset. out=library.cause_39_113 ( keep = ucr39 ucr113 ) nodupkey; 51 by ucr113 ucr39 ; NOTE: There were 2394871 observations read from the data set WORK.CAUSES1999. NOTE: 2394757 observations with duplicate key values were deleted. NOTE: The data set LIBRARY.CAUSE_39_113 has 114 observations and 2 variables. NOTE: PROCEDURE SORT used (Total process time): real time 11.11 seconds cpu time 11.00 seconds 52 proc print data=library.cause_39_113 obs ; 53 54 *proc sort data=&dataset. out=library.cause_39 ( keep = ucod ucr39 ) nodupkey; 55 *by ucr39 ucod ; 56 *proc print data=library.cause_39 (obs=6) noobs ; 3 The SAS System 15:36 Thursday, July 20, 2006 57 58 *proc contents data=library.cause_39; 59 60 /* 61 Copyright 2006 shared by the National Bureau of Economic Research and Jean Roth 62 63 National Bureau of Economic Research. 64 1050 Massachusetts Avenue 65 Cambridge, MA 02138 66 jroth@nber.org 67 68 This program and all programs referenced in it are free software. You 69 can redistribute the program or modify it under the terms of the GNU 70 General Public License as published by the Free Software Foundation; 71 either version 2 of the License, or (at your option) any later version. 72 73 This program is distributed in the hope that it will be useful, 74 but WITHOUT ANY WARRANTY; without even the implied warranty of 75 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 76 GNU General Public License for more details. 77 78 You should have received a copy of the GNU General Public License 79 along with this program; if not, write to the Free Software 80 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 81 USA. 82 */ NOTE: There were 114 observations read from the data set LIBRARY.CAUSE_39_113. NOTE: The PROCEDURE PRINT printed pages 1-3. NOTE: PROCEDURE PRINT used (Total process time): real time 0.18 seconds cpu time 0.12 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 2:29.83 cpu time 1:33.20