TEMPLATE Procedure: Creating Table Templates

MVAR Statement

Defines a symbol that references a macro variable. ODS will use the value of the variable as a string. References to the macro variable are resolved when ODS binds the template and the data component to produce an output object.
Tip: You can use the MVAR statement in the template of a table, column, header, or footer. A macro variable that is defined in a template is available to that template and to all the templates that it contains.
See: Creating a New Table Template and Creating a Stand-Alone Style

Syntax

MVAR variable-1 <=default-variable-1><'text-1'> <... variable-n <=default-variable-n><'text-n'>>;

Required Argument

variable
names a macro variable to reference in the template. ODS will use the value of the macro variable as a string. ODS does not resolve the value of the macro variable until it binds the template and the data component.
Tip:Declare macro variables this way in a template. For example, to use the automatic macro variable SYSDATE9 in a template, declare it in an MVAR statement and reference it as SYSDATE9, without an ampersand, in the PROC TEMPLATE step. If you use the ampersand, the macro variable resolves when the template is compiled instead of when ODS binds the template to the data component.

Optional Arguments

default-variable
sets the default variable.
text
is text that is placed in the template to explain the macro variable's use. Text of this type becomes part of the compiled template, which you can view with the SOURCE statement, whereas SAS comments do not.