TEMPLATE Procedure: Creating Crosstabulation Table Templates

Syntax

PROC TEMPLATE
DEFINE CROSSTABS table-path </ STORE=libref.template-store>;
<table-attribute-1; <table-attribute-n>;>
CELLVALUE cellvalues;
DEFINE CELLVALUE cellvalue;
statements-and-attributes;
END;
DEFINE HEADER header-name;
statements-and-attributes;
END;
DEFINE FOOTER footer-name;
statements-and-attributes;
END;
DYNAMIC variable-1 <'text-1'> <variable-n <'text-n'>>;
FOOTER footer-name(s);
HEADER header-name(s);
NOTES text;
END;

Table of Procedure Tasks

Statement Task Example
PROC TEMPLATE Statement Begin a PROC TEMPLATE template Ex. 1, Ex. 2, Ex. 3
CELLSTYLE AS Statement Set the style element of the cells in the column according to the values of the variables Ex. 1, Ex. 2
CELLVALUE Statement Specify the order in which the cellvalues are stacked in the cells Ex. 1, Ex. 2
DEFINE CELLVALUE Statement Define a value that appears in the crosstabulation cells Ex. 1, Ex. 2
DEFINE CROSSTABS Statement Create a crosstabulation table template Ex. 1, Ex. 2, Ex. 3
DEFINE FOOTER Statement Create a template for a footer Ex. 1, Ex. 2
DEFINE HEADER Statement Create a template for a header Ex. 1, Ex. 2
DYNAMIC Statement Define a symbol that references a value that the data component supplies from the procedure or DATA step Ex. 1, Ex. 2
END Statement End a template Ex. 1, Ex. 2, Ex. 3
FOOTER Statement Declare a symbol as a footer in the table and specify the order of the footers Ex. 1, Ex. 2
HEADER Statement Declare a symbol as a header in the table and specify the order of the headers Ex. 1, Ex. 2
NOTES Statement Provide information about a template Ex. 1, Ex. 2
TEXT Statement Specify the text of the header or the footer Ex. 1, Ex. 2