TEMPLATE Procedure: Creating Table Templates

NMVAR Statement

Defines a symbol that references a macro variable. ODS will convert the variable's value to a number (stored as a double) before using it. References to the macro variable are resolved when ODS binds the template and the data component to produce an output object.
Restriction: The NMVAR statement can be used only 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: Setting the Style Element for Cells Based on Their Values

Syntax

NMVAR 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 convert the variable's value to a number (stored as a double) before using it. ODS does not resolve 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 a macro variable as a number, declare it in an NMVAR statement and reference it without an ampersand. 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.