When creating your own
crosstabulation table template, you always define the new table with
the same name as the existing table, which is Base.Freq.CrossTabFreqs.
By default, the existing crosstabulation table that PROC FREQ creates
is stored in the Sashelp.Tmplmst template store.
With PROC TEMPLATE,
you can create a modified version of Base.Freq.CrossTabFreqs that
you can save in a different template store by using the ODS PATH statement.
All crosstabulation templates must have the same name. If you want
to have multiple crosstabulation templates, put each one in a different
template store. Then you can use the ODS PATH statement to add the
template store that contains the version of the crosstabulation template
that you want to use.
For example, suppose
that you have a crosstabulation template in the template store Corporat.Template
and another crosstabulation template in Govment.Templat. In the following
code, the first ODS PATH statement adds the template store Corporat.Templat.
The first PROC FREQ code is then formatted using the crosstabulation
table template from Corporat.Templat. The second ODS PATH statement
removes Corporat.Templat, and the third ODS PATH statement adds Govment.Templat.
The last PROC FREQ step then uses the crosstabulation template from
Corporat.Templat.
ods path(prepend) corporat.templat(read);
... proc freq code ...
ods path(remove) corporat.templat;
ods path(prepend) govment.templat;
... proc freq code ...
For more information about the
ODS PATH statement, see
ODS PATH Statement.