Sounds like you want the PROC FORMAT option NOTSORTED combined with with ORDER=DATA. Consider the following code. Proc Format; Value $nia(notsorted) "NIA Lvl 1"= "NIA 1" "NIA Lvl 2"="NIA 2" "NIA Lvl 3"="NIA 3" "NIA X" = "NIA XYZ" "NIA O"= "NIA Old" "NIA No"="NIA None" "NIA Miss"="NIA Missing" ; Run; data test; length nia $16; nia = "NIA Lvl 1"; output; run; proc summary data=test nway completetypes; class nia / preloadfmt order=data; format nia $nia.; output out=example / levels; run; proc print; run;
... View more