Working with the ODSTABLE Procedure

By default, ODS output is formatted based on the various definitions or templates that the procedure or DATA step specify. However, you can create your own new tabular output templates by using the ODSTABLE procedure. ODS uses these templates to produce customized tabular output. With the ODSTABLE procedure, you can create table templates and bind them with the input data set in one statement. You can name your templates and store them in a template store.
The ODSTABLE procedure is a simpler way of producing the same output that you would expect to get from using the DEFINE TABLE statement in PROC TEMPLATE. You can use the same statements in an ODSTABLE block as you would use in a DEFINE TABLE block in PROC TEMPLATE. For complete documentation about the ODSTABLE procedure, see The ODSTABLE Procedure in SAS Output Delivery System: Procedures Guide. For complete documentation about customizing tables with the TEMPLATE procedure, see TEMPLATE Procedure: Creating Tabular Templates in SAS Output Delivery System: Procedures Guide.
This example creates a table with customized columns.
options nodate obs=15;
title "Customizing Columns";

proc odstable data=sashelp.class;
column age sex height weight;

define age;
  style={fontsize=10pt just=l borderrightstyle=dashed background=yellow};
  header='Age of Student';
  format=3.;
end;
define sex;
  style={fontsize=10pt just=l borderrightstyle=dashed};
  header='Gender';
end;
define height;
  style={fontsize=10pt  just=l foreground=blue borderrightstyle=dashed};
  header='Height';
end;

run;
The following output uses the default HTMLBlue style with customized columns:
Customizing Columns
Customizing Columns