*Categorizing individual Census Codes into NHIS Detailed Categories as described here: National Center for Health Statistics. Dataset documentation 2018. Document Version Date: 03-Sep-19. National Health Interview Survey (NHIS). Available from: https://ftp.cdc.gov/pub/health_Statistics/NCHs/Dataset_Documentation/NHIS/2018/samadult_layout.pdf. See Industry Appendix page 460, and Occupation Appendix page 463.; *Please note: *NHIS 2018 INDUSTRY AND OCCUPATION GROUPINGS uses the 2012 Census codes; *NHIS 2021 INDUSTRY AND OCCUPATION GROUPINGS uses the 2018 Census codes; **********************************************************; **********************************************************; **********************************************************; *email noms@cdc.gov with any questions on this program; **********************************************************; **********************************************************; **********************************************************; ; %let year=2021; options formdlim=* linesize=100; /*allows longer page lengths so output does not have as many page breaks*/ /*libname pub2020 'MYFILE\PublicUseData\2020';*/ libname pub2021 'myfile\PublicUseData\2021'; /*proc contents data=public.public2020 ;*/ /*run;*/ proc format; value $occdet '01'='01:Chief executives general and operations managers legislators' '02'='02:Advertising, marketing, promotions, public relations, and sales managers' '03'='03:Operations specialties managers' '04'='04:Other management occupations' '05'='05:Business operations specialists' '06'='06:Financial specialists' '07'='07:Computer specialists' '08'='08:Mathematical science occupations' '09'='09:Architects, surveyors, and cartographers' '10'='10:Engineers' '11'='11:Drafters, engineering, and mapping technicians' '12'='12:Life scientists' '13'='13:Physical scientists' '14'='14:Social scientists and related workers' '15'='15:Life, physical, and social science technicians' '16'='16:Counselors, social workers, and other community and social service specialists' '17'='17:Religious workers' '18'='18:Lawyers, judges and related workers' '19'='19:Legal support workers' '20'='20:Postsecondary teachers' '21'='21:Primary, secondary, and special education school teachers' '22'='22:Other teachers and instructors' '23'='23:Librarians, curators, and archivists' '24'='24:Other education, training, and library occupations' '25'='25:Art and design workers' '26'='26:Entertainers and performers, sports and related workers' '27'='27:Media and communications workers' '28'='28:Media and communications equipment workers' '29'='29:Health diagnosing and treating practitioners' '30'='30:Health technologists and technicians' '31'='31:Other healthcare practitioners and technical occupations' '32'='32:Nursing, psychiatric, and home health aides' '33'='33:Occupational and physical therapist assistants and aides' '34'='34:Other healthcare support occupations' '35'='35:First-line supervisors/managers, protective service workers' '36'='36:Fire fighting and prevention workers' '37'='37:Law enforcement workers' '38'='38:Other protective service workers' '39'='39:Supervisors, food preparation, and service worker' '40'='40:Cooks and food preparation workers' '41'='41:Food and beverage serving workers' '42'='42:Other food preparation and serving related workers' '43'='43:Supervisors, building and grounds cleaning and maintenance workers' '44'='44:Building cleaning and pest control workers' '45'='45:Grounds maintenance workers' '46'='46:Supervisors, personal care and service workers' '47'='47:Animal care and service workers' '48'='48:Entertainment attendants and related workers' '49'='49:Funeral service workers' '50'='50:Personal appearance workers' '51'='51:Transportation, tourism, and lodging attendants' '52'='52:Other personal care and service workers' '53'='53:Supervisors, sales workers' '54'='54:Retail sales workers' '55'='55:Sales representatives, services' '56'='56:Sales representatives, wholesale and manufacturing' '57'='57:Other sales and related workers' '58'='58:Supervisors, office and administrative support workers' '59'='59:Communications equipment operators' '60'='60:Financial clerks' '61'='61:Information and record clerks' '62'='62:Material recording, scheduling, dispatching, and distributing workers' '63'='63:Secretaries and administrative assistants ' '64'='64:Other office and administrative support workers' '65'='65:Supervisors, farming, fishing, and forestry workers' '66'='66:Agricultural workers' '67'='67:Fishing and hunting workers' '68'='68:Forest, conservation, and logging workers' '69'='69:Supervisors, construction and extraction workers' '70'='70:Construction trades workers' '71'='71:Helpers, construction trades' '72'='72:Other construction and related workers' '73'='73:Extraction workers' '74'='74:Supervisors of installation, maintenance, and repair workers' '75'='75:Electrical and electronic equipment mechanics, installers, and repairers' '76'='76:Vehicle and mobile equipment mechanics, installers, and repairers' '77'='77:Other installation, maintenance, and repair occupations' '78'='78:Supervisors, production workers' '79'='79:Assemblers and fabricators' '80'='80:Food processing workers' '81'='81:Metal workers and plastic workers' '82'='82:Printing workers' '83'='83:Textile, apparel, and furnishing workers' '84'='84:Woodworkers' '85'='85:Plant and system operators' '86'='86:Other production occupations' '87'='87:Supervisors, transportation and material moving workers' '88'='88:Air transportation workers' '89'='89:Motor vehicle operators' '90'='90:Rail transportation workers' '91'='91:Water transportation workers' '92'='92:Other transportation workers' '93'='93:Material moving workers' '94'='94:NIOSH NCHS housewife' '95'='95:NIOSH NCHS military' '96'='96:NIOSH NCHS Other--Misc,not available' ; Value $inddet '01'='01:Crop production' '02'='02:Animal production' '03'='03:forestry and logging' '04'='04:fishing, hunting, and trapping' '05'='05:Support activities for Agriculture and forestry' '06'='06:Oil and gas extraction' '07'='07:Mining (except oil and gas)' '08'='08:Support activities for mining' '09'='09:Utilities Industries' '10'='10:Construction Industries' '11'='11:Food Manufacturing' '12'='12:Beverage and tobacco product manufacturing' '13'='13:textile mills' '14'='14:textile product mills' '15'='15:Apparel manufacturing' '16'='16:leather and allied product manufacturing' '17'='17:Wood product manufacturing' '18'='18:paper manufacturing' '19'='19:printing and related support activities' '20'='20:petroleum and coal products manufacturing' '21'='21:chemical manufacturing' '22'='22:plastics and rubber products manufacturing' '23'='23:non-metallic mineral product manufacturing' '24'='24:primary metal manufacturing' '25'='25:fabricated metal product manufacturing' '26'='26:machinery manufacturing' '27'='27:computer and electronic product manufacturing' '28'='28:electrical equipment, appliance, and component manufacturing' '29'='29:Transportation equipment manufacturing' '30'='30:furniture and related product manufacturing' '31'='31:miscellaneous manufacturing' '32'='32:Merchant wholesalers, durable goods' '33'='33:Merchant wholesalers, nondurable goods' '34'='34:non-specified wholesale trade' '35'='35:motor vehicle and parts dealers' '36'='36:furniture and home furnishings stores' '37'='37:electronics and appliance stores' '38'='38:Building material and garden equipment and supplies dealers' '39'='39:food and beverage stores' '40'='40:health and personal care stores' '41'='41:gasoline stations' '42'='42:clothing and clothing accessories stores' '43'='43:sporting goods, camera, hobby, book and music stores' '44'='44:general merchandise stores' '45'='45:miscellaneous store retailers' '46'='46:nonstore retailers and non-specified retail trade' '47'='47:Transportation (including support activities for transportation)' '48'='48:postal service, couriers, and messengers' '49'='49:Warehousing and storage' '50'='50:Publishing industries (except internet)' '51'='51:Motion picture and sound recording industries' '52'='52:broadcasting and telecommunications' '53'='53:information services and data processing' '54'='54:Monetary authorities--Central Bank' '55'='55:credit intermediation and related activities' '56'='56:Securities, commodity contracts, and other financial investments and related activities' '57'='57:insurance carriers and related activities' '58'='58:Real Estate' '59'='59:Rental and Leasing services' '60'='60:Lessors of nonfinancial intangible assets (except copyrighted works)' '61'='61:Professional, Scientific, and Technical Services Industries' '62'='62:Management of Companies and Enterprises' '63'='63:Administrative and Support and Waste management and Remediation Services Industries' '64'='64:Education Services Industries' '65'='65:Ambulatory health care services' '66'='66:hospitals' '67'='67:Nursing and Residential Care Facilities' '68'='68:Social Assistance' '69'='69:performing arts, spectator sports, and related industries' '70'='70:Museums, historical sites, and similar institutions' '71'='71:Amusement, gambling, and recreation industries' '72'='72:Accommodation ' '73'='73:Food Services and Drinking places' '74'='74:Repair and Maintenance' '75'='75:Personal Services (barber shops, beauty salons, nail salons, laundry, funeral homes and cemeteries)' '76'='76:Religious, grantmaking, civic, labor, professional, and similar organizations' '77'='77:Private Households' '78'='78:Public Administration Industries' '79'='79:NIOSH NCHS military' '80'='80:NIOSH NCHS Other--Misc,not available' ; run; data temp; set pub2021.public2021; If CensusOcc in ('0010', '0020', '0030') then occdet='01';/*Chief executives; general and operations managers; legislators*/ Else If CensusOcc in ('0040', '0050', '0060') then occdet='02';/*Advertising, marketing, promotions, public relations, and sales managers*/ Else If CensusOcc in ('0100', '0110', '0120', '0135', '0136', '0137', '0140', '0150', '0160') then occdet='03';/*Operations specialties managers*/ Else If CensusOcc in ('0205', '0220', '0230', '0300', '0310', '0325', '0330', '0340', '0350', '0360', '0400', '0410', '0420', '0425', '0430') then occdet='04';/*Other management occupations*/ Else If CensusOcc in ('0500', '0510', '0520', '0530', '0540', '0565', '0600', '0630', '0640', '0650', '0700', '0710', '0725', '0726', '0735', '0740') then occdet='05';/*Business operations specialists*/ Else If CensusOcc in ('0800', '0810', '0820', '0830', '0840', '0850', '0860', '0900', '0910', '0930', '0940', '0950') then occdet='06';/*Financial specialists*/ Else If CensusOcc in ('1005', '1006', '1007', '1010', '1020', '1030', '1050', '1060', '1105', '1106', '1107') then occdet='07';/*Computer specialists*/ Else If CensusOcc in ('1200', '1210', '1220', '1230', '1240') then occdet='08';/*Mathematical science occupations*/ Else If CensusOcc in ('1300', '1310') then occdet='09';/*Architects, surveyors, and cartographers*/ Else If CensusOcc in ('1320', '1330', '1340', '1350', '1360', '1400', '1410', '1420', '1430', '1440', '1450', '1460', '1500', '1510', '1520', '1530') then occdet='10';/*Engineers*/ Else If CensusOcc in ('1540', '1550', '1560') then occdet='11';/*Drafters, engineering, and mapping technicians*/ Else If CensusOcc in ('1600', '1610', '1640', '1650', '1660') then occdet='12';/*Life scientists*/ Else If CensusOcc in ('1700', '1710', '1720', '1740', '1760') then occdet='13';/*Physical scientists*/ Else If CensusOcc in ('1800', '1815', '1820', '1830', '1840', '1860') then occdet='14';/*Social scientists and related workers*/ Else If CensusOcc in ('1900', '1910', '1920', '1930', '1940', '1950', '1965') then occdet='15';/*Life, physical, and social science technicians*/ Else If CensusOcc in ('2000', '2010', '2015', '2016', '2025') then occdet='16';/*Counselors, social workers, and other community and social service specialists*/ Else If CensusOcc in ('2040', '2050', '2060') then occdet='17';/*Religious workers*/ Else If CensusOcc in ('2100', '2105', '2110') then occdet='18';/*Lawyers, judges and related workers*/ Else If CensusOcc in ('2145', '2160 ') then occdet='19';/*Legal support workers*/ Else If CensusOcc in ('2200') then occdet='20';/*Postsecondary teachers*/ Else If CensusOcc in ('2300', '2310', '2320', '2330') then occdet='21';/*Primary, secondary, and special education school teachers*/ Else If CensusOcc in ('2340') then occdet='22';/*Other teachers and instructors*/ Else If CensusOcc in ('2400', '2430', '2440') then occdet='23';/*Librarians, curators, and archivists*/ Else If CensusOcc in ('2540', '2550') then occdet='24';/*Other education, training, and library occupations*/ Else If CensusOcc in ('2600', '2630') then occdet='25';/*Art and design workers*/ Else If CensusOcc in ('2700', '2710', '2720', '2740', '2750', '2760') then occdet='26';/*Entertainers and performers, sports and related workers*/ Else If CensusOcc in ('2800', '2810', '2825', '2830', '2840', '2850', '2860') then occdet='27';/*Media and communications workers*/ Else If CensusOcc in ('2900', '2910', '2920', '2960') then occdet='28';/*Media and communications equipment workers*/ Else If CensusOcc in ('3000', '3010', '3030', '3040', '3050', '3060', '3110', '3120', '3140', '3150', '3160', '3200', '3210', '3220', '3230', '3235', '3245', '3250', '3255', '3256', '3257', '3258', '3260') then occdet='29';/*Health diagnosing and treating practitioners*/ Else If CensusOcc in ('3300', '3310', '3320', '3400', '3420', '3500', '3510', '3520', '3535') then occdet='30';/*Health technologists and technicians*/ Else If CensusOcc in ('3540') then occdet='31';/*Other healthcare practitioners and technical occupations*/ Else If CensusOcc in ('3600') then occdet='32';/*Nursing, psychiatric, and home health aides*/ Else If CensusOcc in ('3610', '3620') then occdet='33';/*Occupational and physical therapist assistants and aides*/ Else If CensusOcc in ('3630', '3640', '3645', '3646', '3647', '3648', '3649', '3655') then occdet='34';/*Other healthcare support occupations*/ Else If CensusOcc in ('3700', '3710', '3720', '3730') then occdet='35';/*First-linesupervisors/managers, protective service workers*/ Else If CensusOcc in ('3740', '3750') then occdet='36';/*Fire fighting and prevetions workers*/ Else If CensusOcc in ('3800', '3820', '3830', '3840', '3850', '3860') then occdet='37';/*Law enforcement workers*/ Else If CensusOcc in ('3900', '3910', '3930', '3940', '3945', '3955') then occdet='38';/*Other protective service workers*/ Else If CensusOcc in ('4000', '4010') then occdet='39';/*Supervisors, food preparation, and service worker*/ Else If CensusOcc in ('4020', '4030') then occdet='40';/*Cooks and food preparation workers*/ Else If CensusOcc in ('4040', '4050', '4060', '4110', '4120') then occdet='41';/*Food and beverage serving workers*/ Else If CensusOcc in ('4130', '4140', '4150', '4160') then occdet='42';/*Other food preparation and serving related workers*/ Else If CensusOcc in ('4200', '4210') then occdet='43';/*Supervisors, building and grounds cleaning and maintenance workers*/ Else If CensusOcc in ('4220', '4230', '4240') then occdet='44';/*Building cleaning and pest control workers*/ Else If CensusOcc in ('4250') then occdet='45';/*Grounds maintenance workers*/ Else If CensusOcc in ('4300', '4320') then occdet='46';/*Supervisors, personal care and service workers*/ Else If CensusOcc in ('4340', '4350') then occdet='47';/*Animal care and service workers*/ Else If CensusOcc in ('4400', '4410', '4420', '4430') then occdet='48';/*Entertainment attendants and related workers*/ Else If CensusOcc in ('4460', '4465') then occdet='49';/*Funeral service workers*/ Else If CensusOcc in ('4500', '4510', '4520') then occdet='50';/*Personal appearance workers*/ Else If CensusOcc in ('4530', '4540') then occdet='51';/*Transportation, tourism, and lodging attendants*/ Else If CensusOcc in ('4600', '4610', '4620', '4640', '4650') then occdet='52';/*Other personal care and service workers*/ Else If CensusOcc in ('4700', '4710') then occdet='53';/*Supervisors, sales workers*/ Else If CensusOcc in ('4720', '4740', '4750', '4760') then occdet='54';/*Retail sales workers*/ Else If CensusOcc in ('4800', '4810', '4820', '4830', '4840') then occdet='55';/*Sales representatives, services*/ Else If CensusOcc in ('4850') then occdet='56';/*Sales representatives, wholesale and manufacturing*/ Else If CensusOcc in ('4900', '4920', '4930', '4940', '4950', '4965') then occdet='57';/*Other sales and related workers*/ Else If CensusOcc in ('5000') then occdet='58';/*Supervisors, office and administrative support workers*/ Else If CensusOcc in ('5010', '5020', '5030') then occdet='59';/*Communications equipment operators*/ Else If CensusOcc in ('5100', '5110', '5120', '5130', '5140', '5150', '5160', '5165') then occdet='60';/*Financial clerks*/ Else If CensusOcc in ('5200', '5210', '5220', '5230', '5240', '5250', '5260', '5300', '5310', '5320', '5330', '5340', '5350', '5360', '5400', '5410', '5420') then occdet='61';/*Information and record clerks*/ Else If CensusOcc in ('5500', '5510', '5520', '5530', '5540', '5550', '5560', '5600', '5610', '5620', '5630') then occdet='62';/*Material recording, scheduling, dispatching, and distributing workers*/ Else If CensusOcc in ('5700') then occdet='63';/*Secretaries and administrative assistants*/ Else If CensusOcc in ('5800', '5810', '5820', '5830', '5840', '5850', '5860', '5900', '5910', '5920', '5940') then occdet='64';/*Other office and administrative support workers*/ Else If CensusOcc in ('6005') then occdet='65';/*Supervisors, farming, fishing, and forestry workers*/ Else If CensusOcc in ('6010', '6020', '6040', '6050') then occdet='66';/*Agricultural workers*/ Else If CensusOcc in ('6100', '6110') then occdet='67';/*Fishing and hunting workers*/ Else If CensusOcc in ('6120', '6130') then occdet='68';/*Forest, conservation, and logging workers*/ Else If CensusOcc in ('6200') then occdet='69';/*Supervisors, construction and extraction workers*/ Else If CensusOcc in ('6210', '6220', '6230', '6240', '6250', '6260', '6300', '6310', '6320', '6330', '6355', '6360', '6400', '6420', '6430', '6440', '6460', '6500', '6515', '6520', '6530', '6540') then occdet='70';/*Construction trades workers*/ Else If CensusOcc in ('6600') then occdet='71';/*Helpers, construction trades*/ Else If CensusOcc in ('6660', '6700', '6710', '6720', '6730', '6740', '6750', '6765') then occdet='72';/*Other construction and related workers*/ Else If CensusOcc in ('6800', '6820', '6830', '6840', '6910', '6920', '6930', '6940') then occdet='73';/*Extraction workers*/ Else If CensusOcc in ('7000') then occdet='74';/*Supervisors of installation, maintenance, and repair workers*/ Else If CensusOcc in ('7010', '7020', '7030', '7040', '7050', '7100', '7110', '7120', '7130') then occdet='75';/*Electrical and electronic equipment mechanics, installers, and repairers*/ /*added 7110 not in spreadsheet*/ Else If CensusOcc in ('7140', '7150', '7160', '7200', '7210', '7220', '7240', '7260') then occdet='76';/*Vehicle and mobile equipment mechanics, installers, and repairers*/ Else If CensusOcc in ('7300', '7315', '7320', '7330', '7340', '7350', '7360', '7410', '7420', '7430', '7440', '7510', '7520', '7540', '7550', '7560', '7600', '7610', '7630') then occdet='77';/*Other installation, maintenance, and repair occupations*/ Else If CensusOcc in ('7700') then occdet='78';/*Supervisors, production workers*/ Else If CensusOcc in ('7710', '7720', '7730', '7740', '7750') then occdet='79';/*Assemblers and fabricators*/ Else If CensusOcc in ('7800', '7810', '7830', '7840', '7850', '7855') then occdet='80';/*Food processing workers*/ Else If CensusOcc in ('7900', '7920', '7930', '7940', '7950', '7960', '8000', '8010', '8020', '8030', '8040', '8060', '8100', '8120', '8130', '8140', '8150', '8160', '8200', '8210', '8220') then occdet='81';/*Metal workers and plastic workers*/ Else If CensusOcc in ('8250', '8255', '8256') then occdet='82';/*Printing workers*/ Else If CensusOcc in ('8300', '8310', '8320', '8330', '8340', '8350', '8360', '8400', '8410', '8420', '8430', '8440', '8450', '8460') then occdet='83';/*Textile, apparel, and furnishing workers*/ Else If CensusOcc in ('8500', '8510', '8520', '8530', '8540', '8550') then occdet='84';/*Woodworkers*/ Else If CensusOcc in ('8600', '8610', '8620', '8630') then occdet='85';/*Plant and system operators*/ Else If CensusOcc in ('8640', '8650', '8710', '8720', '8730', '8740', '8750', '8760', '8800', '8810', '8830', '8840', '8850', '8860', '8900', '8910', '8920', '8930', '8940', '8950', '8965') then occdet='86';/*Other production occupations*/ Else If CensusOcc in ('9000') then occdet='87';/*Supervisors, transportation and material moving workers*/ Else If CensusOcc in ('9030', '9040', '9050') then occdet='88';/*Air transportation workers*/ Else If CensusOcc in ('9110', '9120', '9130', '9140', '9150') then occdet='89';/*Motor vehicle operators*/ Else If CensusOcc in ('9200', '9230', '9240', '9260') then occdet='90';/*Rail transportation workers*/ Else If CensusOcc in ('9300', '9310', '9330') then occdet='91';/*Water transportation workers*/ Else If CensusOcc in ('9340', '9350', '9360', '9410', '9415', '9420') then occdet='92';/*Other transportation workers*/ Else If CensusOcc in ('9500', '9510', '9520', '9560', '9600', '9610', '9620', '9630', '9640', '9650', '9720', '9730', '9740', '9750') then occdet='93';/*Material moving workers*/ Else If CensusOcc in ('9830', '9840', '9850') then occdet='94';/*NIOSH NCHS military*/ Else If CensusOcc in ('9010') then occdet='95';/*NIOSH NCHS Housewife*/ Else If CensusOcc in ('9020', '9070', '9060', '9100', '9900') then occdet='96';/*NIOSH NCHS Other(except housewife)--Misc*/ else if CensusOcc in ('') then occdet="";/*no codes*/ If CensusInd in ('0170') then IndDet='01';/*Crop production*/ Else If CensusInd in ('0180') then IndDet='02';/*Animal production*/ Else If CensusInd in ('0190', '0270') then IndDet='03';/*forestry and logging*/ Else If CensusInd in ('0280') then IndDet='04';/*fishing, hunting, and trapping*/ Else If CensusInd in ('0290') then IndDet='05';/*Support activities for Agriculture and forestry*/ Else If CensusInd in ('0370') then IndDet='06';/*Oil and gas extraction*/ Else If CensusInd in ('0380', '0390', '0470', '0480') then IndDet='07';/*Mining (except oil and gas)*/ Else If CensusInd in ('0490') then IndDet='08';/*Support activities for mining*/ Else If CensusInd in ('0570', '0580', '0590', '0670', '0680', '0690') then IndDet='09';/*Utilities Industries*/ Else If CensusInd in ('0770') then IndDet='10';/*Construction Industries*/ Else If CensusInd in ('1070', '1080', '1090', '1170', '1180', '1190', '1270', '1280', '1290') then IndDet='11';/*Food Manufacturing*/ Else If CensusInd in ('1370', '1390') then IndDet='12';/*Beverage and tobacco product manufacturing*/ Else If CensusInd in ('1470', '1480', '1490') then IndDet='13';/*textile mills*/ Else If CensusInd in ('1570', '1590', '1670') then IndDet='14';/*textile product mills*/ Else If CensusInd in ('1680', '1690', '1770') then IndDet='15';/*Apparel manufacturing*/ Else If CensusInd in ('1790') then IndDet='16';/*leather and allied product manufacturing*/ Else If CensusInd in ('3770', '3780', '3790', '3870', '3875') then IndDet='17';/*Wood product manufacturing*/ Else If CensusInd in ('1870', '1880', '1890') then IndDet='18';/*paper manufacturing*/ Else If CensusInd in ('1990') then IndDet='19';/*printing and related support activities*/ Else If CensusInd in ('2070', '2090') then IndDet='20';/*petroleum and coal products manufacturing*/ Else If CensusInd in ('2170', '2180', '2190', '2270', '2280', '2290') then IndDet='21';/*chemical manufacturing*/ Else If CensusInd in ('2370', '2380', '2390') then IndDet='22';/*plastics and rubber products manufacturing*/ Else If CensusInd in ('2470', '2480', '2490', '2570', '2590') then IndDet='23';/*non-metallic mineral product manufacturing*/ Else If CensusInd in ('2670', '2680', '2690', '2770', '2780', '2990') then IndDet='24';/*primary metal manufacturing*/ Else If CensusInd in ('2790', '2870', '2880', '2890', '2970', '2980') then IndDet='25';/*fabricated metal product manufacturing*/ Else If CensusInd in ('3070', '3080', '3090', '3095', '3170', '3180', '3190', '3290') then IndDet='26';/*machinery manufacturing*/ Else If CensusInd in ('3360', '3365', '3370', '3380', '3390') then IndDet='27';/*computer and electronic product manufacturing*/ Else If CensusInd in ('3470', '3490') then IndDet='28';/*electrical equipment, appliance, and component manufacturing*/ Else If CensusInd in ('3570', '3580', '3590', '3670', '3680', '3690') then IndDet='29';/*Transportation equipment manufacturing*/ Else If CensusInd in ('3890', '3895') then IndDet='30';/*furniture and related product manufacturing*/ Else If CensusInd in ('3960', '3970', '3980', '3990') then IndDet='31';/*miscellaneous manufacturing*/ Else If CensusInd in ('4070', '4080', '4090', '4170', '4180', '4190', '4195', '4260', '4265', '4270', '4280', '4290') then IndDet='32';/*Merchant wholesalers, durable goods*/ Else If CensusInd in ('4370', '4380', '4390', '4470', '4480', '4490', '4560', '4570', '4580', '4585') then IndDet='33';/*Merchant wholesalers, nondurable goods*/ Else If CensusInd in ('4590') then IndDet='34';/*non-specified wholesale trade*/ Else If CensusInd in ('4670', '4680', '4690') then IndDet='35';/*motor vehicle and parts dealers*/ Else If CensusInd in ('4770') then IndDet='36';/*furniture and home furnishings stores*/ Else If CensusInd in ('4780', '4790', '4795') then IndDet='37';/*electronics and appliance stores*/ Else If CensusInd in ('4870', '4880', '4890') then IndDet='38';/*Building material and garden equipment and supplies dealers*/ Else If CensusInd in ('4970', '4980', '4990') then IndDet='39';/*food and beverage stores*/ Else If CensusInd in ('5070', '5080') then IndDet='40';/*health and personal care stores*/ Else If CensusInd in ('5090') then IndDet='41';/*gasoline stations*/ Else If CensusInd in ('5170', '5180', '5190') then IndDet='42';/*clothing and clothing accessories stores*/ Else If CensusInd in ('5270', '5275', '5280', '5290', '5295', '5370') then IndDet='43';/*sporting goods, camera, hobby, book and music stores*/ Else If CensusInd in ('5380', '5390') then IndDet='44';/*general merchandise stores*/ Else If CensusInd in ('5470', '5480', '5490', '5570', '5580') then IndDet='45';/*miscellaneous store retailers*/ Else If CensusInd in ('5590', '5591', '5592', '5670', '5680', '5690', '5790') then IndDet='46';/*nonstore retailers and non-specified retail trade*/ Else If CensusInd in ('6070', '6080', '6090', '6170', '6180', '6190', '6270', '6280', '6290') then IndDet='47';/*Transportation (including support activities for transportation)*/ Else If CensusInd in ('6370', '6380') then IndDet='48';/*postal service, couriers, and messengers*/ Else If CensusInd in ('6390') then IndDet='49';/*Warehousing and storage*/ Else If CensusInd in ('6470', '6480', '6490') then IndDet='50';/*Publishing industries (except internet)*/ Else If CensusInd in ('6570', '6590') then IndDet='51';/*Motion picture and sound recording industries*/ Else If CensusInd in ('6670', '6680', '6690') then IndDet='52';/*broadcasting and telecommunications*/ Else If CensusInd in ('6770', '6672', '6695', '6780') then IndDet='53';/*information services and data processing*/ Else If CensusInd in ('6870') then IndDet='54';/*Monetary authorities--Central Bank*/ Else If CensusInd in ('6880', '6890') then IndDet='55';/*credit intermediation and related activities*/ Else If CensusInd in ('6970') then IndDet='56';/*Securities, commodity contracts, and other financial investments and related activities*/ Else If CensusInd in ('6990') then IndDet='57';/*insurance carriers and related activities*/ Else If CensusInd in ('7070') then IndDet='58';/*Real Estate*/ Else If CensusInd in ('7080', '7170', '7180') then IndDet='59';/*Rental and Leasing services*/ Else If CensusInd in ('7190') then IndDet='60';/*Lessors of nonfinancial intangible assets (except copyrighted works)*/ Else If CensusInd in ('7270', '7280', '7290', '7370', '7380', '7390', '7460', '7470', '7480', '7490') then IndDet='61';/*Professional, Scientific, and Technical Services Industries*/ Else If CensusInd in ('7570') then IndDet='62';/*Management of Companies and Enterprises*/ Else If CensusInd in ('7580', '7590', '7670', '7680', '7690', '7770', '7780', '7790') then IndDet='63';/*Administrative and Support and Waste management and Remediation Services Industries*/ Else If CensusInd in ('7860', '7870', '7880', '7890') then IndDet='64';/*Education Services Industries*/ Else If CensusInd in ('7970', '7980', '7990', '8070', '8080', '8090', '8170', '8180') then IndDet='65';/*Ambulatory health care services*/ Else If CensusInd in ('8190') then IndDet='66';/*Hospitals*/ Else If CensusInd in ('8270', '8290') then IndDet='67';/*Nursing and Residential Care Facilities*/ Else If CensusInd in ('8370', '8380', '8390', '8470') then IndDet='68';/*Social Assistance*/ Else If CensusInd in ('8560') then IndDet='69';/* performing arts, spectator sports, and related industries*/ Else If CensusInd in ('8570') then IndDet='70';/*Museums, historical sites, and similar institutions*/ Else If CensusInd in ('8580', '8590') then IndDet='71';/*Amusement, gambling, and recreation industries*/ Else If CensusInd in ('8660', '8670') then IndDet='72';/*Accommodation */ Else If CensusInd in ('8680', '8690') then IndDet='73';/*Food Services and Drinking places*/ Else If CensusInd in ('8770', '8780', '8790', '8870', '8880', '8890') then IndDet='74';/*Repair and Maintenance*/ Else If CensusInd in ('8970', '8980', '8990', '9070', '9080', '9090') then IndDet='75';/*Personal Services (barber shops, beauty salons, nail salons, laundry, funteral homes and cemetaries)*/ Else If CensusInd in ('9160', '9170', '9180', '9190') then IndDet='76';/*Religious, grantmaking, civic, labor, professional, and similar organizations*/ Else If CensusInd in ('9290') then IndDet='77';/*Private Households*/ Else If CensusInd in ('9370', '9380', '9390', '9470', '9480', '9490', '9570', '9590') then IndDet='78';/*Public Administration Industries*/ Else If CensusInd in ('9790', '9670', '9680', '9780', '9770', '9690', '9790', '9870') then IndDet='79';/*NIOSH NCHS military*/ Else If CensusInd in ('9890', '9880', '9990') then IndDet='80';/*NIOSH NCHS Other--Misc*/ else if CensusInd in ('') then indet="";/*no codes*/ /*where ager12 NOTIN ("01", "02", "03", "12");*/ agecode=substr(detailage,1,1); age_x=substr(detailage,2,3); if agecode=1 and age_x not in ("999") then agenum=input(age_x, 3.); format occdet $occdet. inddet $inddet.; run; title "CHECK:occ codes not categorized into detailed categories: NVSS Death Certificate data year &year"; proc freq data=temp; tables CensusOcc; where occdet in ('') and censusocc ne ""; run; title "CHECK:ind codes not categorized into detailed categories: NVSS Death Certificate data year &year"; proc freq data=temp; tables CensusInd; where inddet in ('') and censusind ne ""; run; title "NHIS detailed Industry Categories: Census 2012: NVSS Death Certificate data year &year"; proc freq data =temp; tables inddet/nopercent nocum; run; title "NHIS detailed Occupation Categories: Census 2012: NVSS Death Certificate data year &year"; proc freq data =temp; tables occdet/nopercent nocum; run; title;