Defining a Table
You have already seen in previous chapters how to render some simple table templates, but let’s recap the methods here to refresh our memories. The first method works with all versions of SAS that have ODS. It uses PROC TEMPLATE to define the table. The DATA step is then used to bind a data set to that template to create the tabular output. The code below is the simplest table template that you can create. It simply prints out all columns of the data set using all of the default attributes.
PROC TEMPLATE; DEFINE TABLE mytable; END; RUN; DATA _NULL_; SET sashelp.class(OBS = 10); FILE PRINT ODS = (TEMPLATE = “mytable”); PUT _ODS_; RUN;
Here is the output from the code above.
The DATA _NULL_ statement won’t change in most of the ...