In reply to Michael Raithel.

Thank you, Mike, for your inspiring feedback. Indeed, this is a cool feature. You can even combine several user-defined formats into one format. For example, you can combine gender and marital status into one format. Try this code out:

proc format;
value $gender
'1' = 'Female'
'2' = 'Male'
;
value $marital
'M' = 'Married'
'D' = 'Divorced'
'S' = 'Single'
'W' = 'Widowed'
;
value $demogra
'1','2' = [$gender.]
other = [$marital.]
;
run;

data _null_;
do i='1','2','M','D','S','W';
put i= $demogra.;
end;
run;