%include "/pub/sas/autoexec.sas"; libname sahie '/pub/data/sahie' outrep=linux_x86_64; proc format library=sahie.formats; value $Agecat 0 = "All(<65 yrs)" 1 = "18 to 64 yrs" 2 = "40 to 64 yrs" 3 = "50 to 64 yrs" 4 = "Under 19 yrs" 5 = "21 to 64 yrs"; *-- agecat 5 added with 2015 data. ; Value $racecat 0 = "All races" 1 = "White alone, not Hispanic" 2 = "Black alone, not Hispanic" 3 = "Hispanic (any race)"; Value $Sexcat 0 = "Both sexes " 1 = "Male" 2 = "Female" ; Value $iprcat 0 = "All income levels" 1 = "At or below 200% of poverty" 2 = "At or below 250% of poverty" 3 = "At or below 138% of poverty" 4 = "At or below 400% of poverty" 5 = "Between 138% and 400% of poverty"; run; *-- Generate 4 companion format codes that repeat the code as part of the label. ; %cnvt2wc($agecat, library=sahie, lenarg=1) %cnvt2wc($racecat, library=sahie, lenarg=1, fnameout=raccatwc) %cnvt2wc($sexcat, library=sahie, lenarg=1) %cnvt2wc($iprcat, library=sahie, lenarg=1) ;