data demo; input Temperature @@; if Temperature < 35 then Condition = "Hypothermia"; else if Temperature < 36.5 then Condition = "Low Normal"; else if Temperature <= 37.5 then Condition = "Normal"; else if Temperature <= 38.3 then Condition = "Fever"; else if Temperature < 40 then Condition = "Hyperthermia"; else if Temperature <= 41.5 then Condition = "Hyperpyrexia"; cards; 38.2 39.7 0 37.5 40.0 98.6 999 ; run; proc print; run; proc format; value HotCold 30 -< 35 = "Hypothermia" 35 -< 36.5 = "Low Normal" 36.5 - 37.5 = "Normal" 37.5 - 38.3 = "Fever" 38.3 <-< 40 = "Hyperthermia" 40 - 41.5 = "Hyperpyrexia" /* now the weird ones */ 0 = "Thermometer Malfunction" 999 = "Not possible / No consent" other = "Fahrenheit?" ; run; proc print data = demo; format Temperature HotCold.; var Temperature; run; ods pdf file = 'F:\temp\Format1.pdf'; proc tabulate data = SASDM.DelnBrth; class IndicCS1 / preloadfmt order = data; format IndicCS1 $CSI6Fmt.; table IndicCS1; run; ods pdf close; data XLD8s; input D8String $9.; datalines; 05Nov1960 25Nov1954 26Jul1953 04Mar1952 16Mar1921 23Feb1910 ; run; proc print; run; data XLD8s; input D8String Date9.; datalines; 05Nov1960 25Nov1954 26Jul1953 04Mar1952 16Mar1921 23Feb1910 ; run; proc print; format D8String YYMMDD10.; run;