********************************************************************* 03JAN2001:14:28:30 THIS IS AN EXAMPLE OF A SAS PROGRAM THAT CREATES A SAS FILE FROM THE NHIS 1997 PERSONSX.DAT ASCII FILE NOTE: THE FORMAT DEFINITIONS GIVEN BELOW WILL RESULT IN PROCEDURE OUTPUT SHOWING VALUES THAT HAVE BEEN GROUPED AS THEY ARE SHOWN IN THE FILE LAYOUT DOCUMENTATION THIS IS STORED IN PERSONSX.SAS *********************************************************************; * USER NOTE: PLACE NEXT TWO STATEMENTS IN SUBSEQUENT PROGRAMS; LIBNAME NHIS 'C:\NHIS1997\'; LIBNAME LIBRARY 'C:\NHIS1997\'; * DEFINE VARIABLE VALUES FOR REPORTS; PROC FORMAT LIBRARY=LIBRARY; VALUE PEP001X 20 = "Person" ; VALUE PEP002X 1997 = "1997" ; VALUE $PEP004X "01" - "30" = "Family number 1 thru 30" ; VALUE $PEP005X "01" - "30" = "Person number 1 thru 30" ; VALUE PEP006X 1 = "Quarter 1" 2 = "Quarter 2" 3 = "Quarter 3" 4 = "Quarter 4" ; VALUE PEP007X 1 = "Male" 2 = "Female" ; VALUE PEP008X 00 = "Under 1 year" 01 - 84 = "1-84 years" 85 = "85+ years" ; VALUE PEP009X 1 = "Under 5 years" 2 = "5-17 years" 3 = "18-24 years" 4 = "25-44 years" 5 = "45-64 years" 6 = "65-69 years" 7 = "70-74 years" 8 = "75 years and over" ; VALUE PEP010X 1 = "Under 6 years" 2 = "6-16 years" 3 = "17-24 years" 4 = "25-34 years" 5 = "35-44 years" 6 = "45-54 years" 7 = "55-64 years" 8 = "65-74 years" 9 = "75 years and over" ; VALUE PEP011X 01 = "January" 02 = "February" 03 = "March" 04 = "April" 05 = "May" 06 = "June" 07 = "July" 08 = "August" 09 = "September" 10 = "October" 11 = "November" 12 = "December" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE PEP012X 1913 = "1913 or before" 1914 - 1998 = "1914-1998" 9997 = "Refused" 9998 = "Not ascertained" 9999 = "Don't know" ; VALUE PEP013X 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PEP014X 00 = "Multiple Hispanic" 01 = "Puerto Rican" 03 = "Mexican-Mexicano" 04 = "Mexican-American (includes Chicano)" 05 = "Cuban/Cuban-American" 06 = "Other Latin American" 07 = "Other Spanish" 08 = "Hispanic/Spanish, non-specific type" 09 = "Hispanic/Spanish, type refused" 10 = "Hispanic/Spanish, type not ascertained" 11 = "Hispanic/Spanish, type don't know" 12 = "Not Hispanic/Spanish origin" ; VALUE PEP015X 01 = "White" 02 = "Black/African American" 03 = "Indian (American) (includes Eskimo, Aleut)" 06 = "Chinese" 07 = "Filipino" 12 = "Asian Indian" 15 = "Other API*" 16 = "Other race" 17 = "Multiple race" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" ; VALUE PEP016X 1 = "White" 2 = "Black" 3 = "Other" ; VALUE PEP017X 1 = "White" 2 = "Black" 3 = "AIAN*" 4 = "API*" 5 = "Other" 6 = "Multiple race" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PEP018X 0 = "Under 14 years" 1 = "Married - spouse in household" 2 = "Married - spouse not in household" 3 = "Married - spouse in household unknown" 4 = "Widowed" 5 = "Divorced" 6 = "Separated" 7 = "Never married" 8 = "Living with partner" 9 = "Unknown marital status" ; VALUE PEP019X 1 = "Yes" 2 = "No" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP020X 1 = "Married" 2 = "Widowed" 3 = "Divorced" 4 = "Separated" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP021X 1 = "Separated" 2 = "Divorced" 3 = "Married" 4 = "Single/never married" 5 = "Widowed" 9 = "Unknown marital status" . = "" ; VALUE PEP022X 1 = "Married, spouse in household" 2 = "Married, spouse not in household" 3 = "Married, spouse in household unknown" 4 = "Widowed" 5 = "Divorced" 6 = "Separated" 7 = "Never Married" 9 = "Unknown marital status" . = "" ; VALUE PEP023X 01 = "Reference person" 02 = "Spouse (husband/wife)" 03 = "Unmarried Partner" 04 = "Child (biological/adoptive/in-law/step/foster)" 05 = "Child of partner" 06 = "Grandchild" 07 = "Parent (bio./adoptive/in-law/step/foster)" 08 = "Brother/sister (bio./adop./in-law/step/foster)" 09 = "Grandparent (Grandmother/Grandfather)" 10 = "Aunt/Uncle" 11 = "Niece/Nephew" 12 = "Other relative" 13 = "Housemate/roommate" 14 = "Roomer/Boarder" 15 = "Other nonrelative" 16 = "Legal guardian" 17 = "Ward" 97 = "Refused" 99 = "Don't know" ; VALUE PEP024X 01 - 30 = "Person number 1 thru 30" 98 = "Not ascertained" ; VALUE $PEP025X "P" = "Reference person" "8" = "Not ascertained" " " = "" ; VALUE PEP026X 1 = "Armed Forces" 2 = "Not Armed Forces" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP027X 0 = "Sample Adult - no record" 1 = "Sample Adult - has record" 2 = "Not selected as Sample Adult" 3 = "No one selected as Sample Adult" 4 = "Armed Force member" 5 = "Armed Force member - selected as Sample Adult" . = "" ; VALUE PEP028X 0 = "Sample Child - no record" 1 = "Sample Child - has record" 2 = "Not selected as Sample Child" 3 = "No one selected as Sample Child" 4 = "Emancipated Minor" 5 = "Military, not selected as Sample Child" . = "" ; VALUE PEP029X 0 = "Immunization Child - no record" 1 = "Immunization Child - has record" 2 = "Not eligible for immunization questions" . = "" ; VALUE PEP030X 01 - 30 = "01-30 persons" ; VALUE PEP031X 1 = "Northeast" 2 = "Midwest" 3 = "South" 4 = "West" ; VALUE PEP032X 1 = "5,000,000 or more" 2 = "2,500,000 - 4,999,999" 3 = "1,000,000 - 2,499,999" 4 = "500,000 - 999,999" 5 = "250,000 - 499,999" 6 = "Under 250,000" 7 = "Non-MSA" ; VALUE PEP049X 0 = "Unable to work" 1 = "Limited in work" 2 = "Not limited in work" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP052X 0 = "Limitation previously mentioned" 1 = "Yes, limited in some other way" 2 = "Not limited in any way" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PEP053X 1 = "Limited in any way" 2 = "Not limited in any way (includes unk)" ; VALUE PEP054X 1 = "Mentioned" 2 = "Not mentioned" 6 = "No condition at all" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP055X 01 - 94 = "1-94" 95 = "95+" 96 = "Since birth" 97 = "Refused*" 98 = "Not ascertained" 99 = "Don't know*" . = "" ; VALUE PEP056X 1 = "Day(s)" 2 = "Week(s)" 3 = "Month(s)" 4 = "Year(s)" 6 = "Since birth" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" . = "" ; VALUE PEP057X 00 = "Less than 1 year" 01 - 17 = "01-17 years" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PEP061X 00 = "Less than 1 year" 01 - 17 = "1-17 years" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PEP071X 01 - 94 = "1-94" 95 = "95+" 96 = "Since birth" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PEP109X 00 = "Less than 1 year" 01 - 84 = "01-84 years" 85 = "85+ years" 97 = "Refused" 98 = "Not ascertained" 99 = "Don't know" . = "" ; VALUE PEP250X 00 = "Since birth and child < 1 year of age" 01 = "Less than 3 months" 02 = "3 - 5 months" 03 = "6 - 12 months" 04 = "More than 1 year" 10 = "Unknown number of days" 11 = "Unknown number of weeks" 12 = "Unknown number of months" 13 = "Unknown number of years" 99 = "Unknown time with cond/impairment" . = "" ; VALUE PEP263X 01 = "Less than 3 months" 02 = "3 - 5 months" 03 = "6 - 12 months" 04 = "More than 1 year" 10 = "Unknown number of days" 11 = "Unknown number of weeks" 12 = "Unknown number of months" 13 = "Unknown number of years" 99 = "Unknown time with cond/impairment" . = "" ; VALUE PEP299X 1 = "Chronic" 2 = "Not chronic" 9 = "Unknown if chronic" . = "" ; VALUE PEP348X 1 = "At least one condition causing LA is chronic" 2 = "No condition causing LA is chronic" 9 = "Unknown if any condition causing LA is chronic" . = "" ; VALUE PEP349X 0 = "Not limited in any way (incl unk if limited)" 1 = "Limited; caused by at least one chronic cond" 2 = "Limited; not caused by chronic cond" 3 = "Limited; unk if cond causing LA is chronic" ; VALUE PEP350X 1 = "Excellent" 2 = "Very good" 3 = "Good" 4 = "Fair" 5 = "Poor" 7 = "Refused" 8 = "Not ascertained" 9 = "Don't know" ; VALUE PEP352X 1 = "1 injury episode" 2 = "2 injury episodes" 3 = "3 injury episodes" 4 = "4 injury episodes" . = "" ; VALUE PEP353X 0 = "None" 1 = "1 time" 2 = "2 times" 3 = "3 times" 4 = "4 times" . = "" ; VALUE PEP392X 1 = "1 poison episode" 2 = "2 poison episodes" 3 = "3 poison episodes" 4 = "4 poison episodes" . = "" ; VALUE PEP396X 001 - 365 = "1-365 times" 997 = "Refused" 998 = "Not ascertained" 999 = "Don't know" . = "