TEMPLATE Procedure: Managing Template Stores

Example 1: Listing Templates in a Template Store

Features:

PATH statement

LIST statement: :
starting-path option
SORT= option

Details

This example lists the items for the Base.Univariate directory in the item store Sashelp.Tmplmst.

Program

options nodate pageno=1 pagesize=60 linesize=72;
proc template;
path sashelp.tmplmst;
list base.univariate / sort=path descending;
run;

Program Description

Set the SAS system options. The OPTIONS statement controls several aspects of the LISTING output. None of these options affects the HTML output.
options nodate pageno=1 pagesize=60 linesize=72;
Specify which locations to search for items that were created by PROC TEMPLATE. The PATH statement specifies to search for templates and definitions that were created by PROC TEMPLATE in the Sashelp.Tmplmst item store.
proc template;
path sashelp.tmplmst;
List in descending order the items that are stored within a specified level of the template store. The LIST statement lists the templates and definitions in one or more template stores. The starting path base.univariate specifies the level within the template store where PROC TEMPLATE is to start listing the items. The SORT= option sorts the list of items. The items are sorted in descending order.
list base.univariate / sort=path descending;
run;

Output

Partial Listing of Base.Univariate Template Store
Partial Listing of Base.Univariate Template Store