TEMPLATE Procedure: Creating Crosstabulation Table Templates

DYNAMIC Statement

Defines a symbol that references a value that the data component supplies from the procedure or DATA step.
Restriction: The DYNAMIC statement can be used only with the DEFINE CELLVALUE, DEFINE HEADER, and DEFINE FOOTER statements.
Tip: A dynamic variable that is defined in a template is available to that template and all the templates that it contains.

Syntax

Required Argument

dynamic- variable(s)
is a variable that is defined by SAS in the crosstabulation template. After a dynamic variable has been defined, you can use it in the TEXT statement within a footer or header template.
FMISSING
is the number of missing values in the table.
Requirement:The FMISSING dynamic variable must be specified by the DYNAMIC statement before you can use the dynamic variable in an expression.
NOTITLE
is set to 1 if the PROC FREQ's NOTITLE option was used, and it is set to 0 if the NOTITLE option was not used.
Requirement:The NOTITLE dynamic variable must be specified by the DYNAMIC statement before you can use the dynamic variable in an expression.
SAMPLESIZE
is set to 0 if the table is empty. Otherwise, it is set to 1.
Requirement:The SAMPLESIZE dynamic variable must be specified by the DYNAMIC statement before you can use the dynamic variable in an expression.
STRATNUM
is the current stratum number if the table has multiple strata. If the table has only one stratum, then the value is 0.
Requirement:The STRATNUM dynamic variable must be specified by the DYNAMIC statement before you can use the dynamic variable in an expression.
STRATAVARIABLENAMES
is a string that identifies the current stratum by the name of the stratum variables.
var-1=value-1<var-n=value-n>
var-1var-n
specifies the stratum variables.
value-1–value-n
specifies the values of the stratum variables.
Requirement:The DYNAMIC statement must specify the STRATAVARIABLELABELS dynamic variables before the dynamic variables can be used in an expression.
Tip:The value is undefined if the table has only one stratum.
STRATAVARIABLELABELS
is a string that identifies the current stratum by the label of the stratum variables.
var-1=value-1<var-n=value-n>
var-1var-n
specifies the stratum variables.
value-1–value-n
specifies the values of the stratum variables.
Tip:The value is undefined when the table has only one stratum.
Requirement:The DYNAMIC statement must specify the STRATAVARIABLELABELS dynamic variables before you can use the dynamic variables in an expression.