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.
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.
Copyright © SAS Institute Inc. All rights reserved.