Create the SAS output data set. The ODS OUTPUT statement creates the SAS data set EnergyOutput from the output objects that PROC TABULATE produces. The name of each output object is Table. You can determine the name of the output objects by using the ODS TRACE ON statement. For information about the ODS TRACE statement, see ODS TRACE Statement.
Specify the variables that you want to be written to the output SAS data set. The KEEP= data set option limits the variables in the output data set EnergyOutput to Region, Division, Type, and Expenditures_sum. The variable name Expenditures_sum is generated by PROC TABULATE to indicate that the sum statistic was generated for the Expenditures variable.
ods output Table=energyoutput(keep=region division type expenditures_sum);