set directory to n:\death\ use deaths replace all aggcod with '1001' for allcod = '2004' or allcod = '2005' replace all aggcod with '1002' for allcod = '2009' replace all aggcod with '1003' for allcod = '2010' replace all aggcod with '1004' for allcod = '2015' replace all aggcod with '1005' for between(allcod, '2001','2003') or between(allcod,'2006','2008') or between(allcod,'2011','2014') or allcod = '2016' replace all aggcod with '1005' for allcod = '2016' or allcod = '2017' replace all aggcod with '1006' for between(allcod,'2018','2040') replace all aggcod with '1007' for allcod = '2043' replace all aggcod with '1008' for allcod = '2048' replace all aggcod with '1009' for between(allcod,'2049','2059') replace all aggcod with '1010' for allcod = '2060' replace all aggcod with '1011' for allcod = '2061' replace all aggcod with '1012' for allcod = '2062' replace all aggcod with '1013' for between(allcod,'2063','2065') replace all aggcod with '1014' for allcod = '2066' or allcod = '2067' replace all aggcod with '1015' for between(allcod,'2070','2073') replace all aggcod with '1016' for allcod = '2075' replace all aggcod with '1017' for allcod = '2068' or allcod = '2069' or allcod = '2074' or allcod = '2076' or allcod = '2076' replace all aggcod with '1018' for allcod = '2077' replace all aggcod with '1019' for allcod = '2080' or allcod = '2081' replace all aggcod with '1020' for allcod = '2078' or allcod = '2079' or allcod = '2082' or allcod = '2115' or allcod = '2115' replace all aggcod with '1021' for between(allcod,'2083','2086') replace all aggcod with '1022' for allcod = '2090' or allcod = '2091' replace all aggcod with '1023' for allcod = '2093' replace all aggcod with '1024' for allcod = '2092' replace all aggcod with '1025' for allcod = '2114' replace all aggcod with '1026' for allcod = '2096' replace all aggcod with '1027' for between(allcod,'2097','2104') replace all aggcod with '1028' for allcod = '2105' or allcod = '2106' replace all aggcod with '1029' for allcod = '2107' or allcod = '2108' replace all aggcod with '1030' for between(allcod,'2109','2113') replace all aggcod with '1031' for allcod = '2041' or allcod = '2042' or allcod = '2044' or allcod = '2045' or allcod = '2045' or allcod = '2047' or allcod = '2095' replace all aggcod with '1031' for allcod = '2087' or allcod = '2088' or allcod = '2089' or allcod = '2094' close databases use deaths replace all aggtran with 'TUBERCULOSIS' for aggcod = '1001' replace all aggtran with 'SEPTICEMIA' for aggcod = '1002' replace all aggtran with 'SYPHILIS' for aggcod = '1003' replace all aggtran with 'AIDS/HIV' for aggcod = '1004' replace all aggtran with 'OTHER INFECTIONS-PARASITES' for aggcod = '1005' replace all aggtran with 'CANCER' for aggcod = '1006' replace all aggtran with 'DIABETES' for aggcod = '1007' replace all aggtran with 'ALZHEIMERS DISEASE' for aggcod = '1008' replace all aggtran with 'HEART DISEASE' for aggcod = '1009' replace all aggtran with 'HYPERTENSION' for aggcod = '1010' replace all aggtran with 'STROKE' for aggcod = '1011' replace all aggtran with 'ATHEROSCLEROSIS' for aggcod = '1012' replace all aggtran with 'OTHER CIRCULATORY DISEASES' for aggcod = '1013' replace all aggtran with 'PNEUMONIA & INFLUENZA' for aggcod = '1014' replace all aggtran with 'CLRD' for aggcod = '1015' replace all aggtran with 'PNEUMONITIS-SOLIDS & LIQUIDS' for aggcod = '1016' replace all aggtran with 'OTHER RESPIRATORY DISEASES' for aggcod = '1017' replace all aggtran with 'PEPTIC ULCER' for aggcod = '1018' replace all aggtran with 'LIVER DISEASES' for aggcod = '1019' replace all aggtran with 'OTHER DIGESTIVE DISEASES' for aggcod = '1020' replace all aggtran with 'KIDNEY DISEASES' for aggcod = '1021' replace all aggtran with 'PREGNANCY COMPLICATIONS' for aggcod = '1022' replace all aggtran with 'BIRTH DEFECTS' for aggcod = '1023' replace all aggtran with 'CONDITIONS OF PERINATAL PERIOD' for aggcod = '1024' replace all aggtran with 'SIDS' for aggcod = '1025' replace all aggtran with 'MOTOR VEHICLE ACCIDENTS' for aggcod = '1026' replace all aggtran with 'ALL OTHER ACCIDENTS' for aggcod = '1027' replace all aggtran with 'SUICIDE' for aggcod = '1028' replace all aggtran with 'HOMICIDE' for aggcod = '1029' replace all aggtran with 'OTHER EXTERNAL CAUSES' for aggcod = '1030' replace all aggtran with 'OTHER CAUSES' for aggcod = '1031' close all