We need to get one-way frequency output for several hundred variables into a single SAS data set, so that we can compare counts and percents across different years of data.
I looked at the data set produced by the OneWayFreqs ODS output option. It provides both unformatted and formatted values (e.g. columns for Sex and F_Sex), but the data set is hard to work with for a large number of tables, since it has a separate pair of columns for each tabulated variable.
It then occurred to me that it might be simpler to just route the PROC FREQ output to a CSV file, and it turns out that this output is much more compact and directly usable for my purposes. However, it only contains the formatted variable values, and it would be handy if I could get both formatted and unformatted.
One would think this would be possible, but after spending some time looking at the template code and PROC TEMPLATE code, I sure can't figure out how.